Skip to contentSkip to conversation

mfd: add Intel Broxton Whiskey Cove PMIC driver

PATCH Superseded qipeng.zha 2 participants 2 messages Jul 13, 2015

Subsystems (2)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

qipeng.zha

author
#0 lore raw

PATCH v3 1/1 mfd: add Intel Broxton Whiskey Cove PMIC driver

From: "qipeng.zha" <[email protected]>

Add MFD core driver for Intel Broxton Whiskey Cove PMIC, which is specially accessed by hardware IPC, not a generic I2C device

---
change in v3
implement ipc regmap r/w callback in pmic driver, since there dropped
before patch of implement virtual ipc support in regmap core;
update some function's comment;

---
 drivers/mfd/Makefile               |   1 +
 drivers/mfd/intel_soc_pmic_bxtwc.c | 529 +++++++++++++++++++++++++++++++++++++
 include/linux/mfd/intel_bxtwc.h    |  69 +++++
 include/linux/mfd/intel_soc_pmic.h |   3 +
 4 files changed, 602 insertions(+)
 create mode 100644 drivers/mfd/intel_soc_pmic_bxtwc.c
 create mode 100644 include/linux/mfd/intel_bxtwc.h
drivers/mfd/Makefile +1 -0
index 0e5cfeb..5e771a2 100644
@@ -183,5 +183,6 @@ obj-$(CONFIG_MFD_RT5033)	+= rt5033.o
 obj-$(CONFIG_MFD_SKY81452)	+= sky81452.o
 
 intel-soc-pmic-objs		:= intel_soc_pmic_core.o intel_soc_pmic_crc.o
+intel-soc-pmic-objs		+= intel_soc_pmic_bxtwc.o
 obj-$(CONFIG_INTEL_SOC_PMIC)	+= intel-soc-pmic.o
 obj-$(CONFIG_MFD_MT6397)	+= mt6397-core.o
drivers/mfd/intel_soc_pmic_bxtwc.c new file +529 -0

529 lines not on this page · raw message

include/linux/mfd/intel_bxtwc.h new file +69 -0

69 lines not on this page · raw message

include/linux/mfd/intel_soc_pmic.h +3 -0
index abcbfcf..35e7904 100644
@@ -25,6 +25,9 @@ struct intel_soc_pmic {
 	int irq;
 	struct regmap *regmap;
 	struct regmap_irq_chip_data *irq_chip_data;
+	struct regmap_irq_chip_data *irq_chip_data_level2;
+	struct device *dev;
+	int default_i2c_addr;
 };
 
 #endif	/* __INTEL_SOC_PMIC_H__ */
Signature · 1 line
1.8.3.2
#1 lore raw

drivers/mfd/Makefile obj-$(CONFIG_MFD_RT5033) += rt5033.o · line 186

Quoted 8 lines
drivers/mfd/Makefile +1 -0
@@ -183,5 +183,6 @@ obj-$(CONFIG_MFD_RT5033)	+= rt5033.o
 obj-$(CONFIG_MFD_SKY81452)	+= sky81452.o
 
 intel-soc-pmic-objs		:= intel_soc_pmic_core.o intel_soc_pmic_crc.o
+intel-soc-pmic-objs		+= intel_soc_pmic_bxtwc.o

Since you have regmap read/write callbacks implemented in the mfd driver itself now, this driver would have compile time dependency on the IPC driver. I think you need to define a CONFIG option for bxtwc depending on CONFIG_INTEL_PMC_IPC.

Quoted 2 lines
drivers/mfd/Makefile +0 -0
 obj-$(CONFIG_INTEL_SOC_PMIC)	+= intel-soc-pmic.o

obj-$(CONFIG_MFD_MT6397) += mt6397-core.o