mfd: tps65912: Driver rewrite with DT support
Subsystems (4)
v7 cover mfd: tps65912: Driver rewrite with DT support
In an effort to cleanup this driver and add Device Tree support the driver has been rewritten based on new driver styles and modern kernel driver helpers. This has nearly halved the lines of code while keeping all previous functionality.
Platform file based initialization has been dropped as there is no examples of this use in the kernel.
v1 can be found here: [1] v2: [2] v3: [3] v4: [4] v5: [5] v6: [6]
Changes from v6:
- Removed compatible strings from DT sub-nodes
- Rearranged DT bindings
- Small fixes
Changes from v5:
- Small formatting changes to DT Docs
- Converted to_tps65912_gpio from macro to inline function
Changes from v4:
- Use mfd core to add sub-devices
Changes from v3:
- Reorganized regulator driver and related DT node
- Other small fixes as discussed in v3 thread
Changes from v2:
- Split the series further into subsystems
Changes from v1:
- Split the rewrite into delete/create patches
- Several small fixes as discussed in v1 thread
[1] http://www.spinics.net/lists/devicetree/msg93863.html
[2] http://www.spinics.net/lists/devicetree/msg95003.html
[3] http://www.spinics.net/lists/devicetree/msg95133.html
[4] http://www.spinics.net/lists/devicetree/msg96109.html
[5] http://www.spinics.net/lists/devicetree/msg100601.html
[6] https://lkml.org/lkml/2015/10/30/690
Andrew F. Davis (5):
Documentation: tps65912: Add DT bindings for the TPS65912 PMIC
mfd: tps65912: Remove old driver in preparation for new driver
mfd: tps65912: Add driver for the TPS65912 PMIC
regulator: tps65912: Add regulator driver for the TPS65912 PMIC
gpio: tps65912: Add GPIO driver for the TPS65912 PMIC
Documentation/devicetree/bindings/mfd/tps65912.txt | 50 ++ drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-tps65912.c | 317 ++++----- drivers/mfd/Kconfig | 20 +- drivers/mfd/Makefile | 3 +- drivers/mfd/tps65912-core.c | 290 ++++----- drivers/mfd/tps65912-i2c.c | 219 +++---- drivers/mfd/tps65912-irq.c | 217 ------- drivers/mfd/tps65912-spi.c | 219 +++---- drivers/regulator/Kconfig | 2 +- drivers/regulator/tps65912-regulator.c | 710 +++++---------------- include/linux/mfd/tps65912.h | 208 +++--- 12 files changed, 780 insertions(+), 1477 deletions(-) create mode 100644 Documentation/devicetree/bindings/mfd/tps65912.txt rewrite drivers/gpio/gpio-tps65912.c (74%) rewrite drivers/mfd/tps65912-core.c (95%) rewrite drivers/mfd/tps65912-i2c.c (93%) delete mode 100644 drivers/mfd/tps65912-irq.c
rewrite drivers/mfd/tps65912-spi.c (92%) rewrite drivers/regulator/tps65912-regulator.c (94%)
Signature · 1 line
1.9.1
PATCH v7 1/5 Documentation: tps65912: Add DT bindings for the TPS65912 PMIC
The TPS65912 PMIC contains several regulators and a GPIO controller. Add bindings for the TPS65912 PMIC.
--- Documentation/devicetree/bindings/mfd/tps65912.txt | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/tps65912.txt
Documentation/devicetree/bindings/mfd/tps65912.txt new file +50 -0
@@ -0,0 +1,50 @@ +* TPS65912 Power Management Integrated Circuit bindings + +Required properties: + - compatible : Should be "ti,tps65912". + - reg : Slave address or chip select number (I2C / SPI). + - interrupt-parent : The parent interrupt controller. + - interrupts : The interrupt line the device is connected to. + - interrupt-controller : Marks the device node as an interrupt controller. + - #interrupt-cells : The number of cells to describe an IRQ, should be 2. + The first cell is the IRQ number. + The second cell is the flags, encoded as trigger + masks from ../interrupt-controller/interrupts.txt. + - gpio-controller : Marks the device node as a GPIO Controller. + - #gpio-cells : Should be two. The first cell is the pin number and + the second cell is used to specify flags. + See ../gpio/gpio.txt for more information. + - regulators: : List of child nodes that specify the regulator + initialization data. Child nodes must be named + after their hardware counterparts: dcdc[1-4] and + ldo[1-10]. Each child nodes is defined using the + standard binding for regulators. + +Example: + + pmic: tps65912@2d { + compatible = "ti,tps65912"; + reg = <0x2d>; + interrupt-parent = <&gpio1>; + interrupts = <28 IRQ_TYPE_LEVEL_LOW>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-controller; + #gpio-cells = <2>; + + regulators { + dcdc1 { + regulator-name = "vdd_core"; + regulator-min-microvolt = <912000>; + regulator-max-microvolt = <1144000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo1 { + regulator-name = "ldo1"; + regulator-min-microvolt = <1900000>; + regulator-max-microvolt = <1900000>; + }; + }; + };
Signature · 6 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v7 1/5] Documentation: tps65912: Add DT bindings for the TPS65912 PMIC
Quoted 4 lines · Andrew F. Davis
The TPS65912 PMIC contains several regulators and a GPIO controller. Add bindings for the TPS65912 PMIC.
Signed-off-by Andrew F. Davis <[email protected]>
Quoted 64 lines
--- Documentation/devicetree/bindings/mfd/tps65912.txt | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/tps65912.txtDocumentation/devicetree/bindings/mfd/tps65912.txt new file +50
-0@@ -0,0 +1,50 @@ +* TPS65912 Power Management Integrated Circuit bindings + +Required properties: + - compatible : Should be "ti,tps65912". + - reg : Slave address or chip select number (I2C / SPI). + - interrupt-parent : The parent interrupt controller. + - interrupts : The interrupt line the device is connected to. + - interrupt-controller : Marks the device node as an interrupt controller. + - #interrupt-cells : The number of cells to describe an IRQ, should be 2. + The first cell is the IRQ number. + The second cell is the flags, encoded as trigger + masks from ../interrupt-controller/interrupts.txt. + - gpio-controller : Marks the device node as a GPIO Controller. + - #gpio-cells : Should be two. The first cell is the pin number and + the second cell is used to specify flags. + See ../gpio/gpio.txt for more information. + - regulators: : List of child nodes that specify the regulator + initialization data. Child nodes must be named + after their hardware counterparts: dcdc[1-4] and + ldo[1-10]. Each child nodes is defined using the + standard binding for regulators. + +Example: + + pmic: tps65912@2d { + compatible = "ti,tps65912"; + reg = <0x2d>; + interrupt-parent = <&gpio1>; + interrupts = <28 IRQ_TYPE_LEVEL_LOW>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-controller; + #gpio-cells = <2>; + + regulators { + dcdc1 { + regulator-name = "vdd_core"; + regulator-min-microvolt = <912000>; + regulator-max-microvolt = <1144000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo1 { + regulator-name = "ldo1"; + regulator-min-microvolt = <1900000>; + regulator-max-microvolt = <1900000>; + }; + }; + };Signature · 1 line
1.9.1
Re: [PATCH v7 1/5] Documentation: tps65912: Add DT bindings for the TPS65912 PMIC
In reply to Andrew F. DavisQuoted 8 lines · Andrew F. Davis
The TPS65912 PMIC contains several regulators and a GPIO controller. Add bindings for the TPS65912 PMIC.
Signed-off-by Andrew F. Davis <[email protected]>--- Documentation/devicetree/bindings/mfd/tps65912.txt | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/tps65912.txt
For my own reference:
Quoted 56 lines
Documentation/devicetree/bindings/mfd/tps65912.txt new file +50
-0@@ -0,0 +1,50 @@ +* TPS65912 Power Management Integrated Circuit bindings + +Required properties: + - compatible : Should be "ti,tps65912". + - reg : Slave address or chip select number (I2C / SPI). + - interrupt-parent : The parent interrupt controller. + - interrupts : The interrupt line the device is connected to. + - interrupt-controller : Marks the device node as an interrupt controller. + - #interrupt-cells : The number of cells to describe an IRQ, should be 2. + The first cell is the IRQ number. + The second cell is the flags, encoded as trigger + masks from ../interrupt-controller/interrupts.txt. + - gpio-controller : Marks the device node as a GPIO Controller. + - #gpio-cells : Should be two. The first cell is the pin number and + the second cell is used to specify flags. + See ../gpio/gpio.txt for more information. + - regulators: : List of child nodes that specify the regulator + initialization data. Child nodes must be named + after their hardware counterparts: dcdc[1-4] and + ldo[1-10]. Each child nodes is defined using the + standard binding for regulators. + +Example: + + pmic: tps65912@2d { + compatible = "ti,tps65912"; + reg = <0x2d>; + interrupt-parent = <&gpio1>; + interrupts = <28 IRQ_TYPE_LEVEL_LOW>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-controller; + #gpio-cells = <2>; + + regulators { + dcdc1 { + regulator-name = "vdd_core"; + regulator-min-microvolt = <912000>; + regulator-max-microvolt = <1144000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo1 { + regulator-name = "ldo1"; + regulator-min-microvolt = <1900000>; + regulator-max-microvolt = <1900000>; + }; + }; + };
Signature · 8 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v7 1/5] Documentation: tps65912: Add DT bindings for the TPS65912 PMIC
In reply to Andrew F. DavisQuoted 4 lines · Andrew F. Davis
The TPS65912 PMIC contains several regulators and a GPIO controller. Add bindings for the TPS65912 PMIC.
Signed-off-by Andrew F. Davis <[email protected]>
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v7 2/5 mfd: tps65912: Remove old driver in preparation for new driver
In reply to Andrew F. DavisThe old tps65912 driver is being replaced, delete old driver.
--- drivers/gpio/Kconfig | 6 - drivers/gpio/Makefile | 1 - drivers/gpio/gpio-tps65912.c | 153 ---------- drivers/mfd/Kconfig | 26 -- drivers/mfd/Makefile | 4 - drivers/mfd/tps65912-core.c | 175 ----------- drivers/mfd/tps65912-i2c.c | 139 --------- drivers/mfd/tps65912-irq.c | 217 ------------- drivers/mfd/tps65912-spi.c | 140 --------- drivers/regulator/Kconfig | 6 - drivers/regulator/Makefile | 1 - drivers/regulator/tps65912-regulator.c | 541 --------------------------------- include/linux/mfd/tps65912.h | 328 -------------------- 13 files changed, 1737 deletions(-) delete mode 100644 drivers/gpio/gpio-tps65912.c delete mode 100644 drivers/mfd/tps65912-core.c delete mode 100644 drivers/mfd/tps65912-i2c.c delete mode 100644 drivers/mfd/tps65912-irq.c delete mode 100644 drivers/mfd/tps65912-spi.c delete mode 100644 drivers/regulator/tps65912-regulator.c delete mode 100644 include/linux/mfd/tps65912.h
drivers/gpio/Kconfig +0 -6
@@ -852,12 +852,6 @@ config GPIO_TPS65910 Select this option to enable GPIO driver for the TPS65910 chip family. -config GPIO_TPS65912 - tristate "TI TPS65912 GPIO" - depends on (MFD_TPS65912_I2C || MFD_TPS65912_SPI) - help - This driver supports TPS65912 gpio chip - config GPIO_TWL4030 tristate "TWL4030, TWL5030, and TPS659x0 GPIOs" depends on TWL4030_CORE
drivers/gpio/Makefile +0 -1
@@ -97,7 +97,6 @@ obj-$(CONFIG_GPIO_TIMBERDALE) += gpio-timberdale.o obj-$(CONFIG_GPIO_PALMAS) += gpio-palmas.o obj-$(CONFIG_GPIO_TPS6586X) += gpio-tps6586x.o obj-$(CONFIG_GPIO_TPS65910) += gpio-tps65910.o -obj-$(CONFIG_GPIO_TPS65912) += gpio-tps65912.o obj-$(CONFIG_GPIO_TS5500) += gpio-ts5500.o obj-$(CONFIG_GPIO_TWL4030) += gpio-twl4030.o obj-$(CONFIG_GPIO_TWL6040) += gpio-twl6040.o
drivers/gpio/gpio-tps65912.c deleted +0 -153
153 lines not on this page · raw message
drivers/mfd/Kconfig +0 -26
@@ -1180,32 +1180,6 @@ config MFD_TPS65910 if you say yes here you get support for the TPS65910 series of Power Management chips. -config MFD_TPS65912 - bool "TI TPS65912 Power Management chip" - depends on GPIOLIB - select MFD_CORE - help - If you say yes here you get support for the TPS65912 series of - PM chips. - -config MFD_TPS65912_I2C - bool "TI TPS65912 Power Management chip with I2C" - select MFD_CORE - select MFD_TPS65912 - depends on I2C=y && GPIOLIB - help - If you say yes here you get support for the TPS65912 series of - PM chips with I2C interface. - -config MFD_TPS65912_SPI - bool "TI TPS65912 Power Management chip with SPI" - select MFD_CORE - select MFD_TPS65912 - depends on SPI_MASTER && GPIOLIB - help - If you say yes here you get support for the TPS65912 series of - PM chips with SPI interface. - config MFD_TPS80031 bool "TI TPS80031/TPS80032 Power Management chips" depends on I2C=y
drivers/mfd/Makefile +0 -4
@@ -69,10 +69,6 @@ obj-$(CONFIG_TPS6507X) += tps6507x.o obj-$(CONFIG_MFD_TPS65217) += tps65217.o obj-$(CONFIG_MFD_TPS65218) += tps65218.o obj-$(CONFIG_MFD_TPS65910) += tps65910.o -tps65912-objs := tps65912-core.o tps65912-irq.o -obj-$(CONFIG_MFD_TPS65912) += tps65912.o -obj-$(CONFIG_MFD_TPS65912_I2C) += tps65912-i2c.o -obj-$(CONFIG_MFD_TPS65912_SPI) += tps65912-spi.o obj-$(CONFIG_MFD_TPS80031) += tps80031.o obj-$(CONFIG_MENELAUS) += menelaus.o
drivers/mfd/tps65912-core.c deleted +0 -175
175 lines not on this page · raw message
drivers/mfd/tps65912-i2c.c deleted +0 -139
139 lines not on this page · raw message
drivers/mfd/tps65912-irq.c deleted +0 -217
217 lines not on this page · raw message
drivers/mfd/tps65912-spi.c deleted +0 -140
140 lines not on this page · raw message
drivers/regulator/Kconfig +0 -6
@@ -727,12 +727,6 @@ config REGULATOR_TPS65910 help This driver supports TPS65910/TPS65911 voltage regulator chips. -config REGULATOR_TPS65912 - tristate "TI TPS65912 Power regulator" - depends on (MFD_TPS65912_I2C || MFD_TPS65912_SPI) - help - This driver supports TPS65912 voltage regulator chip. - config REGULATOR_TPS80031 tristate "TI TPS80031/TPS80032 power regualtor driver" depends on MFD_TPS80031
drivers/regulator/Makefile +0 -1
@@ -91,7 +91,6 @@ obj-$(CONFIG_REGULATOR_TPS65218) += tps65218-regulator.o obj-$(CONFIG_REGULATOR_TPS6524X) += tps6524x-regulator.o obj-$(CONFIG_REGULATOR_TPS6586X) += tps6586x-regulator.o obj-$(CONFIG_REGULATOR_TPS65910) += tps65910-regulator.o -obj-$(CONFIG_REGULATOR_TPS65912) += tps65912-regulator.o obj-$(CONFIG_REGULATOR_TPS80031) += tps80031-regulator.o obj-$(CONFIG_REGULATOR_TWL4030) += twl-regulator.o obj-$(CONFIG_REGULATOR_VEXPRESS) += vexpress.o
drivers/regulator/tps65912-regulator.c deleted +0 -541
541 lines not on this page · raw message
include/linux/mfd/tps65912.h deleted +0 -328
328 lines not on this page · raw message
Signature · 6 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v7 3/5 mfd: tps65912: Add driver for the TPS65912 PMIC
In reply to Andrew F. DavisThis patch adds support for TPS65912 PMIC MFD core. It provides communication through the I2C and SPI interfaces. It contains the following components:
- Regulators
- GPIO controller
--- drivers/mfd/Kconfig | 24 +++ drivers/mfd/Makefile | 3 + drivers/mfd/tps65912-core.c | 115 +++++++++++++++ drivers/mfd/tps65912-i2c.c | 80 ++++++++++ drivers/mfd/tps65912-spi.c | 79 ++++++++++ include/linux/mfd/tps65912.h | 342 +++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 643 insertions(+) create mode 100644 drivers/mfd/tps65912-core.c create mode 100644 drivers/mfd/tps65912-i2c.c create mode 100644 drivers/mfd/tps65912-spi.c create mode 100644 include/linux/mfd/tps65912.h
drivers/mfd/Kconfig +24 -0
@@ -1180,6 +1180,30 @@ config MFD_TPS65910 if you say yes here you get support for the TPS65910 series of Power Management chips. +config MFD_TPS65912 + tristate + select MFD_CORE + select REGMAP + select REGMAP_IRQ + +config MFD_TPS65912_I2C + tristate "TI TPS65912 Power Management chip with I2C" + select MFD_TPS65912 + select REGMAP_I2C + depends on I2C + help + If you say yes here you get support for the TPS65912 series of + PM chips with I2C interface. + +config MFD_TPS65912_SPI + tristate "TI TPS65912 Power Management chip with SPI" + select MFD_TPS65912 + select REGMAP_SPI + depends on SPI_MASTER + help + If you say yes here you get support for the TPS65912 series of + PM chips with SPI interface. + config MFD_TPS80031 bool "TI TPS80031/TPS80032 Power Management chips" depends on I2C=y
drivers/mfd/Makefile +3 -0
@@ -69,6 +69,9 @@ obj-$(CONFIG_TPS6507X) += tps6507x.o obj-$(CONFIG_MFD_TPS65217) += tps65217.o obj-$(CONFIG_MFD_TPS65218) += tps65218.o obj-$(CONFIG_MFD_TPS65910) += tps65910.o +obj-$(CONFIG_MFD_TPS65912) += tps65912-core.o +obj-$(CONFIG_MFD_TPS65912_I2C) += tps65912-i2c.o +obj-$(CONFIG_MFD_TPS65912_SPI) += tps65912-spi.o obj-$(CONFIG_MFD_TPS80031) += tps80031.o obj-$(CONFIG_MENELAUS) += menelaus.o
drivers/mfd/tps65912-core.c new file +115 -0
115 lines not on this page · raw message
drivers/mfd/tps65912-i2c.c new file +80 -0
80 lines not on this page · raw message
drivers/mfd/tps65912-spi.c new file +79 -0
79 lines not on this page · raw message
include/linux/mfd/tps65912.h new file +342 -0
342 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v7 4/5 regulator: tps65912: Add regulator driver for the TPS65912 PMIC
In reply to Andrew F. DavisThis patch adds support for TPS65912 PMIC regulators.
The regulators set consists of 4 DCDCs and 10 LDOs. The output voltages are configurable and are meant to supply power to the main processor and other components.
--- drivers/regulator/Kconfig | 6 ++ drivers/regulator/Makefile | 1 + drivers/regulator/tps65912-regulator.c | 169 +++++++++++++++++++++++++++++++++ 3 files changed, 176 insertions(+) create mode 100644 drivers/regulator/tps65912-regulator.c
drivers/regulator/Kconfig +6 -0
@@ -727,6 +727,12 @@ config REGULATOR_TPS65910 help This driver supports TPS65910/TPS65911 voltage regulator chips. +config REGULATOR_TPS65912 + tristate "TI TPS65912 Power regulator" + depends on MFD_TPS65912 + help + This driver supports TPS65912 voltage regulator chip. + config REGULATOR_TPS80031 tristate "TI TPS80031/TPS80032 power regualtor driver" depends on MFD_TPS80031
drivers/regulator/Makefile +1 -0
@@ -91,6 +91,7 @@ obj-$(CONFIG_REGULATOR_TPS65218) += tps65218-regulator.o obj-$(CONFIG_REGULATOR_TPS6524X) += tps6524x-regulator.o obj-$(CONFIG_REGULATOR_TPS6586X) += tps6586x-regulator.o obj-$(CONFIG_REGULATOR_TPS65910) += tps65910-regulator.o +obj-$(CONFIG_REGULATOR_TPS65912) += tps65912-regulator.o obj-$(CONFIG_REGULATOR_TPS80031) += tps80031-regulator.o obj-$(CONFIG_REGULATOR_TWL4030) += twl-regulator.o obj-$(CONFIG_REGULATOR_VEXPRESS) += vexpress.o
drivers/regulator/tps65912-regulator.c new file +169 -0
169 lines not on this page · raw message
Signature · 6 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v7 5/5 gpio: tps65912: Add GPIO driver for the TPS65912 PMIC
In reply to Andrew F. DavisThis patch adds support for the TPS65912 PMIC GPIOs.
TPS65912 has five configurable GPIOs that can be used for several purposes.
--- drivers/gpio/Kconfig | 6 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-tps65912.c | 164 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 171 insertions(+) create mode 100644 drivers/gpio/gpio-tps65912.c
drivers/gpio/Kconfig +6 -0
@@ -852,6 +852,12 @@ config GPIO_TPS65910 Select this option to enable GPIO driver for the TPS65910 chip family. +config GPIO_TPS65912 + tristate "TI TPS65912 GPIO" + depends on MFD_TPS65912 + help + This driver supports TPS65912 gpio chip + config GPIO_TWL4030 tristate "TWL4030, TWL5030, and TPS659x0 GPIOs" depends on TWL4030_CORE
drivers/gpio/Makefile +1 -0
@@ -97,6 +97,7 @@ obj-$(CONFIG_GPIO_TIMBERDALE) += gpio-timberdale.o obj-$(CONFIG_GPIO_PALMAS) += gpio-palmas.o obj-$(CONFIG_GPIO_TPS6586X) += gpio-tps6586x.o obj-$(CONFIG_GPIO_TPS65910) += gpio-tps65910.o +obj-$(CONFIG_GPIO_TPS65912) += gpio-tps65912.o obj-$(CONFIG_GPIO_TS5500) += gpio-ts5500.o obj-$(CONFIG_GPIO_TWL4030) += gpio-twl4030.o obj-$(CONFIG_GPIO_TWL6040) += gpio-twl6040.o
drivers/gpio/gpio-tps65912.c new file +164 -0
164 lines not on this page · raw message
Signature · 1 line
1.9.1
Re: [PATCH v7 5/5] gpio: tps65912: Add GPIO driver for the TPS65912 PMIC
Quoted 7 lines · Andrew F. Davis
This patch adds support for the TPS65912 PMIC GPIOs.
TPS65912 has five configurable GPIOs that can be used for several purposes.
Signed-off-by Andrew F. Davis <[email protected]>Reviewed-by Linus Walleij <[email protected]>
(...)
drivers/gpio/gpio-tps65912.c line 124
Quoted 3 lines
drivers/gpio/gpio-tps65912.c new file +3
-0+ gpio->tps =dev_get_drvdata (pdev->dev.parent); + gpio->gpio_chip = template_chip; + gpio->gpio_chip.dev = tps->dev;
This is now renamed .parent in linux-next. It needs to be changed if the code should compile after merge.
Yours,
Linus Walleij
Re: [PATCH v7 5/5] gpio: tps65912: Add GPIO driver for the TPS65912 PMIC
Quoted 10 lines · Linus Walleij
Quoted 7 lines · Andrew F. Davis
This patch adds support for the TPS65912 PMIC GPIOs.
TPS65912 has five configurable GPIOs that can be used for several purposes.
Signed-off-by Andrew F. Davis <[email protected]>Reviewed-by Linus Walleij <[email protected]>
Quoted 8 lines
(...)
drivers/gpio/gpio-tps65912.c line 124
Quoted 3 lines
drivers/gpio/gpio-tps65912.c new file +3
-0+ gpio->tps =dev_get_drvdata (pdev->dev.parent); + gpio->gpio_chip = template_chip; + gpio->gpio_chip.dev = tps->dev;This is now renamed .parent in linux-next. It needs to be changed if the code should compile after merge.
Are you able to make this change when you pick this up or would you like me to resend this?
Quoted 3 lines
Yours,
Linus Walleij
Re: [PATCH v7 5/5] gpio: tps65912: Add GPIO driver for the TPS65912 PMIC
Quoted 20 lines · Andrew F. Davis
Quoted 19 lines · Linus Walleij
Quoted 7 lines · Andrew F. Davis
This patch adds support for the TPS65912 PMIC GPIOs.
TPS65912 has five configurable GPIOs that can be used for several purposes.
Signed-off-by Andrew F. Davis <[email protected]>Reviewed-by Linus Walleij <[email protected]>(...)
Quoted 4 lines
drivers/gpio/gpio-tps65912.c new file +3
-0+ gpio->tps =dev_get_drvdata (pdev->dev.parent); + gpio->gpio_chip = template_chip; + gpio->gpio_chip.dev = tps->dev;
Quoted 6 lines
Quoted 3 lines
This is now renamed .parent in linux-next. It needs to be changed if the code should compile after merge.
Are you able to make this change when you pick this up or would you like me to resend this?
I guess all these need to be applied together?
It's probably best if Lee apply all and provide them on an immutable branch, and I
will apply fixes on top after pulling that in.
I recently did exactly that with an AC97 driver from ALSA SoC.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 47 lines · Andrew F. Davis
In an effort to cleanup this driver and add Device Tree support the driver has been rewritten based on new driver styles and modern kernel driver helpers. This has nearly halved the lines of code while keeping all previous functionality.
Platform file based initialization has been dropped as there is no examples of this use in the kernel.
v1 can be found here: [1] v2: [2] v3: [3] v4: [4] v5: [5] v6: [6]
Changes from v6:
- Removed compatible strings from DT sub-nodes
- Rearranged DT bindings
- Small fixesChanges from v5:
- Small formatting changes to DT Docs
- Convertedto_tps65912_gpiofrom macro to inline functionChanges from v4:
- Use mfd core to add sub-devicesChanges from v3:
- Reorganized regulator driver and related DT node
- Other small fixes as discussed in v3 threadChanges from v2:
- Split the series further into subsystemsChanges from v1:
- Split the rewrite into delete/create patches
- Several small fixes as discussed in v1 thread[1] http://www.spinics.net/lists/devicetree/msg93863.html
[2] http://www.spinics.net/lists/devicetree/msg95003.html
[3] http://www.spinics.net/lists/devicetree/msg95133.html
[4] http://www.spinics.net/lists/devicetree/msg96109.html
[5] http://www.spinics.net/lists/devicetree/msg100601.html
[6] https://lkml.org/lkml/2015/10/30/690Andrew F. Davis (5):
Documentation: tps65912: Add DT bindings for the TPS65912 PMIC
mfd: tps65912: Remove old driver in preparation for new driver
mfd: tps65912: Add driver for the TPS65912 PMIC
regulator: tps65912: Add regulator driver for the TPS65912 PMIC
gpio: tps65912: Add GPIO driver for the TPS65912 PMIC
Quoted 12 lines
Documentation/devicetree/bindings/mfd/tps65912.txt | 50 ++ drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-tps65912.c | 317 ++++----- drivers/mfd/Kconfig | 20 +- drivers/mfd/Makefile | 3 +- drivers/mfd/tps65912-core.c | 290 ++++----- drivers/mfd/tps65912-i2c.c | 219 +++---- drivers/mfd/tps65912-irq.c | 217 ------- drivers/mfd/tps65912-spi.c | 219 +++---- drivers/regulator/Kconfig | 2 +- drivers/regulator/tps65912-regulator.c | 710 +++++---------------- include/linux/mfd/tps65912.h | 208 +++---
Just waiting for the regulator Ack now, right?
Quoted 12 lines
12 files changed, 780 insertions(+), 1477 deletions(-) create mode 100644 Documentation/devicetree/bindings/mfd/tps65912.txt rewrite drivers/gpio/gpio-tps65912.c (74%) rewrite drivers/mfd/tps65912-core.c (95%) rewrite drivers/mfd/tps65912-i2c.c (93%) delete mode 100644 drivers/mfd/tps65912-irq.crewrite
drivers/mfd/tps65912-spi.c(92%) rewritedrivers/regulator/tps65912-regulator.c(94%)Signature · 1 line
1.9.1
Signature · 8 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 62 lines · Lee Jones
Quoted 47 lines · Andrew F. Davis
In an effort to cleanup this driver and add Device Tree support the driver has been rewritten based on new driver styles and modern kernel driver helpers. This has nearly halved the lines of code while keeping all previous functionality.
Platform file based initialization has been dropped as there is no examples of this use in the kernel.
v1 can be found here: [1] v2: [2] v3: [3] v4: [4] v5: [5] v6: [6]
Changes from v6:
- Removed compatible strings from DT sub-nodes
- Rearranged DT bindings
- Small fixesChanges from v5:
- Small formatting changes to DT Docs
- Convertedto_tps65912_gpiofrom macro to inline functionChanges from v4:
- Use mfd core to add sub-devicesChanges from v3:
- Reorganized regulator driver and related DT node
- Other small fixes as discussed in v3 threadChanges from v2:
- Split the series further into subsystemsChanges from v1:
- Split the rewrite into delete/create patches
- Several small fixes as discussed in v1 thread[1] http://www.spinics.net/lists/devicetree/msg93863.html
[2] http://www.spinics.net/lists/devicetree/msg95003.html
[3] http://www.spinics.net/lists/devicetree/msg95133.html
[4] http://www.spinics.net/lists/devicetree/msg96109.html
[5] http://www.spinics.net/lists/devicetree/msg100601.html
[6] https://lkml.org/lkml/2015/10/30/690Andrew F. Davis (5):
Documentation: tps65912: Add DT bindings for the TPS65912 PMIC
mfd: tps65912: Remove old driver in preparation for new driver
mfd: tps65912: Add driver for the TPS65912 PMIC
regulator: tps65912: Add regulator driver for the TPS65912 PMIC
gpio: tps65912: Add GPIO driver for the TPS65912 PMICQuoted 12 lines
Documentation/devicetree/bindings/mfd/tps65912.txt | 50 ++ drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-tps65912.c | 317 ++++----- drivers/mfd/Kconfig | 20 +- drivers/mfd/Makefile | 3 +- drivers/mfd/tps65912-core.c | 290 ++++----- drivers/mfd/tps65912-i2c.c | 219 +++---- drivers/mfd/tps65912-irq.c | 217 ------- drivers/mfd/tps65912-spi.c | 219 +++---- drivers/regulator/Kconfig | 2 +- drivers/regulator/tps65912-regulator.c | 710 +++++---------------- include/linux/mfd/tps65912.h | 208 +++---
Quoted 2 lines
Just waiting for the regulator Ack now, right?
I believe so, is there a friendly way to poke Mark Brown so this doesn't get caught in his filter? This is almost identical to the regulator he applied the other day from me so I don't imagine there will be much problem with this patch.
Quoted 13 lines
Quoted 12 lines
12 files changed, 780 insertions(+), 1477 deletions(-)create mode 100644
Documentation/devicetree/bindings/mfd/tps65912.txtrewritedrivers/gpio/gpio-tps65912.c(74%)
rewritedrivers/mfd/tps65912-core.c(95%)
rewritedrivers/mfd/tps65912-i2c.c(93%)
delete mode 100644drivers/mfd/tps65912-irq.c
rewritedrivers/mfd/tps65912-spi.c(92%)
rewritedrivers/regulator/tps65912-regulator.c(94%)--
1.9.1
Quoted 63 lines · Andrew F. Davis
Quoted 62 lines · Lee Jones
Quoted 59 lines · Andrew F. Davis
In an effort to cleanup this driver and add Device Tree support the driver has been rewritten based on new driver styles and modern kernel driver helpers. This has nearly halved the lines of code while keeping all previous functionality.
Platform file based initialization has been dropped as there is no examples of this use in the kernel.
v1 can be found here: [1] v2: [2] v3: [3] v4: [4] v5: [5] v6: [6]
Changes from v6:
- Removed compatible strings from DT sub-nodes
- Rearranged DT bindings
- Small fixesChanges from v5:
- Small formatting changes to DT Docs
- Convertedto_tps65912_gpiofrom macro to inline functionChanges from v4:
- Use mfd core to add sub-devicesChanges from v3:
- Reorganized regulator driver and related DT node
- Other small fixes as discussed in v3 threadChanges from v2:
- Split the series further into subsystemsChanges from v1:
- Split the rewrite into delete/create patches
- Several small fixes as discussed in v1 thread[1] http://www.spinics.net/lists/devicetree/msg93863.html
[2] http://www.spinics.net/lists/devicetree/msg95003.html
[3] http://www.spinics.net/lists/devicetree/msg95133.html
[4] http://www.spinics.net/lists/devicetree/msg96109.html
[5] http://www.spinics.net/lists/devicetree/msg100601.html
[6] https://lkml.org/lkml/2015/10/30/690Andrew F. Davis (5):
Documentation: tps65912: Add DT bindings for the TPS65912 PMIC
mfd: tps65912: Remove old driver in preparation for new driver
mfd: tps65912: Add driver for the TPS65912 PMIC
regulator: tps65912: Add regulator driver for the TPS65912 PMIC
gpio: tps65912: Add GPIO driver for the TPS65912 PMICDocumentation/devicetree/bindings/mfd/tps65912.txt | 50 ++ drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-tps65912.c | 317 ++++----- drivers/mfd/Kconfig | 20 +- drivers/mfd/Makefile | 3 +- drivers/mfd/tps65912-core.c | 290 ++++----- drivers/mfd/tps65912-i2c.c | 219 +++---- drivers/mfd/tps65912-irq.c | 217 ------- drivers/mfd/tps65912-spi.c | 219 +++---- drivers/regulator/Kconfig | 2 +- drivers/regulator/tps65912-regulator.c | 710 +++++---------------- include/linux/mfd/tps65912.h | 208 +++---
Quoted 7 lines
Quoted 2 lines
Just waiting for the regulator Ack now, right?
I believe so, is there a friendly way to poke Mark Brown so this doesn't get caught in his filter? This is almost identical to the regulator he applied the other day from me so I don't imagine there will be much problem with this patch.
Just repost the set with all the remaining Acks and explain in the cover letter that you're only missing one Ack. I can prod Mark from that point.
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
12 files changed, 780 insertions(+), 1477 deletions(-) create mode 100644 Documentation/devicetree/bindings/mfd/tps65912.txt rewrite drivers/gpio/gpio-tps65912.c (74%) rewrite drivers/mfd/tps65912-core.c (95%) rewrite drivers/mfd/tps65912-i2c.c (93%) delete mode 100644 drivers/mfd/tps65912-irq.crewrite
drivers/mfd/tps65912-spi.c(92%) rewritedrivers/regulator/tps65912-regulator.c(94%)
Signature · 8 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Mark Brown
maintainerQuoted 15 lines · Lee Jones
Quoted 4 lines · Andrew F. Davis
Documentation/devicetree/bindings/mfd/tps65912.txt | 50 ++ drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-tps65912.c | 317 ++++----- drivers/mfd/Kconfig | 20 +-Quoted 8 lines
drivers/mfd/Makefile | 3 +- drivers/mfd/tps65912-core.c | 290 ++++----- drivers/mfd/tps65912-i2c.c | 219 +++---- drivers/mfd/tps65912-irq.c | 217 ------- drivers/mfd/tps65912-spi.c | 219 +++---- drivers/regulator/Kconfig | 2 +- drivers/regulator/tps65912-regulator.c | 710 +++++---------------- include/linux/mfd/tps65912.h | 208 +++---
Quoted 1 line
Just waiting for the regulator Ack now, right?
No, you also need to work out what to do about the GPIO driver not building in -next due to interface changes in gpiolib.
Quoted 16 lines · Mark Brown
Quoted 14 lines · Lee Jones
Quoted 12 lines · Andrew F. Davis
Documentation/devicetree/bindings/mfd/tps65912.txt | 50 ++ drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-tps65912.c | 317 ++++----- drivers/mfd/Kconfig | 20 +- drivers/mfd/Makefile | 3 +- drivers/mfd/tps65912-core.c | 290 ++++----- drivers/mfd/tps65912-i2c.c | 219 +++---- drivers/mfd/tps65912-irq.c | 217 ------- drivers/mfd/tps65912-spi.c | 219 +++---- drivers/regulator/Kconfig | 2 +- drivers/regulator/tps65912-regulator.c | 710 +++++---------------- include/linux/mfd/tps65912.h | 208 +++---
Quoted 5 lines
Quoted 1 line
Just waiting for the regulator Ack now, right?
No, you also need to work out what to do about the GPIO driver not building in -next due to interface changes in gpiolib.
As all of this driver should be taken though the MFD tree how can this gpiolib change be handled? If we have gpio.parent it will not build on MFD, with gpio.dev it will fail to build when the changes are merged from the gpio subsystem. As the change has not been merged into linux-next as far a I can tell maybe this should be taken as is, then when the gpiolib change is made this can be changed with all the other drivers?
Mark Brown
maintainerQuoted 7 lines · Andrew F. Davis
As all of this driver should be taken though the MFD tree how can this gpiolib change be handled? If we have gpio.parent it will not build on MFD, with gpio.dev it will fail to build when the changes are merged from the gpio subsystem. As the change has not been merged into linux-next as far a I can tell maybe this should be taken as is, then when the gpiolib change is made this can be changed with all the other drivers?
Do a cross tree merge in one direction or the other between MFD and GPIO.
Quoted 11 lines · Mark Brown
Quoted 7 lines · Andrew F. Davis
As all of this driver should be taken though the MFD tree how can this gpiolib change be handled? If we have gpio.parent it will not build on MFD, with gpio.dev it will fail to build when the changes are merged from the gpio subsystem. As the change has not been merged into linux-next as far a I can tell maybe this should be taken as is, then when the gpiolib change is made this can be changed with all the other drivers?
Do a cross tree merge in one direction or the other between MFD and GPIO.
If Lee makes an immutable branch with this stuff on it I can pull that in and put a fix on top of it (like I recently did with the ASoC AC97 codec). I have "only" renamed
the .dev field of struct gpio_chip to .parent but I'm bombing out another 150 or so patches today, ridding all GPIO drivers in the kernel of container_of().
A bit painful but nothing to what tglx has gone through for refactoring IRQ chips...
Yours,
Linus Walleij
Quoted 20 lines · Linus Walleij
Quoted 11 lines · Mark Brown
Quoted 7 lines · Andrew F. Davis
As all of this driver should be taken though the MFD tree how can this gpiolib change be handled? If we have gpio.parent it will not build on MFD, with gpio.dev it will fail to build when the changes are merged from the gpio subsystem. As the change has not been merged into linux-next as far a I can tell maybe this should be taken as is, then when the gpiolib change is made this can be changed with all the other drivers?
Do a cross tree merge in one direction or the other between MFD and GPIO.
If Lee makes an immutable branch with this stuff on it I can pull that in and put a fix on top of it (like I recently did with the ASoC AC97 codec). I have "only" renamed
the .dev field of structgpio_chipto .parent but I'm bombing out another 150 or so patches today, ridding all GPIO drivers in the kernel ofcontainer_of().
Quoted 3 lines
A bit painful but nothing to what tglx has gone through for refactoring IRQ chips...
Is there anything I can do to help this along? This series and the tps65086 series have been blocked for months on trivial issues. (Not sure why the tps65086 hasn't been taken, it doesn't have this problem, I'd be OK with this getting stalled for a bit longer if someone could look at the other one)
Quoted 6 lines · Andrew F. Davis
Is there anything I can do to help this along? This series and the tps65086 series have been blocked for months on trivial issues. (Not sure why the tps65086 hasn't been taken, it doesn't have this problem, I'd be OK with this getting stalled for a bit longer if someone could look at the other one)
Lee can you merge the core driver if it's OK? Then we have includes etc in place to merge subdrivers for the next merge window.
Yours,
Linus Walleij
Quoted 9 lines · Linus Walleij
Quoted 6 lines · Andrew F. Davis
Is there anything I can do to help this along? This series and the tps65086 series have been blocked for months on trivial issues. (Not sure why the tps65086 hasn't been taken, it doesn't have this problem, I'd be OK with this getting stalled for a bit longer if someone could look at the other one)
Quoted 3 lines
Lee can you merge the core driver if it's OK? Then we have includes etc in place to merge subdrivers for the next merge window.
It's made more complex than that, due to patch 2 removing code from all subsystems. We probably need to take this in in its entirety, no?
Signature · 8 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 11 lines · Lee Jones
Quoted 9 lines · Linus Walleij
Quoted 6 lines · Andrew F. Davis
Is there anything I can do to help this along? This series and the tps65086 series have been blocked for months on trivial issues. (Not sure why the tps65086 hasn't been taken, it doesn't have this problem, I'd be OK with this getting stalled for a bit longer if someone could look at the other one)
Quoted 6 lines
Quoted 3 lines
Lee can you merge the core driver if it's OK? Then we have includes etc in place to merge subdrivers for the next merge window.
It's made more complex than that, due to patch 2 removing code from all subsystems. We probably need to take this in in its entirety, no?
You know way better than me :) go ahead with the best solution from the MFD point of view I'd say.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html