Skip to contentSkip to conversation

MFD: DA9052/53 MFD core module v9 Added SPI support

PATCH In review Ashish Jangam 2 participants 2 messages Dec 9, 2011 – Dec 12, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/6 MFD: DA9052/53 MFD core module v9 Added SPI support

The DA9052/53 is a highly integrated PMIC subsystem with supply domain flexibility to support wide range of high performance application.

It provides voltage regulators, GPIO controller, Touch Screen, RTC, Battery control and other functionality.

This patch is functionally tested on Samsung SMDKV6410.

---
 drivers/mfd/Kconfig               |   12 ++++
 drivers/mfd/Makefile              |    1 +
 drivers/mfd/da9052-spi.c          |  121 +++++++++++++++++++++++++++++++++++++
 include/linux/mfd/da9052/da9052.h |    1 +
 4 files changed, 135 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mfd/da9052-spi.c
drivers/mfd/Kconfig +12 -0
index baced42..c8322ee 100644
@@ -332,6 +332,18 @@ config PMIC_DA9052
 	bool
 	select MFD_CORE
 
+config MFD_DA9052_SPI
+	bool "Support Dialog Semiconductor DA9052/53 PMIC variants with SPI"
+	select REGMAP_SPI
+	select REGMAP_IRQ
+	select PMIC_DA9052
+	depends on SPI_MASTER=y
+	help
+	  Support for the Dialog Semiconductor DA9052 PMIC
+	  when controlled using SPI. This driver provides common support
+	  for accessing the device, additional drivers must be enabled in
+	  order to use the functionality of the device.
+
 config MFD_DA9052_I2C
 	bool "Support Dialog Semiconductor DA9052/53 PMIC variants with I2C"
 	select REGMAP_I2C
drivers/mfd/Makefile +1 -0
index 484f209..d5f5743 100644
@@ -69,6 +69,7 @@ obj-$(CONFIG_UCB1400_CORE)	+= ucb1400_core.o
 obj-$(CONFIG_PMIC_DA903X)	+= da903x.o
 
 obj-$(CONFIG_PMIC_DA9052)	+= da9052-core.o
+obj-$(CONFIG_MFD_DA9052_SPI)	+= da9052-spi.o
 obj-$(CONFIG_MFD_DA9052_I2C)	+= da9052-i2c.o
 
 max8925-objs			:= max8925-core.o max8925-i2c.o
drivers/mfd/da9052-spi.c new file +121 -0

121 lines not on this page · raw message

include/linux/mfd/da9052/da9052.h +1 -0
index a4db9b8..a799655 100644
@@ -94,6 +94,7 @@ struct da9052 {
 	struct mutex auxadc_lock;
 
 	struct device *dev;
+	struct spi_device *spi_dev;
 	struct i2c_client *i2c_client;
 	struct regmap *regmap;
 
Signature · 1 line
1.7.1
#1 lore raw
Quoted 2 lines · Ashish Jangam

The DA9052/53 is a highly integrated PMIC subsystem with supply domain flexibility to support wide range of high performance application.

Looks good, though again you should've CCed Samuel. One small thing:

include/linux/mfd/da9052/da9052.h struct da9052 { · line 98

Quoted 4 lines
include/linux/mfd/da9052/da9052.h +1 -0
 	struct device *dev;
+	struct spi_device *spi_dev;
 	struct i2c_client *i2c_client;

You con't actually use this (or the i2c_client) any more so could just drop them.