Add support for the TI TPS65086 PMIC
Subsystems (4)
v5 cover Add support for the TI TPS65086 PMIC
This series adds support for the TPS65086 PMIC. It is a MFD with an I2C interface, several regulators and load switches, and a GPO controller.
v1 can be found here: [1] v2: [2] v3: [3] v4: [4]
Changes from v4:
- Typo fixes in bindings
- Regulator driver is now just an update stub
- Use .parent in GPIO driver
Changes from v3:
- Removed compatible strings from DT sub-nodes
- Rearranged DT bindings
- Small fixes
Changes from v2:
- Use DT match callback in regulator
- Typo fixes
Changes from v1:
- Split up DT Docs into separate patches
- Use mfd core to instantiate sub-devices
- Several small fixes as discussed in v1 thread
[1] http://www.spinics.net/lists/devicetree/msg98403.html
[2] http://www.spinics.net/lists/kernel/msg2111345.html
[3] https://lkml.org/lkml/2015/11/4/393
[4] http://www.spinics.net/lists/devicetree/msg103186.html
Andrew F. Davis (4):
Documentation: tps65086: Add DT bindings for the TPS65086 PMIC
mfd: tps65086: Add driver for the TPS65086 PMIC
regulator: tps65086: Update regulator driver for the TPS65086 PMIC
gpio: tps65086: Add GPO driver for the TPS65086 PMIC
Documentation/devicetree/bindings/mfd/tps65086.txt | 55 ++++++++ drivers/gpio/Kconfig | 6 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-tps65086.c | 144 ++++++++++++++++++++ drivers/mfd/Kconfig | 13 ++ drivers/mfd/Makefile | 1 + drivers/mfd/tps65086.c | 150 +++++++++++++++++++++ drivers/regulator/tps65086-regulator.c | 7 +- include/linux/mfd/tps65086.h | 118 ++++++++++++++++ 9 files changed, 492 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/mfd/tps65086.txt create mode 100644 drivers/gpio/gpio-tps65086.c create mode 100644 drivers/mfd/tps65086.c create mode 100644 include/linux/mfd/tps65086.h
Signature · 1 line
1.9.1
PATCH v5 1/4 Documentation: tps65086: Add DT bindings for the TPS65086 PMIC
The TPS65086 PMIC contains several regulators and a GPO controller. Add bindings for the TPS65086 PMIC.
--- Documentation/devicetree/bindings/mfd/tps65086.txt | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/tps65086.txt
Documentation/devicetree/bindings/mfd/tps65086.txt new file +55 -0
@@ -0,0 +1,55 @@ +* TPS65086 Power Management Integrated Circuit (PMIC) bindings + +Required properties: + - compatible : Should be "ti,tps65086". + - reg : I2C slave address. + - interrupt-parent : Phandle to 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: buck[1-6], + ldoa[1-3], swa1, swb[1-2], and vtt. Each child + node is defined using the standard binding for + regulators and the optional regulator properties + defined below. + +Optional regulator properties: + - ti,regulator-step-size-25mv : This is applicable for buck[1,2,6], set this + if the regulator is factory set with a 25mv + step voltage mapping. + - ti,regulator-decay : This is applicable for buck[1-6], set this if + the output needs to decay, default is for + the output to slew down. + +Example: + + pmic: tps65086@5e { + compatible = "ti,tps65086"; + reg = <0x5e>; + interrupt-parent = <&gpio1>; + interrupts = <28 IRQ_TYPE_LEVEL_LOW>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-controller; + #gpio-cells = <2>; + + regulators { + buck1 { + regulator-name = "vcc1"; + regulator-min-microvolt = <1600000>; + regulator-max-microvolt = <1600000>; + regulator-boot-on; + ti,regulator-decay; + ti,regulator-step-size-25mv; + }; + }; + };
Signature · 1 line
1.9.1
PATCH v5 2/4 mfd: tps65086: Add driver for the TPS65086 PMIC
In reply to Andrew F. DavisAdd support for the TPS65912 device. It provides communication through I2C and contains the following components:
- Regulators
- Load switches
- GPO controller
--- drivers/mfd/Kconfig | 13 ++++ drivers/mfd/Makefile | 1 + drivers/mfd/tps65086.c | 150 +++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/tps65086.h | 118 ++++++++++++++++++++++++++++++++++ 4 files changed, 282 insertions(+) create mode 100644 drivers/mfd/tps65086.c create mode 100644 include/linux/mfd/tps65086.h
drivers/mfd/Kconfig +13 -0
@@ -1106,6 +1106,19 @@ config TPS6507X This driver can also be built as a module. If so, the module will be called tps6507x. +config MFD_TPS65086 + tristate "TI TPS65086 Power Management Integrated Chips (PMICs)" + select REGMAP + select REGMAP_IRQ + select REGMAP_I2C + depends on I2C + help + If you say yes here you get support for the TPS65086 series of + Power Management chips. + This driver provides common support for accessing the device, + additional drivers must be enabled in order to use the + functionality of the device. + config TPS65911_COMPARATOR tristate
drivers/mfd/Makefile +1 -0
@@ -67,6 +67,7 @@ obj-$(CONFIG_MFD_WM8994) += wm8994.o obj-$(CONFIG_TPS6105X) += tps6105x.o obj-$(CONFIG_TPS65010) += tps65010.o obj-$(CONFIG_TPS6507X) += tps6507x.o +obj-$(CONFIG_MFD_TPS65086) += tps65086.o obj-$(CONFIG_MFD_TPS65217) += tps65217.o obj-$(CONFIG_MFD_TPS65218) += tps65218.o obj-$(CONFIG_MFD_TPS65910) += tps65910.o
drivers/mfd/tps65086.c new file +150 -0
150 lines not on this page · raw message
include/linux/mfd/tps65086.h new file +118 -0
118 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v5 3/4 regulator: tps65086: Update regulator driver for the TPS65086 PMIC
In reply to Andrew F. DavisMake changes to allow this driver to work with the updated TPS65086 core driver and bindings.
--- drivers/regulator/tps65086-regulator.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/regulator/tps65086-regulator.c +4 -3
@@ -16,10 +16,9 @@*/ #include <linux/module.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/regulator/driver.h> -#include <linux/regulator/of_regulator.h> #include <linux/mfd/tps65086.h>
@@ -31,6 +30,7 @@ enum tps65086_regulators { BUCK1, BUCK2, BUCK3, BUCK4, BUCK5, BUCK6, LDOA1, .desc = { \ .name = _name, \ .of_match = of_match_ptr(_of), \ + .regulators_node = "regulators", \ .of_parse_cb = tps65086_of_parse_cb, \ .id = _id, \ .ops = ®_ops, \
@@ -54,6 +54,7 @@ enum tps65086_regulators { BUCK1, BUCK2, BUCK3, BUCK4, BUCK5, BUCK6, LDOA1, .desc = { \ .name = _name, \ .of_match = of_match_ptr(_of), \ + .regulators_node = "regulators", \ .of_parse_cb = tps65086_of_parse_cb, \ .id = _id, \ .ops = &switch_ops, \
@@ -213,8 +214,8 @@ static int tps65086_regulator_probe(struct platform_device *pdev)platform_set_drvdata (pdev, tps); config.dev = &pdev->dev; + config.dev->of_node = tps->dev->of_node; config.driver_data = tps; - config.of_node = pdev->dev.of_node; config.regmap = tps->regmap;for (i =0 ; i <ARRAY_SIZE (regulators); i++) {
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 v5 4/4 gpio: tps65086: Add GPO driver for the TPS65086 PMIC
In reply to Andrew F. DavisAdd support for the TPS65086 PMIC GPOs.
TPS65086 has four configurable GPOs that can be used for several purposes. These are output only.
--- drivers/gpio/Kconfig | 6 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-tps65086.c | 144 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 151 insertions(+) create mode 100644 drivers/gpio/gpio-tps65086.c
drivers/gpio/Kconfig +6 -0
@@ -838,6 +838,12 @@ config GPIO_TIMBERDALE ---help--- Add support for the GPIO IP in the timberdale FPGA. +config GPIO_TPS65086 + tristate "TI TPS65086 GPO" + depends on MFD_TPS65086 + help + This driver supports the GPO on TI TPS65086x PMICs. + config GPIO_TPS6586X bool "TPS6586X GPIO" depends on MFD_TPS6586X
drivers/gpio/Makefile +1 -0
@@ -95,6 +95,7 @@ obj-$(CONFIG_GPIO_TC3589X) += gpio-tc3589x.o obj-$(CONFIG_ARCH_TEGRA) += gpio-tegra.o obj-$(CONFIG_GPIO_TIMBERDALE) += gpio-timberdale.o obj-$(CONFIG_GPIO_PALMAS) += gpio-palmas.o +obj-$(CONFIG_GPIO_TPS65086) += gpio-tps65086.o obj-$(CONFIG_GPIO_TPS6586X) += gpio-tps6586x.o obj-$(CONFIG_GPIO_TPS65910) += gpio-tps65910.o obj-$(CONFIG_GPIO_TPS65912) += gpio-tps65912.o
drivers/gpio/gpio-tps65086.c new file +144 -0
144 lines not on this page · raw message
Signature · 1 line
1.9.1
kbuild test robot
build botRe: [PATCH v5 4/4] gpio: tps65086: Add GPO driver for the TPS65086 PMIC
reproduce:
Hi Andrew,
[auto build test ERROR on next-20151127]
[cannot apply to ljones-mfd/for-mfd-next gpio/for-next v4.4-rc3 v4.4-rc2 v4.4-rc1 v4.4-rc3]
url: https://github.com/0day-ci/linux/commits/Andrew-F-Davis/Documentation-tps65086-Add-DT-bindings-for-the-TPS65086-PMIC/20151202-024903 config: i386-allmodconfig (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=i386
All errors (new ones prefixed by >>):
drivers/gpio/gpio-tps65086.c: In function 'tps65086_gpio_probe':
>> drivers/gpio/gpio-tps65086.c:106:12: error: 'struct gpio_chip' has no member named 'parent'
gpio->chip.parent = gpio->tps->dev;
^vim +106 drivers/gpio/gpio-tps65086.c
100 return -ENOMEM;
101
102 platform_set_drvdata(pdev, gpio);
103
104 gpio->tps = dev_get_drvdata(pdev->dev.parent);
105 gpio->chip = template_chip;
> 106 gpio->chip.parent = gpio->tps->dev;
107
108 ret = gpiochip_add(&gpio->chip);
109 if (ret < 0) {
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Re: [PATCH v5 4/4] gpio: tps65086: Add GPO driver for the TPS65086 PMIC
Quoted 26 lines · kbuild test robot
Hi Andrew,
[auto build test ERROR on next-20151127]
[cannot apply to ljones-mfd/for-mfd-next gpio/for-next v4.4-rc3 v4.4-rc2 v4.4-rc1 v4.4-rc3]url: https://github.com/0day-ci/linux/commits/Andrew-F-Davis/Documentation-tps65086-Add-DT-bindings-for-the-TPS65086-PMIC/20151202-024903 config: i386-allmodconfig (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=i386All errors (new ones prefixed by >>):
drivers/gpio/gpio-tps65086.c: In function 'tps65086_gpio_probe':Quoted 1 line
Quoted 1 line
drivers/gpio/gpio-tps65086.c:106:12: error: 'structgpio_chip' has no member named 'parent'gpio->chip.parent = gpio->tps->dev; ^vim +106
drivers/gpio/gpio-tps65086.c100 return -ENOMEM; 101 102 platform_set_drvdata(pdev, gpio); 103 104 gpio->tps = dev_get_drvdata(pdev->dev.parent); 105 gpio->chip = template_chip;
Quoted 9 lines
Quoted 1 line
106
gpio->chip.parent=gpio->tps->dev;107 108 ret = gpiochip_add(&gpio->chip); 109 if (ret < 0) {---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
I'm probably going to drop the GPIO support in the next series push, this patch was NAK'd for not using .parent, now we have this. I will wait till the GPIO subsystem is stable and push this separately then.