Skip to contentSkip to conversation

mfd: arizona: Add support for WM8998 and WM1814

PATCH RESEND Superseded Richard Fitzgerald 1 participant 2 messages Jun 9, 2015

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

PATCH RESEND v4 1/1 mfd: arizona: Add support for WM8998 and WM1814

Only change since Lee acked it is that I've fixed the conditional in Makefile

Richard Fitzgerald (1):
mfd: arizona: Add support for WM8998 and WM1814

 drivers/mfd/Kconfig                   |    6 +
 drivers/mfd/Makefile                  |    3 +
 drivers/mfd/arizona-core.c            |  105 ++-
 drivers/mfd/arizona-i2c.c             |    8 +
 drivers/mfd/arizona-irq.c             |    9 +
 drivers/mfd/arizona.h                 |    5 +
 drivers/mfd/wm8998-tables.c           | 1592 +++++++++++++++++++++++++++++++++
 include/linux/mfd/arizona/core.h      |    3 +
 include/linux/mfd/arizona/pdata.h     |    2 +
 include/linux/mfd/arizona/registers.h |  220 +++++
 10 files changed, 1945 insertions(+), 8 deletions(-)
 create mode 100644 drivers/mfd/wm8998-tables.c
Signature · 1 line
1.7.2.5
#1 lore raw

PATCH RESEND v4 1/1 mfd: arizona: Add support for WM8998 and WM1814

---
 drivers/mfd/Kconfig                   |    6 +
 drivers/mfd/Makefile                  |    3 +
 drivers/mfd/arizona-core.c            |  105 ++-
 drivers/mfd/arizona-i2c.c             |    8 +
 drivers/mfd/arizona-irq.c             |    9 +
 drivers/mfd/arizona.h                 |    5 +
 drivers/mfd/wm8998-tables.c           | 1592 +++++++++++++++++++++++++++++++++
 include/linux/mfd/arizona/core.h      |    3 +
 include/linux/mfd/arizona/pdata.h     |    2 +
 include/linux/mfd/arizona/registers.h |  220 +++++
 10 files changed, 1945 insertions(+), 8 deletions(-)
 create mode 100644 drivers/mfd/wm8998-tables.c
drivers/mfd/Kconfig +6 -0
index eacd6b9..ee9c914 100644
@@ -1361,6 +1361,12 @@ config MFD_WM8997
 	help
 	  Support for Wolfson Microelectronics WM8997 low power audio SoC
 
+config MFD_WM8998
+	bool "Wolfson Microelectronics WM8998"
+	depends on MFD_ARIZONA
+	help
+	  Support for Wolfson Microelectronics WM8998 low power audio SoC
+
 config MFD_WM8400
 	bool "Wolfson Microelectronics WM8400"
 	select MFD_CORE
drivers/mfd/Makefile +3 -0
index 63743a7..ec00a74 100644
@@ -50,6 +50,9 @@ endif
 ifeq ($(CONFIG_MFD_WM8997),y)
 obj-$(CONFIG_MFD_ARIZONA)	+= wm8997-tables.o
 endif
+ifeq ($(CONFIG_MFD_WM8998),y)
+obj-$(CONFIG_MFD_ARIZONA)	+= wm8998-tables.o
+endif
 obj-$(CONFIG_MFD_WM8400)	+= wm8400-core.o
 wm831x-objs			:= wm831x-core.o wm831x-irq.o wm831x-otp.o
 wm831x-objs			+= wm831x-auxadc.o
drivers/mfd/arizona-core.c +97 -8

175 lines not on this page · raw message

drivers/mfd/arizona-i2c.c +8 -0
index ff782a5..920276f 100644
@@ -53,6 +53,12 @@ static int arizona_i2c_probe(struct i2c_client *i2c,
 		regmap_config = &wm8997_i2c_regmap;
 		break;
 #endif
+#ifdef CONFIG_MFD_WM8998
+	case WM8998:
+	case WM1814:
+		regmap_config = &wm8998_i2c_regmap;
+		break;
+#endif
 	default:
 		dev_err(&i2c->dev, "Unknown device type %ld\n",
 			id->driver_data);
@@ -90,6 +96,8 @@ static const struct i2c_device_id arizona_i2c_id[] = {
 	{ "wm5110", WM5110 },
 	{ "wm8280", WM8280 },
 	{ "wm8997", WM8997 },
+	{ "wm8998", WM8998 },
+	{ "wm1814", WM1814 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, arizona_i2c_id);
drivers/mfd/arizona-irq.c +9 -0
index 2b9965d5..bb0063d 100644
@@ -234,6 +234,15 @@ int arizona_irq_init(struct arizona *arizona)
 		arizona->ctrlif_error = false;
 		break;
 #endif
+#ifdef CONFIG_MFD_WM8998
+	case WM8998:
+	case WM1814:
+		aod = &wm8998_aod;
+		irq = &wm8998_irq;
+
+		arizona->ctrlif_error = false;
+		break;
+#endif
 	default:
 		BUG_ON("Unknown Arizona class device" == NULL);
 		return -EINVAL;
drivers/mfd/arizona.h +5 -0
index fbe2843..3af12e9 100644
@@ -27,6 +27,8 @@ extern const struct regmap_config wm5110_spi_regmap;
 
 extern const struct regmap_config wm8997_i2c_regmap;
 
+extern const struct regmap_config wm8998_i2c_regmap;
+
 extern const struct dev_pm_ops arizona_pm_ops;
 
 extern const struct of_device_id arizona_of_match[];
@@ -41,6 +43,9 @@ extern const struct regmap_irq_chip wm5110_revd_irq;
 extern const struct regmap_irq_chip wm8997_aod;
 extern const struct regmap_irq_chip wm8997_irq;
 
+extern struct regmap_irq_chip wm8998_aod;
+extern struct regmap_irq_chip wm8998_irq;
+
 int arizona_dev_init(struct arizona *arizona);
 int arizona_dev_exit(struct arizona *arizona);
 int arizona_irq_init(struct arizona *arizona);
drivers/mfd/wm8998-tables.c new file +1592 -0

1,592 lines not on this page · raw message

include/linux/mfd/arizona/core.h +3 -0
index 2f434f4..79e607e 100644
@@ -25,6 +25,8 @@ enum arizona_type {
 	WM5110 = 2,
 	WM8997 = 3,
 	WM8280 = 4,
+	WM8998 = 5,
+	WM1814 = 6,
 };
 
 #define ARIZONA_IRQ_GP1                    0
@@ -165,6 +167,7 @@ static inline int wm5102_patch(struct arizona *arizona)
 
 int wm5110_patch(struct arizona *arizona);
 int wm8997_patch(struct arizona *arizona);
+int wm8998_patch(struct arizona *arizona);
 
 extern int arizona_of_get_named_gpio(struct arizona *arizona, const char *prop,
 				     bool mandatory);
include/linux/mfd/arizona/pdata.h +2 -0
index f672267..691f020 100644
@@ -159,6 +159,8 @@ struct arizona_pdata {
 	/**
 	 * Mode of input structures
 	 * One of the ARIZONA_INMODE_xxx values
+	 * wm5102/wm5110/wm8280/wm8997: [0]=IN1 [1]=IN2 [2]=IN3 [3]=IN4
+	 * wm8998: [0]=IN1A [1]=IN2A [2]=IN1B [3]=IN2B
 	 */
 	int inmode[ARIZONA_MAX_INPUT];
 
include/linux/mfd/arizona/registers.h +220 -0

329 lines not on this page · raw message

Signature · 1 line
1.7.2.5