mfd: da9062: Supply core driver

Add MFD core driver support for DA9062

Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
S Twiss
2015-07-01 14:11:32 +01:00
committed by Lee Jones
parent 78b7d84c8f
commit 9b40b030c4
5 changed files with 1684 additions and 1 deletions

View File

@@ -186,6 +186,18 @@ config MFD_DA9055
This driver can be built as a module. If built as a module it will be
called "da9055"
config MFD_DA9062
tristate "Dialog Semiconductor DA9062 PMIC Support"
select MFD_CORE
select REGMAP_I2C
select REGMAP_IRQ
depends on I2C=y
help
Say yes here for support for the Dialog Semiconductor DA9062 PMIC.
This includes the I2C driver and core APIs.
Additional drivers must be enabled in order to use the functionality
of the device.
config MFD_DA9063
bool "Dialog Semiconductor DA9063 PMIC Support"
select MFD_CORE

View File

@@ -113,10 +113,11 @@ obj-$(CONFIG_MFD_LP8788) += lp8788.o lp8788-irq.o
da9055-objs := da9055-core.o da9055-i2c.o
obj-$(CONFIG_MFD_DA9055) += da9055.o
obj-$(CONFIG_MFD_DA9062) += da9062-core.o
da9063-objs := da9063-core.o da9063-irq.o da9063-i2c.o
obj-$(CONFIG_MFD_DA9063) += da9063.o
obj-$(CONFIG_MFD_DA9150) += da9150-core.o
obj-$(CONFIG_MFD_MAX14577) += max14577.o
obj-$(CONFIG_MFD_MAX77686) += max77686.o
obj-$(CONFIG_MFD_MAX77693) += max77693.o

512
drivers/mfd/da9062-core.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,50 @@
/*
* Copyright (C) 2015 Dialog Semiconductor Ltd.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __MFD_DA9062_CORE_H__
#define __MFD_DA9062_CORE_H__
#include <linux/interrupt.h>
#include <linux/mfd/da9062/registers.h>
/* Interrupts */
enum da9062_irqs {
/* IRQ A */
DA9062_IRQ_ONKEY,
DA9062_IRQ_ALARM,
DA9062_IRQ_TICK,
DA9062_IRQ_WDG_WARN,
DA9062_IRQ_SEQ_RDY,
/* IRQ B*/
DA9062_IRQ_TEMP,
DA9062_IRQ_LDO_LIM,
DA9062_IRQ_DVC_RDY,
DA9062_IRQ_VDD_WARN,
/* IRQ C */
DA9062_IRQ_GPI0,
DA9062_IRQ_GPI1,
DA9062_IRQ_GPI2,
DA9062_IRQ_GPI3,
DA9062_IRQ_GPI4,
DA9062_NUM_IRQ,
};
struct da9062 {
struct device *dev;
struct regmap *regmap;
struct regmap_irq_chip_data *regmap_irq;
};
#endif /* __MFD_DA9062_CORE_H__ */

File diff suppressed because it is too large Load Diff