Re: [PATCH v3 07/16] iio: adc: axp20x_adc: add support for AXP813 ADC

2018-01-22 Thread Quentin Schulz
Hi Jonathan, On Sun, Jan 21, 2018 at 12:26:55PM +, Jonathan Cameron wrote: > On Mon, 15 Jan 2018 11:33:41 +0100 > Quentin Schulz wrote: > > > The X-Powers AXP813 PMIC is really close to what is already done for > > AXP20X/AXP22X. > > > > There are two pairs

[PATCH v3 03/16] iio: adc: axp20x_adc: make it possible to probe from DT

2018-01-15 Thread Quentin Schulz
with old DTs. Signed-off-by: Quentin Schulz --- drivers/iio/adc/axp20x_adc.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc/axp20x_adc.c b/drivers/iio/adc/axp20x_adc.c index 3fc1b06..3968053 100644 --- a/drivers/iio/adc/axp20x_adc.c

[PATCH v3 04/16] ARM: dtsi: axp209: add node for ADC

2018-01-15 Thread Quentin Schulz
This adds a DT node for the ADC of the PMIC so that there can be consumers of its IIO channels declaring their consumptions via DT. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/axp209.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/axp209.dtsi b/arch/arm

[PATCH v3 01/16] iio: adc: axp20x_adc: put ADC rate setting in a per-variant function

2018-01-15 Thread Quentin Schulz
To prepare for a new comer that set a different register with different values, move rate setting in a function that is specific to each AXP variant. Signed-off-by: Quentin Schulz --- drivers/iio/adc/axp20x_adc.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff

[PATCH v3 00/16] add support for AXP813 ADC and battery power supply

2018-01-15 Thread Quentin Schulz
pinctrl DT node, v2: - introduce data structure instead of ID for variant specific code in battery driver, - add DT binding for ADC driver, - make mfd probe the ADC driver via DT as well so that its IIO channels can be consumed by other drivers via DT mapping, Thanks, Quentin Quentin Schulz

[PATCH v3 07/16] iio: adc: axp20x_adc: add support for AXP813 ADC

2018-01-15 Thread Quentin Schulz
AXP20X/AXP22X. GPIO0 can be used as an ADC (measuring Volts) unlike for AXP22X. The scales to apply to the different inputs are unlike the ones from AXP20X and AXP22X. Signed-off-by: Quentin Schulz Acked-by: Jonathan Cameron --- drivers/iio/adc/axp20x_adc.c | 123

[PATCH v3 02/16] dt-bindings: iio: adc: add binding for X-Powers AXP PMICs ADC

2018-01-15 Thread Quentin Schulz
X-Powers PMICs have several ADC channels that can be used for different purposes, e.g. PMIC internal temperature, battery voltage or AC current. This is the documentation for AXP209, AXP221/223 and AXP813 ADC bindings. Signed-off-by: Quentin Schulz Reviewed-by: Rob Herring --- Documentation

[PATCH v3 11/16] dt-bindings: power: supply: axp20x: add AXP813 battery DT binding

2018-01-15 Thread Quentin Schulz
The AXP813 can have a battery as power supply, so let's add it to the list of compatibles. Signed-off-by: Quentin Schulz Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/power/supply/axp20x_battery.txt | 8 +++ 1 file changed, 4 insertions(+), 4 deletions(-) diff --

[PATCH v3 09/16] mfd: axp20x: probe axp20x_adc driver for AXP813

2018-01-15 Thread Quentin Schulz
This makes the axp20x_adc driver probe with platform device id "axp813-adc". Signed-off-by: Quentin Schulz --- drivers/mfd/axp20x.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index 1977a03..e5516aa 100644 --- a/d

[PATCH v3 12/16] power: supply: axp20x_battery: add support for AXP813

2018-01-15 Thread Quentin Schulz
the PMIC is valid. Signed-off-by: Quentin Schulz --- drivers/power/supply/axp20x_battery.c | 42 - 1 file changed, 42 insertions(+) diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c index d73c78f..e75fa90 100644 --- a/drivers

[PATCH v3 13/16] mfd: axp20x: add battery power supply cell for AXP813

2018-01-15 Thread Quentin Schulz
As axp20x-battery-power-supply now supports AXP813, add a cell for it. Signed-off-by: Quentin Schulz Acked-for-MFD-by: Lee Jones --- drivers/mfd/axp20x.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index e5516aa..aaf2acb 100644 --- a

[PATCH v3 10/16] power: supply: axp20x_battery: use data structure instead of ID for

2018-01-15 Thread Quentin Schulz
and update the code to use it. Signed-off-by: Quentin Schulz --- drivers/power/supply/axp20x_battery.c | 100 +-- 1 file changed, 66 insertions(+), 34 deletions(-) diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c index 7494f0f.

[PATCH v3 14/16] ARM: dtsi: axp81x: add battery power supply subnode

2018-01-15 Thread Quentin Schulz
supply subnode for AXP81X PMIC. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/axp81x.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/axp81x.dtsi b/arch/arm/boot/dts/axp81x.dtsi index 6b5e7bc..1b05c7f 100644 --- a/arch/arm/boot/dts/axp81x.dtsi +++ b/arch/arm

[PATCH v3 15/16] ARM: dtsi: sun8i: a711: enable battery power supply subnode

2018-01-15 Thread Quentin Schulz
The TBS A711 has an AXP813 PMIC and a soldered battery, thus, we enable the battery power supply subnode in its Device Tree. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711

[PATCH v3 08/16] ARM: dtsi: axp81x: add node for ADC

2018-01-15 Thread Quentin Schulz
This adds a DT node for the ADC of the PMIC so that there can be consumers of its IIO channels declaring their consumptions via DT. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/axp81x.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/axp81x.dtsi b/arch/arm

[PATCH v3 05/16] ARM: dtsi: axp22x: add node for ADC

2018-01-15 Thread Quentin Schulz
This adds a DT node for the ADC of the PMIC so that there can be consumers of its IIO channels declaring their consumptions via DT. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/axp22x.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/axp22x.dtsi b/arch/arm

[PATCH v3 06/16] mfd: axp20x: make AXP209/22x cells probe their ADC via DT

2018-01-15 Thread Quentin Schulz
This makes AXP209 and AXP22x ADCs probe first via DT and then by fallback via platform. Signed-off-by: Quentin Schulz --- drivers/mfd/axp20x.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index e94c72c..1977a03 100644 --- a

[PATCH v3 16/16] ARM: dtsi: axp81x: remove IP name from DT node name

2018-01-15 Thread Quentin Schulz
The DT node should be named after its functionality and not after the IP it's defining. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/axp81x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/axp81x.dtsi b/arch/arm/boot/dts/axp81x.dtsi index 1b

[PATCH v2 04/16] ARM: dtsi: axp209: add node for ADC

2018-01-09 Thread Quentin Schulz
This adds a DT node for the ADC of the PMIC so that there can be consumers of its IIO channels declaring their consumptions via DT. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/axp209.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/axp209.dtsi b/arch/arm

[PATCH v2 05/16] ARM: dtsi: axp22x: add node for ADC

2018-01-09 Thread Quentin Schulz
This adds a DT node for the ADC of the PMIC so that there can be consumers of its IIO channels declaring their consumptions via DT. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/axp22x.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/axp22x.dtsi b/arch/arm

[PATCH v2 01/16] iio: adc: axp20x_adc: put ADC rate setting in a per-variant function

2018-01-09 Thread Quentin Schulz
To prepare for a new comer that set a different register with different values, move rate setting in a function that is specific to each AXP variant. Signed-off-by: Quentin Schulz --- drivers/iio/adc/axp20x_adc.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff

[PATCH v2 02/16] dt-bindings: iio: adc: add binding for X-Powers AXP PMICs ADC

2018-01-09 Thread Quentin Schulz
X-Powers PMICs have several ADC channels that can be used for different purposes, e.g. PMIC internal temperature, battery voltage or AC current. This is the documentation for AXP209, AXP221/223 ADC bindings. Signed-off-by: Quentin Schulz --- Documentation/devicetree/bindings/iio/adc

[PATCH v2 00/16] add support for AXP813 ADC and battery power supply

2018-01-09 Thread Quentin Schulz
well so that its IIO channels can be consumed by other drivers via DT mapping, Thanks, Quentin Quentin Schulz (16): iio: adc: axp20x_adc: put ADC rate setting in a per-variant function dt-bindings: iio: adc: add binding for X-Powers AXP PMICs ADC iio: adc: axp20x_adc: make it possible to

[PATCH v2 14/16] mfd: axp20x: add battery power supply cell for AXP813

2018-01-09 Thread Quentin Schulz
As axp20x-battery-power-supply now supports AXP813, add a cell for it. Signed-off-by: Quentin Schulz --- drivers/mfd/axp20x.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index d112414..1175091 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers

[PATCH v2 06/16] mfd: axp20x: make AXP209/22x cells probe their ADC via DT

2018-01-09 Thread Quentin Schulz
This makes AXP209 and AXP22x ADCs probe first via DT and then by fallback via platform. Signed-off-by: Quentin Schulz --- drivers/mfd/axp20x.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index d8c92fb..e0cbaea 100644 --- a

[PATCH v2 15/16] ARM: dtsi: axp81x: add battery power supply subnode

2018-01-09 Thread Quentin Schulz
supply subnode for AXP81X PMIC. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/axp81x.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/axp81x.dtsi b/arch/arm/boot/dts/axp81x.dtsi index dd25bfe..5fb396e 100644 --- a/arch/arm/boot/dts/axp81x.dtsi +++ b/arch/arm

[PATCH v2 07/16] dt-bindings: iio: adc: axp20x_adc: add AXP813 variant

2018-01-09 Thread Quentin Schulz
AXP813 is now supported so add documentation for this compatible. Signed-off-by: Quentin Schulz --- Documentation/devicetree/bindings/iio/adc/axp20x_adc.txt | 9 +- 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/adc/axp20x_adc.txt b/Documentation

[PATCH v2 10/16] mfd: axp20x: probe axp20x_adc driver for AXP813

2018-01-09 Thread Quentin Schulz
This makes the axp20x_adc driver probe with platform device id "axp813-adc". Signed-off-by: Quentin Schulz --- drivers/mfd/axp20x.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index e0cbaea..d112414 100644 --- a/d

[PATCH v2 16/16] ARM: dtsi: sun8i: a711: enable battery power supply subnode

2018-01-09 Thread Quentin Schulz
The TBS A711 has an AXP813 PMIC and a soldered battery, thus, we enable the battery power supply subnode in its Device Tree. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711

[PATCH v2 09/16] ARM: dtsi: axp81x: add node for ADC

2018-01-09 Thread Quentin Schulz
This adds a DT node for the ADC of the PMIC so that there can be consumers of its IIO channels declaring their consumptions via DT. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/axp81x.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/axp81x.dtsi b/arch/arm

[PATCH v2 08/16] iio: adc: axp20x_adc: add support for AXP813 ADC

2018-01-09 Thread Quentin Schulz
AXP20X/AXP22X. GPIO0 can be used as an ADC (measuring Volts) unlike for AXP22X. The scales to apply to the different inputs are unlike the ones from AXP20X and AXP22X. Signed-off-by: Quentin Schulz --- drivers/iio/adc/axp20x_adc.c | 123 - include/linux/mfd

[PATCH v2 13/16] power: supply: axp20x_battery: add support for AXP813

2018-01-09 Thread Quentin Schulz
the PMIC is valid. Signed-off-by: Quentin Schulz --- drivers/power/supply/axp20x_battery.c | 42 - 1 file changed, 42 insertions(+) diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c index d73c78f..dad72a5 100644 --- a/drivers

[PATCH v2 11/16] power: supply: axp20x_battery: use data structure instead of ID for

2018-01-09 Thread Quentin Schulz
and update the code to use it. Signed-off-by: Quentin Schulz --- drivers/power/supply/axp20x_battery.c | 100 +-- 1 file changed, 66 insertions(+), 34 deletions(-) diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c index 7494f0f.

[PATCH v2 03/16] iio: adc: axp20x_adc: make it possible to probe from DT

2018-01-09 Thread Quentin Schulz
with old DTs. Signed-off-by: Quentin Schulz --- drivers/iio/adc/axp20x_adc.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc/axp20x_adc.c b/drivers/iio/adc/axp20x_adc.c index 3fc1b06..f8c4c62 100644 --- a/drivers/iio/adc/axp20x_adc.c

[PATCH v2 12/16] dt-bindings: power: supply: axp20x: add AXP813 battery DT binding

2018-01-09 Thread Quentin Schulz
The AXP813 can have a battery as power supply, so let's add it to the list of compatibles. Signed-off-by: Quentin Schulz --- Documentation/devicetree/bindings/power/supply/axp20x_battery.txt | 8 +++ 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/devic

Re: [PATCH] pinctrl: axp209: add CONFIG_OF dependency

2017-12-15 Thread Quentin Schulz
209 PMIC pinctrl and GPIO Support" > - depends on MFD_AXP20X > + depends on MFD_AXP20X && OF > help > AXP PMICs provides multiple GPIOs that can be muxed for different > functions. This driver bundles a pinctrl driver to select the fu

[PATCH] pinctrl: axp209: add missing Kconfig dependencies

2017-12-14 Thread Quentin Schulz
This fixes some compilation issues. GENERIC_PINCONF and OF at least for pinconf_generic_dt_*, PINMUX at least for pinmux_ops and GPIOLIB for at least gpio_chip. Fixes: 23f75d7dfa92 ("pinctrl: axp209: add pinctrl features") Reported-by: Randy Dunlab Signed-off-by: Quentin Schulz --

[PATCH] pinctrl: axp209: dereference pointer after it's been set

2017-12-13 Thread Quentin Schulz
pport for AXP813 GPIOs") Signed-off-by: Quentin Schulz Reported-by: Mylène Josserand --- drivers/pinctrl/pinctrl-axp209.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-axp209.c b/drivers/pinctrl/pinctrl-axp209.c index 22d3bb0bf927..510a2821e

Re: [PATCH 5/8] power: supply: axp20x_battery: add support for AXP813

2017-12-11 Thread Quentin Schulz
Hi Jonathan, On 10/12/2017 17:49, Jonathan Cameron wrote: > On Mon, 4 Dec 2017 15:12:51 +0100 > Quentin Schulz wrote: > >> The X-Powers AXP813 PMIC has got some slight differences from >> AXP20X/AXP22X PMICs: >> - the maximum voltage supplied by the PMIC is 4.35 i

Re: [PATCH 2/8] iio: adc: axp20x_adc: add support for AXP813 ADC

2017-12-11 Thread Quentin Schulz
Hi Jonathan, On 10/12/2017 17:36, Jonathan Cameron wrote: > On Mon, 4 Dec 2017 15:12:48 +0100 > Quentin Schulz wrote: > >> The X-Powers AXP813 PMIC is really close to what is already done for >> AXP20X/AXP22X. >> >> There are two pairs of bits to set the

Re: [PATCH v5 8/9] pinctrl: axp209: add support for AXP813 GPIOs

2017-12-08 Thread Quentin Schulz
Hi all, There is a bug below. On 05/12/2017 15:46, Quentin Schulz wrote: > The AXP813 has only two GPIOs. GPIO0 can either be used as a GPIO, an > LDO regulator or an ADC. GPIO1 can be used either as a GPIO or an LDO > regulator. > > Moreover, the status bit of the GPIOs when i

Re: [PATCH 3/8] mfd: axp20x: probe axp20x_adc driver for AXP813

2017-12-07 Thread Quentin Schulz
Hi Chen-Yu, On 07/12/2017 09:54, Chen-Yu Tsai wrote: > On Thu, Dec 7, 2017 at 4:51 PM, Quentin Schulz > wrote: >> Hi Maxime, >> >> On 05/12/2017 09:08, Maxime Ripard wrote: >>> On Mon, Dec 04, 2017 at 03:12:49PM +0100, Quentin Schulz wrote: >>>>

Re: [PATCH 3/8] mfd: axp20x: probe axp20x_adc driver for AXP813

2017-12-07 Thread Quentin Schulz
Hi Maxime, On 05/12/2017 09:08, Maxime Ripard wrote: > On Mon, Dec 04, 2017 at 03:12:49PM +0100, Quentin Schulz wrote: >> This makes the axp20x_adc driver probe with platform device id >> "axp813-adc". >> >> Signed-off-by: Quentin Schulz >> --- &

Re: [PATCH v5 00/11] add pinmuxing support for pins in AXP209 and AXP813 PMICs

2017-12-05 Thread Quentin Schulz
Hi all, Copy pasting of the cover letter done wrong, there are only 9 patches in this patch series unlike what's specified in the title of the cover letter for this patch series. Sorry for the noise. Quentin On 05/12/2017 15:46, Quentin Schulz wrote: > The AXP209 and AXP813 PMICs have

[PATCH v5 3/9] pinctrl: axp209: add pinctrl features

2017-12-05 Thread Quentin Schulz
The X-Powers AXP209 has 3 GPIOs. GPIO0/1 can each act either as a GPIO, an ADC or a LDO regulator. GPIO2 can only act as a GPIO. This adds the pinctrl features to the driver so GPIO0/1 can be used as ADC or LDO regulator. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard --- drivers

[PATCH v5 4/9] dt-bindings: gpio: gpio-axp209: add pinctrl features

2017-12-05 Thread Quentin Schulz
The X-Powers AXP209 has 3 GPIOs. GPIO0/1 can each act either as a GPIO, an ADC or a LDO regulator. GPIO2 can only act as a GPIO. This adds the pinctrl features to the driver so GPIO0/1 can be used as ADC or LDO regulator. Signed-off-by: Quentin Schulz Acked-by: Rob Herring Acked-by: Maxime

[PATCH v5 7/9] pinctrl: axp209: add programmable ADC muxing value

2017-12-05 Thread Quentin Schulz
To prepare for patches that will add support for a new PMIC that has a different GPIO adc muxing value, add an adc_mux within axp20x_pctl structure and use it. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard --- drivers/pinctrl/pinctrl-axp209.c | 4 +++- 1 file changed, 3 insertions

[PATCH v5 9/9] mfd: axp20x: add pinctrl cell for AXP813

2017-12-05 Thread Quentin Schulz
As GPIO/pinctrl driver now supports AXP813, add a cell for it. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-by: Linus Walleij Acked-for-MFD-by: Lee Jones --- drivers/mfd/axp20x.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c

[PATCH v5 00/11] add pinmuxing support for pins in AXP209 and AXP813 PMICs

2017-12-05 Thread Quentin Schulz
register all pins within the same range instead of a range per pin, Thanks, Quentin Quentin Schulz (9): gpio: axp209: switch unsigned variables to unsigned int pinctrl: move gpio-axp209 to pinctrl pinctrl: axp209: add pinctrl features dt-bindings: gpio: gpio-axp209: add pinctrl features p

[PATCH v5 8/9] pinctrl: axp209: add support for AXP813 GPIOs

2017-12-05 Thread Quentin Schulz
The AXP813 has only two GPIOs. GPIO0 can either be used as a GPIO, an LDO regulator or an ADC. GPIO1 can be used either as a GPIO or an LDO regulator. Moreover, the status bit of the GPIOs when in input mode is not offset by 4 unlike the AXP209. Signed-off-by: Quentin Schulz Acked-by: Maxime

[PATCH v5 2/9] pinctrl: move gpio-axp209 to pinctrl

2017-12-05 Thread Quentin Schulz
To prepare the driver for the upcoming pinctrl features, move the GPIO driver AXP209 from GPIO to pinctrl subsystem. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai --- drivers/gpio/Kconfig | 6 -- drivers/gpio/Makefile

[PATCH v5 1/9] gpio: axp209: switch unsigned variables to unsigned int

2017-12-05 Thread Quentin Schulz
Checkpatch complains with the following message: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Let's make it happy by switching over to unsigned int. Signed-off-by: Quentin Schulz --- drivers/gpio/gpio-axp209.c | 13 +++-- 1 file changed, 7 i

[PATCH v5 6/9] pinctrl: axp209: add programmable gpio_status_offset

2017-12-05 Thread Quentin Schulz
To prepare for patches that will add support for a new PMIC that has a different GPIO input status register, add a gpio_status_offset within axp20x_pctl structure and use it. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai --- drivers/pinctrl/pinctrl-axp209.c | 4

[PATCH v5 5/9] pinctrl: axp209: rename everything from gpio to pctl

2017-12-05 Thread Quentin Schulz
. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard --- drivers/pinctrl/pinctrl-axp209.c | 176 +++ 1 file changed, 88 insertions(+), 88 deletions(-) diff --git a/drivers/pinctrl/pinctrl-axp209.c b/drivers/pinctrl/pinctrl-axp209.c index 48cb57dcc575

Re: [PATCH] rtc: ac100: Fix multiple race conditions

2017-12-04 Thread Quentin Schulz
(kthread+0x120/0x150) > [] (kthread) from [] (ret_from_fork+0x14/0x2c) > > Solve both issues by moving to > devm_rtc_allocate_device()/rtc_register_device() > > Signed-off-by: Alexandre Belloni Tested-by: Quentin Schulz Thanks, Quentin -- Quentin Schulz, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

[PATCH 2/8] iio: adc: axp20x_adc: add support for AXP813 ADC

2017-12-04 Thread Quentin Schulz
AXP20X/AXP22X. GPIO0 can be used as an ADC (measuring Volts) unlike for AXP22X. The scales to apply to the different inputs are unlike the ones from AXP20X and AXP22X. Signed-off-by: Quentin Schulz --- drivers/iio/adc/axp20x_adc.c | 122 - include/linux/mfd

[PATCH 8/8] ARM: dtsi: sun8i: a711: enable battery power supply subnode

2017-12-04 Thread Quentin Schulz
The TBS A711 has an AXP813 PMIC and a soldered battery, thus, we enable the battery power supply subnode in its Device Tree. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711

[PATCH 7/8] ARM: dtsi: axp81x: add battery power supply subnode

2017-12-04 Thread Quentin Schulz
supply subnode for AXP81X PMIC. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/axp81x.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/axp81x.dtsi b/arch/arm/boot/dts/axp81x.dtsi index 73b761f..f7401c3 100644 --- a/arch/arm/boot/dts/axp81x.dtsi +++ b/arch/arm

[PATCH 6/8] mfd: axp20x: add battery power supply cell for AXP813

2017-12-04 Thread Quentin Schulz
As axp20x-battery-power-supply now supports AXP813, add a cell for it. Signed-off-by: Quentin Schulz --- drivers/mfd/axp20x.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index 42e54d1..7566358 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers

[PATCH 5/8] power: supply: axp20x_battery: add support for AXP813

2017-12-04 Thread Quentin Schulz
the PMIC is valid. Signed-off-by: Quentin Schulz --- drivers/power/supply/axp20x_battery.c | 44 +++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c index 7494f0f..cb30302 100644

[PATCH 4/8] dt-bindings: power: supply: axp20x: add AXP813 battery DT binding

2017-12-04 Thread Quentin Schulz
The AXP813 can have a battery as power supply, so let's add it to the list of compatibles. Signed-off-by: Quentin Schulz --- Documentation/devicetree/bindings/power/supply/axp20x_battery.txt | 8 +++ 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/devic

[PATCH 3/8] mfd: axp20x: probe axp20x_adc driver for AXP813

2017-12-04 Thread Quentin Schulz
This makes the axp20x_adc driver probe with platform device id "axp813-adc". Signed-off-by: Quentin Schulz --- drivers/mfd/axp20x.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index 2468b43..42e54d1 100644 --- a/d

[PATCH 1/8] iio: adc: axp20x_adc: put ADC rate setting in a per-variant function

2017-12-04 Thread Quentin Schulz
To prepare for a new comer that set a different register with different values, move rate setting in a function that is specific to each AXP variant. Signed-off-by: Quentin Schulz --- drivers/iio/adc/axp20x_adc.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff

[PATCH 0/8] add support for AXP813 ADC and battery power supply

2017-12-04 Thread Quentin Schulz
e ADC driver, add the battery power supply node in axp81x node and enable it for the TBS A711 since it has a soldered battery. Q: The BananaPi M3 has two solder balls for battery, should the battery power supply node be enabled for this board as well? Thanks, Quentin Quentin Schulz (8): iio

Re: [PATCH v4 02/10] pinctrl: axp209: add pinctrl features

2017-12-04 Thread Quentin Schulz
Hi Maxime, On 01/12/2017 16:57, Maxime Ripard wrote: > On Fri, Dec 01, 2017 at 02:44:43PM +0100, Quentin Schulz wrote: >> +static void axp20x_gpio_set(struct gpio_chip *chip, unsigned offset, >> +int value) >> +{ > > checkpatch output: > WAR

[PATCH v4 00/10] add pinmuxing support for pins in AXP209 and AXP813 PMICs

2017-12-01 Thread Quentin Schulz
cations, - reorder of some patches, - register all pins within the same range instead of a range per pin, Thanks, Quentin Quentin Schulz (10): pinctrl: move gpio-axp209 to pinctrl pinctrl: axp209: add pinctrl features dt-bindings: gpio: gpio-axp209: add pinctrl features pinctrl: ax

[PATCH v4 06/10] pinctrl: axp209: add programmable ADC muxing value

2017-12-01 Thread Quentin Schulz
To prepare for patches that will add support for a new PMIC that has a different GPIO adc muxing value, add an adc_mux within axp20x_pctl structure and use it. Signed-off-by: Quentin Schulz --- drivers/pinctrl/pinctrl-axp209.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH v4 07/10] pinctrl: axp209: add support for AXP813 GPIOs

2017-12-01 Thread Quentin Schulz
The AXP813 has only two GPIOs. GPIO0 can either be used as a GPIO, an LDO regulator or an ADC. GPIO1 can be used either as a GPIO or an LDO regulator. Moreover, the status bit of the GPIOs when in input mode is not offset by 4 unlike the AXP209. Signed-off-by: Quentin Schulz Acked-by: Maxime

[PATCH v4 02/10] pinctrl: axp209: add pinctrl features

2017-12-01 Thread Quentin Schulz
The X-Powers AXP209 has 3 GPIOs. GPIO0/1 can each act either as a GPIO, an ADC or a LDO regulator. GPIO2 can only act as a GPIO. This adds the pinctrl features to the driver so GPIO0/1 can be used as ADC or LDO regulator. Signed-off-by: Quentin Schulz --- drivers/pinctrl/pinctrl-axp209.c | 306

[PATCH v4 03/10] dt-bindings: gpio: gpio-axp209: add pinctrl features

2017-12-01 Thread Quentin Schulz
The X-Powers AXP209 has 3 GPIOs. GPIO0/1 can each act either as a GPIO, an ADC or a LDO regulator. GPIO2 can only act as a GPIO. This adds the pinctrl features to the driver so GPIO0/1 can be used as ADC or LDO regulator. Signed-off-by: Quentin Schulz Acked-by: Rob Herring --- Documentation

[PATCH v4 01/10] pinctrl: move gpio-axp209 to pinctrl

2017-12-01 Thread Quentin Schulz
To prepare the driver for the upcoming pinctrl features, move the GPIO driver AXP209 from GPIO to pinctrl subsystem. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai --- drivers/gpio/Kconfig | 6 +- drivers/gpio/Makefile| 1 +- drivers

[PATCH v4 08/10] mfd: axp20x: add pinctrl cell for AXP813

2017-12-01 Thread Quentin Schulz
As GPIO/pinctrl driver now supports AXP813, add a cell for it. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard --- drivers/mfd/axp20x.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index 2468b43..d8c92fb 100644 --- a/drivers/mfd

[PATCH v4 04/10] pinctrl: axp209: rename everything from gpio to pctl

2017-12-01 Thread Quentin Schulz
. Signed-off-by: Quentin Schulz --- drivers/pinctrl/pinctrl-axp209.c | 180 1 file changed, 90 insertions(+), 90 deletions(-) diff --git a/drivers/pinctrl/pinctrl-axp209.c b/drivers/pinctrl/pinctrl-axp209.c index 2dc286f..6201d2b 100644 --- a/drivers/pinctrl/pinctrl

[PATCH v4 09/10] ARM: dtsi: axp81x: add GPIO DT node

2017-12-01 Thread Quentin Schulz
This adds DT node for the GPIO/pinctrl part present in AXP813/AXP818. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/axp81x.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/axp81x.dtsi b/arch/arm/boot/dts/axp81x.dtsi index 73b761f..0ef959d 100644 --- a/arch

[PATCH v4 05/10] pinctrl: axp209: add programmable gpio_status_offset

2017-12-01 Thread Quentin Schulz
To prepare for patches that will add support for a new PMIC that has a different GPIO input status register, add a gpio_status_offset within axp20x_pctl structure and use it. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai --- drivers/pinctrl/pinctrl-axp209.c | 4

[PATCH v4 10/10] ARM: dtsi: axp81x: set pinmux for GPIO0/1 when used as LDOs

2017-12-01 Thread Quentin Schulz
On AXP813/818, GPIO0 and GPIO1 can be used as LDO as (respectively) ldo_io0 and ldo_io1. Let's add the pinctrl properties to the said regulators. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/axp81x.dtsi | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/arm

Re: [PATCH v3 12/12] ARM: dtsi: axp81x: set pinmux for GPIO0/1 when used as LDOs

2017-10-04 Thread Quentin Schulz
Hi Chen-Yu, Linus, On 03/10/2017 17:08, Chen-Yu Tsai wrote: > On Tue, Oct 3, 2017 at 10:47 PM, Maxime Ripard > wrote: >> Hi Linus, >> >> On Tue, Oct 03, 2017 at 09:27:17AM +, Linus Walleij wrote: >>> On Mon, Oct 2, 2017 at 2:08 PM, Quentin Schulz >>>

[PATCH v3 04/12] pinctrl: axp209: add programmable gpio_status_offset

2017-10-02 Thread Quentin Schulz
To prepare for patches that will add support for a new PMIC that has a different GPIO input status register, add a gpio_status_offset within axp20x_pctl structure and use it. Signed-off-by: Quentin Schulz --- drivers/pinctrl/pinctrl-axp209.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

[PATCH v3 03/12] pinctrl: axp209: rename everything from gpio to pctl

2017-10-02 Thread Quentin Schulz
. Signed-off-by: Quentin Schulz --- drivers/pinctrl/pinctrl-axp209.c | 178 +++ 1 file changed, 89 insertions(+), 89 deletions(-) diff --git a/drivers/pinctrl/pinctrl-axp209.c b/drivers/pinctrl/pinctrl-axp209.c index 96ef0cc28762..3ddeba45feed 100644 --- a/drivers

[PATCH v3 06/12] mfd: axp20x: add pinctrl cell for AXP813

2017-10-02 Thread Quentin Schulz
As GPIO/pinctrl driver now supports AXP813, add a cell for it. Signed-off-by: Quentin Schulz --- drivers/mfd/axp20x.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index 2468b431bb22..d8c92fbbd170 100644 --- a/drivers/mfd/axp20x.c +++ b

[PATCH v3 05/12] pinctrl: axp209: add support for AXP813 GPIOs

2017-10-02 Thread Quentin Schulz
The AXP813 has only two GPIOs. GPIO0 can either be used as a GPIO, an LDO regulator or an ADC. GPIO1 can be used either as a GPIO or an LDO regulator. Moreover, the status bit of the GPIOs when in input mode is not offset by 4 unlike the AXP209. Signed-off-by: Quentin Schulz --- .../devicetree

[PATCH v3 07/12] ARM: dts: sun8i: a711: include axp81x dtsi

2017-10-02 Thread Quentin Schulz
This board has an AXP813 PMIC so let's include its dtsi. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/sun8i-a83t-tbs-a71

[PATCH v3 12/12] ARM: dtsi: axp81x: set pinmux for GPIO0/1 when used as LDOs

2017-10-02 Thread Quentin Schulz
On AXP813/818, GPIO0 and GPIO1 can be used as LDO as (respectively) ldo_io0 and ldo_io1. Let's add the pinctrl properties to the said regulators. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/axp81x.dtsi | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/arm

[PATCH v3 09/12] ARM: dts: sun8i: h8homlet-v2: include axp81x dtsi

2017-10-02 Thread Quentin Schulz
This board has an AXP818 PMIC so let's include its dtsi. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/sun8i-a83t-allwinner-h8homlet-v2.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t-allwinner-h8homlet-v2.dts b/arch/arm/boot/dts/sun8i

[PATCH v3 10/12] ARM: dts: sun8i: cubietruck-plus: include axp81x dtsi

2017-10-02 Thread Quentin Schulz
This board has an AXP818 PMIC so let's include its dtsi. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts b/arch/arm/boot/dts/sun8i-a83t-cubietruck-plu

[PATCH v3 11/12] ARM: dtsi: axp81x: add GPIO DT node

2017-10-02 Thread Quentin Schulz
This adds DT node for the GPIO/pinctrl part present in AXP813/AXP818. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/axp81x.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/axp81x.dtsi b/arch/arm/boot/dts/axp81x.dtsi index 73b761f850c5..f90f257130d5 100644

[PATCH v3 01/12] pinctrl: move gpio-axp209 to pinctrl

2017-10-02 Thread Quentin Schulz
To prepare the driver for the upcoming pinctrl features, move the GPIO driver AXP209 from GPIO to pinctrl subsystem. Signed-off-by: Quentin Schulz --- .../bindings/{gpio/gpio-axp209.txt => pinctrl/pinctrl-axp209.txt} | 0 drivers/gpio/Kconfig

[PATCH v3 00/12] add pinmuxing support for pins in AXP209 and AXP813 PMICs

2017-10-02 Thread Quentin Schulz
egulators, v2: - add support for AXP813 pins, - split into more patches so it is easier to follow the modifications, - reorder of some patches, - register all pins within the same range instead of a range per pin, [1] https://www.spinics.net/lists/arm-kernel/msg608384.html Thanks, Quentin Q

[PATCH v3 02/12] pinctrl: axp209: add pinctrl features

2017-10-02 Thread Quentin Schulz
The X-Powers AXP209 has 3 GPIOs. GPIO0/1 can each act either as a GPIO, an ADC or a LDO regulator. GPIO2 can only act as a GPIO. This adds the pinctrl features to the driver so GPIO0/1 can be used as ADC or LDO regulator. Signed-off-by: Quentin Schulz --- .../devicetree/bindings/pinctrl

[PATCH v3 08/12] ARM: dts: sun8i: bananapi-m3: include axp81x dtsi

2017-10-02 Thread Quentin Schulz
This board has an AXP813 PMIC so let's include its dtsi. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts b/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts

Re: [PATCH v2 02/10] pinctrl: axp209: add pinctrl features (fwd)

2017-09-29 Thread Quentin Schulz
--- > Date: Fri, 29 Sep 2017 20:00:03 +0800 > From: kbuild test robot > To: kbu...@01.org > Cc: Julia Lawall > Subject: Re: [PATCH v2 02/10] pinctrl: axp209: add pinctrl features > > Hi Quentin, > > [auto build test WARNING on ] > > url: > https://github.

Re: [PATCH v2 02/10] pinctrl: axp209: add pinctrl features

2017-09-26 Thread Quentin Schulz
On 26/09/2017 15:27, Maxime Ripard wrote: > On Tue, Sep 26, 2017 at 01:08:21PM +0000, Quentin Schulz wrote: >> Hi Maxime, >> >> On 26/09/2017 15:00, Maxime Ripard wrote: >>> On Tue, Sep 26, 2017 at 12:17:12PM +, Quentin Schulz wrote: >>>> +stati

Re: [PATCH v2 03/10] pinctrl: axp209: use drv_data of pinctrl_pin_desc to store pin reg

2017-09-26 Thread Quentin Schulz
Hi Maxime, On 26/09/2017 15:01, Maxime Ripard wrote: > On Tue, Sep 26, 2017 at 12:17:13PM +0000, Quentin Schulz wrote: >> Instead of using a function to retrieve each pin's correct control >> register, use drv_data within pinctrl_pin_desc to store the ctrl reg. >> >

Re: [PATCH v2 02/10] pinctrl: axp209: add pinctrl features

2017-09-26 Thread Quentin Schulz
Hi Maxime, On 26/09/2017 15:00, Maxime Ripard wrote: > On Tue, Sep 26, 2017 at 12:17:12PM +0000, Quentin Schulz wrote: >> +static const struct axp20x_desc_pin axp209_pins[] = { >> +AXP20X_PIN(AXP20X_PINCTRL_PIN(0, "GPIO0"), >> +

Re: [PATCH v2 01/10] pinctrl: move gpio-axp209 to pinctrl

2017-09-26 Thread Quentin Schulz
Hi Maxime, On 26/09/2017 14:55, Maxime Ripard wrote: > On Tue, Sep 26, 2017 at 12:17:11PM +0000, Quentin Schulz wrote: >> To prepare the driver for the upcoming pinctrl features, move the GPIO >> driver AXP209 from GPIO to pinctrl subsystem. >> >> Signed-off-by: Quenti

[PATCH 1/2] iio: adc: sun4i-gpadc-iio: register in the thermal after registering in pm

2017-09-26 Thread Quentin Schulz
hot temperature, forcing the thermal framework to shutdown the board. Signed-off-by: Quentin Schulz --- drivers/iio/adc/sun4i-gpadc-iio.c | 34 ++-- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gp

[PATCH 2/2] iio: adc: sun4i-gpadc-iio: do not fail probing when no thermal DT node

2017-09-26 Thread Quentin Schulz
eason (waiting for other drivers for example) so check on ENODEV only. Signed-off-by: Quentin Schulz --- drivers/iio/adc/sun4i-gpadc-iio.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c index 392d47f..46

[PATCH v2 03/10] pinctrl: axp209: use drv_data of pinctrl_pin_desc to store pin reg

2017-09-26 Thread Quentin Schulz
Instead of using a function to retrieve each pin's correct control register, use drv_data within pinctrl_pin_desc to store the ctrl reg. Remove axp20x_gpio_get_reg and replace every occurrence by a get from drv_data. Signed-off-by: Quentin Schulz --- drivers/pinctrl/pinctrl-axp209.c

[PATCH v2 04/10] pinctrl: axp209: rename everything from gpio to pctl

2017-09-26 Thread Quentin Schulz
. Signed-off-by: Quentin Schulz --- drivers/pinctrl/pinctrl-axp209.c | 198 1 file changed, 99 insertions(+), 99 deletions(-) diff --git a/drivers/pinctrl/pinctrl-axp209.c b/drivers/pinctrl/pinctrl-axp209.c index 4bbcba2..4be1aca 100644 --- a/drivers/pinctrl/pinctrl

[PATCH v2 02/10] pinctrl: axp209: add pinctrl features

2017-09-26 Thread Quentin Schulz
The X-Powers AXP209 has 3 GPIOs. GPIO0/1 can each act either as a GPIO, an ADC or a LDO regulator. GPIO2 can only act as a GPIO. This adds the pinctrl features to the driver so GPIO0/1 can be used as ADC or LDO regulator. Signed-off-by: Quentin Schulz --- Documentation/devicetree/bindings

<    1   2   3   4   5   6   7   >