[PATCH v4 04/18] iio: adc: add support for X-Powers AXP20X and AXP22X PMICs ADCs

2017-03-15 Thread Quentin Schulz
c.c new file mode 100644 index 000..11e1771 --- /dev/null +++ b/drivers/iio/adc/axp20x_adc.c @@ -0,0 +1,617 @@ +/* ADC driver for AXP20X and AXP22X PMICs + * + * Copyright (c) 2016 Free Electrons NextThing Co. + * Quentin Schulz + * + * This program is free software; you can redistribute it an

[PATCH v4 06/18] mfd: axp20x: add AC power supply cells for AXP22X PMICs

2017-03-15 Thread Quentin Schulz
The X-Powers AXP20X and AXP22X PMICs expose the status of AC power supply. This adds the AC power supply driver to the MFD cells of the AXP22X PMICs. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-by: Sebastian Reichel Acked-by: Chen-Yu Tsai Acked-for-MFD-by: Lee Jones

[PATCH v4 08/18] ARM: dtsi: axp22x: add AC power supply subnode

2017-03-15 Thread Quentin Schulz
The X-Powers AXP22X PMIC exposes the status of AC power supply. This adds the AC power supply subnode for the AXP22X PMIC. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Acked-by: Maxime Ripard --- v2: - changed DT node name from ac_power_supply to ac-power-supply, - removed io

[PATCH v4 07/18] ARM: dtsi: axp209: add AC power supply subnode

2017-03-15 Thread Quentin Schulz
The X-Powers AXP20X PMIC exposes the status of AC power supply, the current current and voltage supplied to the board by the AC power supply. This adds the AC power supply subnode for AXP20X PMIC. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Acked-by: Maxime Ripard --- v2: - changed

[PATCH v4 09/18] ARM: dts: sun8i: sina33: enable ACIN power supply subnode

2017-03-15 Thread Quentin Schulz
The Sinlinx SinA33 has an AXP223 PMIC and an ACIN connector, thus, we enable the ACIN power supply in its Device Tree. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Acked-by: Maxime Ripard --- arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 4 1 file changed, 4 insertions

[PATCH v4 01/18] dt-bindings: power: battery: add constant-charge-current property

2017-03-15 Thread Quentin Schulz
This adds the constant-charge-current property to the list of optional properties of the battery. The constant charge current is critical for batteries as they can't handle all charge currents. Signed-off-by: Quentin Schulz Acked-by: Rob Herring --- v4: - switch from constant-charge-cu

[PATCH v4 10/18] ARM: sun5i: chip: enable ACIN power supply subnode

2017-03-15 Thread Quentin Schulz
The NextThing Co. CHIP has an AXP209 PMIC and can be power-supplied by ACIN via the CHG-IN pin. This enables the ACIN power supply subnode in the DT. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Acked-by: Maxime Ripard --- arch/arm/boot/dts/sun5i-r8-chip.dts | 4 1 file changed

[PATCH v4 03/18] mfd: axp20x: correct name of temperature data ADC registers

2017-03-15 Thread Quentin Schulz
The registers 0x56 and 0x57 of AXP22X PMIC store the value of the internal temperature of the PMIC. This patch modifies the name of these registers from AXP22X_PMIC_ADC_H/L to AXP22X_PMIC_TEMP_H/L so their purpose is clearer. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Acked-by

[PATCH v4 00/18] add support for AXP20X and AXP22X power supply drivers

2017-03-15 Thread Quentin Schulz
ile registers, - Reordered IIO channels, now grouped by same part of the PMIC (e.g. voltage and current of the battery have the same index in different IIO types), - Added structures for specific data instead of matching on IDs, - Switched from DT IIO channels mapping to iio_map structures IIO ch

Re: [PATCH v4 00/18] add support for AXP20X and AXP22X power supply drivers

2017-03-15 Thread Quentin Schulz
Hi Lee, On 15/03/2017 13:14, Lee Jones wrote: > On Wed, 15 Mar 2017, Quentin Schulz wrote: > >> The X-Powers AXP20X and AXP22X PMICs have multiple ADCs. They expose >> information and data of the various power supplies they support such as >> ACIN, battery and VBUS. For

[PATCH v4 16/18] ARM: dtsi: axp22x: add battery power supply subnode

2017-03-15 Thread Quentin Schulz
subnode for AXP22X PMIC. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai --- v2: - changed DT node name from battery_power_supply to battery-power-supply, - removed io-channels and io-channel-names from DT (the IIO mapping is done in the IIO ADC driver now

[PATCH v4 18/18] ARM: sun5i: chip: enable battery power supply subnode

2017-03-15 Thread Quentin Schulz
The NextThing Co. CHIP has an AXP209 PMIC with battery connector. This enables the battery power supply subnode. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun5i-r8-chip.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch

[PATCH v4 17/18] ARM: dts: sun8i: sina33: enable battery power supply subnode

2017-03-15 Thread Quentin Schulz
The Sinlinx SinA33 has an AXP223 PMIC and a battery connector, thus, we enable the battery power supply subnode in its Device Tree. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 4 1 file changed, 4

[PATCH v4 13/18] power: supply: add battery driver for AXP20X and AXP22X PMICs

2017-03-15 Thread Quentin Schulz
max and min limits, current voltage and battery capacity (in Ah). This battery driver uses the AXP20X/AXP22X ADC driver as PMIC data provider. Signed-off-by: Quentin Schulz Acked-by: Jonathan Cameron Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai --- v4: - removed useless axp20x_dev

[PATCH v4 12/18] mfd: axp20x: add CHRG_CTRL1/2/3 to writeable regs for AXP20X/AXP22X

2017-03-15 Thread Quentin Schulz
registers to the list of writeable registers for AXP20X and AXP22X PMICs. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai Acked-for-MFD-by: Lee Jones --- v2: - added AXP20X_CHRG_CTRL2 and AXP20X_CHRG_CTRL3 to the writeable registers table, - removed added reg range

[PATCH v4 11/18] dt-bindings: power: supply: add AXP20X/AXP22X battery DT binding

2017-03-15 Thread Quentin Schulz
capacity (in percentage), voltage max and min limits, current voltage and battery capacity (in Ah). Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Acked-by: Maxime Ripard --- v4: - added monitored-battery optional property, - added example with battery, v3: - removed constant charge

[PATCH v4 14/18] mfd: axp20x: add MFD cells for AXP20X and AXP22X battery driver

2017-03-15 Thread Quentin Schulz
The X-Powers AXP20X and AXP22X PMICs can have a battery as power supply. This patch adds the AXP20X/AXP22X battery driver to the MFD cells of the AXP209, AXP221 and AXP223 MFD. Signed-off-by: Quentin Schulz Acked-for-MFD-by: Lee Jones Acked-by: Chen-Yu Tsai --- v2: - changed DT node name

[PATCH v4 15/18] ARM: dtsi: axp209: add battery power supply subnode

2017-03-15 Thread Quentin Schulz
supply subnode for AXP20X PMIC. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai --- v2: - changed DT node name from battery_power_supply to battery-power-supply, - removed io-channels and io-channel-names from DT (the IIO mapping is done in the IIO ADC driver

Re: [PATCH v3 01/18] dt-bindings: power: battery: add constant-charge-current property

2017-03-14 Thread Quentin Schulz
Hi Chen-Yu, Sorry for the late reply. On 21/02/2017 05:55, Chen-Yu Tsai wrote: > On Wed, Feb 15, 2017 at 4:53 PM, Quentin Schulz > wrote: >> Hi, >> >> On 15/02/2017 01:46, Liam Breck wrote: >>> >>> On Tue, 14 Feb 2017 10:40:55 +0100 Quentin Schulz

Re: [PATCH v2 08/11] iio: adc: sun4i-gpadc-iio: add support for A33 thermal sensor

2017-03-14 Thread Quentin Schulz
Hi Jonathan, On 14/03/2017 06:18, Icenowy Zheng wrote: > > > 14.03.2017, 05:08, "Jonathan Cameron" : >> On 10/03/17 10:39, Quentin Schulz wrote: >>> This adds support for the Allwinner A33 thermal sensor. >>> >>> Unlike the A10, A13 and A3

Re: [PATCH v2 05/11] Documentation: DT: bindings: mfd: add A33 GPADC binding

2017-03-11 Thread Quentin Schulz
Hi Icenowy, On 10/03/2017 20:25, Icenowy Zheng wrote: > > > 10.03.2017, 18:56, "Quentin Schulz" : >> This patch adds documentation for the A33 GPADC binding. >> >> Signed-off-by: Quentin Schulz >> --- >> >> added in v2

Re: [PATCH v2 07/11] iio: adc: sun4i-gpadc-iio: move code used in MFD probing to new function

2017-03-11 Thread Quentin Schulz
Hi Icenowy, On 10/03/2017 20:36, Icenowy Zheng wrote: > > > 10.03.2017, 18:56, "Quentin Schulz" : >> This moves code used in MFD probing to a new sun4i_gpadc_probe_mfd >> function. >> >> Signed-off-by: Quentin Schulz >> --- >> >&

[PATCH v2 03/11] ARM: dts: sun8i: sina33: add cpu-supply

2017-03-10 Thread Quentin Schulz
This adds the cpu-supply DT property to the cpu0 DT node needed by the board to adapt the regulator voltage depending on the currently used OPP. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot

[PATCH v2 00/11] add thermal throttling to Allwinner A33 SoC

2017-03-10 Thread Quentin Schulz
This series of patch is based on this[1] series of patch. [1] https://lkml.org/lkml/2016/12/13/298 : "[PATCH v9] add support for Allwinner SoCs ADC" Thanks, Quentin Maxime Ripard (1): ARM: sun8i: a33: Add devfreq-based GPU cooling Quentin Schulz (10): ARM: sun8i: a33: add oper

[PATCH v2 05/11] Documentation: DT: bindings: mfd: add A33 GPADC binding

2017-03-10 Thread Quentin Schulz
This patch adds documentation for the A33 GPADC binding. Signed-off-by: Quentin Schulz --- added in v2 .../devicetree/bindings/mfd/sun4i-gpadc.txt| 59 ++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt

[PATCH v2 06/11] Documentation: DT: bindings: input: touschcreen: remove sun4i documentation

2017-03-10 Thread Quentin Schulz
This patch removes the sun4i touchscreen controller binding documentation since it has been merged with the sun4i GPADC binding documentation. Signed-off-by: Quentin Schulz --- added in v2 .../bindings/input/touchscreen/sun4i.txt | 38 -- 1 file changed, 38

[PATCH v2 09/11] ARM: dtsi: sun8i: a33: add thermal sensor

2017-03-10 Thread Quentin Schulz
This adds the DT node for the thermal sensor present in the Allwinner A33 GPADC. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/sun8i-a33.dtsi | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi index ba87a9e

[PATCH v2 08/11] iio: adc: sun4i-gpadc-iio: add support for A33 thermal sensor

2017-03-10 Thread Quentin Schulz
temperature value. The MFD used by the A10, A13 and A31, was created to avoid breaking the DT binding, but since the nodes for the ADC weren't there for the A33, it is not needed. Signed-off-by: Quentin Schulz --- v2: - removed added comments in Kconfig, - simplified Kconfig depends on cond

[PATCH v2 07/11] iio: adc: sun4i-gpadc-iio: move code used in MFD probing to new function

2017-03-10 Thread Quentin Schulz
This moves code used in MFD probing to a new sun4i_gpadc_probe_mfd function. Signed-off-by: Quentin Schulz --- added in v2 drivers/iio/adc/sun4i-gpadc-iio.c | 78 ++- 1 file changed, 45 insertions(+), 33 deletions(-) diff --git a/drivers/iio/adc/sun4i

[PATCH v2 04/11] ARM: dts: sun8i: olinuxino: add cpu-supply

2017-03-10 Thread Quentin Schulz
This adds the cpu-supply DT property to the cpu0 DT node needed by the board to adapt the regulator voltage depending on the currently use OPP. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts

[PATCH v2 02/11] ARM: sun8i: a33: add all operating points

2017-03-10 Thread Quentin Schulz
This adds all operating points allowed for the A33 as defined by fex files available at: https://github.com/linux-sunxi/sunxi-boards/tree/master/sys_config/a33 Signed-off-by: Quentin Schulz --- added in v2 arch/arm/boot/dts/sun8i-a33.dtsi | 60 1 file

[PATCH v2 01/11] ARM: sun8i: a33: add operating-points-v2 property to all nodes

2017-03-10 Thread Quentin Schulz
The OPP are declared as shared but no operating points are declared for cpu1, 2 and 3. Thus, the following error happens during the boot: cpu cpu1: dev_pm_opp_of_get_sharing_cpus: Couldn't find tcpu_dev node. This patch applies the operating points to each cpu of the A33. Signed-off-by: Qu

[PATCH v2 11/11] ARM: sun8i: a33: Add devfreq-based GPU cooling

2017-03-10 Thread Quentin Schulz
From: Maxime Ripard This adds GPU thermal throttling for the Allwinner A33. Signed-off-by: Maxime Ripard Signed-off-by: Quentin Schulz --- added in v2 arch/arm/boot/dts/sun8i-a23-a33.dtsi | 3 +++ arch/arm/boot/dts/sun8i-a33.dtsi | 24 2 files changed, 27

[PATCH v2 10/11] ARM: dtsi: sun8i: a33: add CPU thermal throttling

2017-03-10 Thread Quentin Schulz
This adds CPU thermal throttling for the Allwinner A33. It uses the thermal sensor present in the SoC's GPADC. Signed-off-by: Quentin Schulz --- v2: - updated cooling-max-level to reflect newly added OPPs, arch/arm/boot/dts/sun8i-a33.dtsi | 47 ++

Re: [PATCH v9 3/3] iio: adc: add support for Allwinner SoCs ADC

2017-03-06 Thread Quentin Schulz
Hi Jonathan, On 06/02/2017 19:35, Jonathan Cameron wrote: > On 06/02/17 07:37, Quentin Schulz wrote: >> Hi Jonathan, >> >> On 14/01/2017 20:28, Jonathan Cameron wrote: >>> >>> >>> On 14 January 2017 19:19:58 GMT+00:00, Quentin Schulz >>>

Re: [PATCH v3 04/18] iio: adc: add support for X-Powers AXP20X and AXP22X PMICs ADCs

2017-02-21 Thread Quentin Schulz
Hi Jonathan, On 19/02/2017 13:40, Jonathan Cameron wrote: > On 14/02/17 09:40, Quentin Schulz wrote: >> The X-Powers AXP20X and AXP22X PMICs have multiple ADCs. They expose the >> battery voltage, battery charge and discharge currents, AC-in and VBUS >> voltages and current

Re: [PATCH v3 17/18] ARM: dts: sun8i: sina33: enable battery power supply subnode

2017-02-21 Thread Quentin Schulz
On 21/02/2017 05:50, Chen-Yu Tsai wrote: > On Tue, Feb 14, 2017 at 5:41 PM, Quentin Schulz > wrote: >> The Sinlinx SinA33 has an AXP223 PMIC and a battery connector, thus, we >> enable the battery power supply subnode in its Device Tree. >> >> Signed-off-by: Quent

Re: [PATCH v3 13/18] power: supply: add battery driver for AXP20X and AXP22X PMICs

2017-02-21 Thread Quentin Schulz
Hi Chen-Yu, On 21/02/2017 05:44, Chen-Yu Tsai wrote: > On Tue, Feb 14, 2017 at 5:41 PM, Quentin Schulz > wrote: >> The X-Powers AXP20X and AXP22X PMICs can have a battery as power supply. >> >> This patch adds the battery power supply driver to get various data from

Re: [PATCH v3 11/18] dt-bindings: power: supply: add AXP20X/AXP22X battery DT binding

2017-02-21 Thread Quentin Schulz
Hi Chen-Yu, On 21/02/2017 05:45, Chen-Yu Tsai wrote: > On Tue, Feb 14, 2017 at 5:41 PM, Quentin Schulz > wrote: >> The X-Powers AXP20X and AXP22X PMICs can have a battery as power supply. >> >> This patch adds the DT binding documentation for the battery power >>

[RESEND PATCH 1/1] can: m_can: fix bitrate setup on latest silicon

2017-02-15 Thread Quentin Schulz
= 0x31040730) Signed-off-by: Florian Vallee Tested-by: Quentin Schulz --- drivers/net/can/m_can/m_can.c | 38 +++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 195f15e

Re: [PATCH v3 01/18] dt-bindings: power: battery: add constant-charge-current property

2017-02-15 Thread Quentin Schulz
Hi, On 15/02/2017 01:46, Liam Breck wrote: > > On Tue, 14 Feb 2017 10:40:55 +0100 Quentin Schulz wrote: >> This adds the constant-charge-current property to the list of optional >> properties of the battery. >> >> The constant charge current is critical for batteri

[PATCH v3 03/18] mfd: axp20x: correct name of temperature data ADC registers

2017-02-14 Thread Quentin Schulz
The registers 0x56 and 0x57 of AXP22X PMIC store the value of the internal temperature of the PMIC. This patch modifies the name of these registers from AXP22X_PMIC_ADC_H/L to AXP22X_PMIC_TEMP_H/L so their purpose is clearer. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Acked-by

[PATCH v3 02/18] power: supply: power_supply_core: add constant-current-charge optional property

2017-02-14 Thread Quentin Schulz
This adds the constant-current-charge property to the list of optional properties for the battery. The constant charge current is critical for batteries as they can't handle all charge currents. Signed-off-by: Quentin Schulz --- added in v3 drivers/power/supply/power_supply_core.

[PATCH v3 00/18] add support for AXP20X and AXP22X power supply drivers

2017-02-14 Thread Quentin Schulz
Switched from DT IIO channels mapping to iio_map structures IIO channels mapping, Quentin Quentin Schulz (18): dt-bindings: power: battery: add constant-charge-current property power: supply: power_supply_core: add constant-current-charge optional property mfd: axp20x: correct name of t

[PATCH v3 04/18] iio: adc: add support for X-Powers AXP20X and AXP22X PMICs ADCs

2017-02-14 Thread Quentin Schulz
0..5ef6af8 --- /dev/null +++ b/drivers/iio/adc/axp20x_adc.c @@ -0,0 +1,606 @@ +/* ADC driver for AXP20X and AXP22X PMICs + * + * Copyright (c) 2016 Free Electrons NextThing Co. + * Quentin Schulz + * + * This program is free software; you can redistribute it and/or modify it under + * the t

[PATCH v3 01/18] dt-bindings: power: battery: add constant-charge-current property

2017-02-14 Thread Quentin Schulz
This adds the constant-charge-current property to the list of optional properties of the battery. The constant charge current is critical for batteries as they can't handle all charge currents. Signed-off-by: Quentin Schulz --- added in v3 Documentation/devicetree/bindings/power/s

[PATCH v3 13/18] power: supply: add battery driver for AXP20X and AXP22X PMICs

2017-02-14 Thread Quentin Schulz
max and min limits, current voltage and battery capacity (in Ah). This battery driver uses the AXP20X/AXP22X ADC driver as PMIC data provider. Signed-off-by: Quentin Schulz Acked-by: Jonathan Cameron Acked-by: Maxime Ripard --- v3: - added axp20x_set_voltage_min_design function so it can be

[PATCH v3 15/18] ARM: dtsi: axp209: add battery power supply subnode

2017-02-14 Thread Quentin Schulz
supply subnode for AXP20X PMIC. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard --- v2: - changed DT node name from battery_power_supply to battery-power-supply, - removed io-channels and io-channel-names from DT (the IIO mapping is done in the IIO ADC driver now), arch/arm/boot/dts

[PATCH v3 17/18] ARM: dts: sun8i: sina33: enable battery power supply subnode

2017-02-14 Thread Quentin Schulz
The Sinlinx SinA33 has an AXP223 PMIC and a battery connector, thus, we enable the battery power supply subnode in its Device Tree. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard --- arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 4 1 file changed, 4 insertions(+) diff --git a

[PATCH v3 14/18] mfd: axp20x: add MFD cells for AXP20X and AXP22X battery driver

2017-02-14 Thread Quentin Schulz
The X-Powers AXP20X and AXP22X PMICs can have a battery as power supply. This patch adds the AXP20X/AXP22X battery driver to the MFD cells of the AXP209, AXP221 and AXP223 MFD. Signed-off-by: Quentin Schulz Acked-for-MFD-by: Lee Jones --- drivers/mfd/axp20x.c | 9 + 1 file changed, 9

[PATCH v3 18/18] ARM: sun5i: chip: enable battery power supply subnode

2017-02-14 Thread Quentin Schulz
The NextThing Co. CHIP has an AXP209 PMIC with battery connector. This enables the battery power supply subnode. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard --- arch/arm/boot/dts/sun5i-r8-chip.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/sun5i-r8

[PATCH v3 16/18] ARM: dtsi: axp22x: add battery power supply subnode

2017-02-14 Thread Quentin Schulz
subnode for AXP22X PMIC. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard --- v2: - changed DT node name from battery_power_supply to battery-power-supply, - removed io-channels and io-channel-names from DT (the IIO mapping is done in the IIO ADC driver now), arch/arm/boot/dts

[PATCH v3 12/18] mfd: axp20x: add CHRG_CTRL1/2/3 to writeable regs for AXP20X/AXP22X

2017-02-14 Thread Quentin Schulz
registers to the list of writeable registers for AXP20X and AXP22X PMICs. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai Acked-for-MFD-by: Lee Jones --- v2: - added AXP20X_CHRG_CTRL2 and AXP20X_CHRG_CTRL3 to the writeable registers table, - removed added reg range

[PATCH v3 11/18] dt-bindings: power: supply: add AXP20X/AXP22X battery DT binding

2017-02-14 Thread Quentin Schulz
capacity (in percentage), voltage max and min limits, current voltage and battery capacity (in Ah). Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard --- v3: - removed constant charge current property, now should use the WIP battery framework, v2: - changed DT node name from ac_power_supply

[PATCH v3 09/18] ARM: dts: sun8i: sina33: enable ACIN power supply subnode

2017-02-14 Thread Quentin Schulz
The Sinlinx SinA33 has an AXP223 PMIC and an ACIN connector, thus, we enable the ACIN power supply in its Device Tree. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Acked-by: Maxime Ripard --- arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 4 1 file changed, 4 insertions

[PATCH v3 07/18] ARM: dtsi: axp209: add AC power supply subnode

2017-02-14 Thread Quentin Schulz
The X-Powers AXP20X PMIC exposes the status of AC power supply, the current current and voltage supplied to the board by the AC power supply. This adds the AC power supply subnode for AXP20X PMIC. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Acked-by: Maxime Ripard --- v2: - changed

[PATCH v3 10/18] ARM: sun5i: chip: enable ACIN power supply subnode

2017-02-14 Thread Quentin Schulz
The NextThing Co. CHIP has an AXP209 PMIC and can be power-supplied by ACIN via the CHG-IN pin. This enables the ACIN power supply subnode in the DT. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Acked-by: Maxime Ripard --- arch/arm/boot/dts/sun5i-r8-chip.dts | 4 1 file changed

[PATCH v3 08/18] ARM: dtsi: axp22x: add AC power supply subnode

2017-02-14 Thread Quentin Schulz
The X-Powers AXP22X PMIC exposes the status of AC power supply. This adds the AC power supply subnode for the AXP22X PMIC. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai --- v2: - changed DT node name from ac_power_supply to ac-power-supply, - removed io

[PATCH v3 06/18] mfd: axp20x: add AC power supply cells for AXP22X PMICs

2017-02-14 Thread Quentin Schulz
The X-Powers AXP20X and AXP22X PMICs expose the status of AC power supply. This adds the AC power supply driver to the MFD cells of the AXP22X PMICs. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-By: Sebastian Reichel Acked-by: Chen-Yu Tsai Acked-for-MFD-by: Lee Jones

[PATCH v3 05/18] mfd: axp20x: add ADC cells for AXP20X and AXP22X PMICs

2017-02-14 Thread Quentin Schulz
This adds the AXP20X/AXP22x ADCs driver to the mfd cells of the AXP209, AXP221 and AXP223 MFD. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard --- v3: - removed of_compatible as DT node has been removed, - use different names to probe the ADC driver, drivers/mfd/axp20x.c | 6

Re: [PATCH v9 3/3] iio: adc: add support for Allwinner SoCs ADC

2017-02-05 Thread Quentin Schulz
Hi Jonathan, On 14/01/2017 20:28, Jonathan Cameron wrote: > > > On 14 January 2017 19:19:58 GMT+00:00, Quentin Schulz > wrote: >> Hi Jonathan, >> >> On 08/01/2017 12:17, Jonathan Cameron wrote: >>> On 30/12/16 14:40, Jonathan Cameron wrote: >&

Re: [PATCH v2 16/25] dt-bindings: power: supply: add AXP20X/AXP22X battery DT binding

2017-01-31 Thread Quentin Schulz
Hi, On 29/01/2017 17:47, Sebastian Reichel wrote: > Hi, > > On Fri, Jan 27, 2017 at 09:54:49AM +0100, Quentin Schulz wrote: >> - added x-powers,constant-charge-current property to set the >> maximal default constant current charge of the battery, > > Since th

Re: [PATCH v2 04/25] iio: adc: add support for X-Powers AXP20X and AXP22X PMICs ADCs

2017-01-28 Thread Quentin Schulz
Hi Jonathan On 28/01/2017 15:49, Jonathan Cameron wrote: > On 27/01/17 08:54, Quentin Schulz wrote: >> The X-Powers AXP20X and AXP22X PMICs have multiple ADCs. They expose the >> battery voltage, battery charge and discharge currents, AC-in and VBUS >> voltages and current

[PATCH v2 20/25] power: supply: add battery driver for AXP20X and AXP22X PMICs

2017-01-27 Thread Quentin Schulz
max and min limits, current voltage and battery capacity (in Ah). This battery driver uses the AXP20X/AXP22X ADC driver as PMIC data provider. Signed-off-by: Quentin Schulz --- v2: - changed BIT(x) to 1 << x when describing bits purpose for which 2 << x or 3 << x exists

[PATCH v2 15/25] ARM: sun5i: chip: enable ACIN power supply subnode

2017-01-27 Thread Quentin Schulz
The NextThing Co. CHIP has an AXP209 PMIC and can be power-supplied by ACIN via the CHG-IN pin. This enables the ACIN power supply subnode in the DT. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/sun5i-r8-chip.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts

[PATCH v2 24/25] ARM: dts: sun8i: sina33: enable battery power supply subnode

2017-01-27 Thread Quentin Schulz
The Sinlinx SinA33 has an AXP223 PMIC and a battery connector, thus, we enable the battery power supply subnode in its Device Tree. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/sun8i

[PATCH v2 22/25] ARM: dtsi: axp209: add battery power supply subnode

2017-01-27 Thread Quentin Schulz
supply subnode for AXP20X PMIC. Signed-off-by: Quentin Schulz --- v2: - changed DT node name from battery_power_supply to battery-power-supply, - removed io-channels and io-channel-names from DT (the IIO mapping is done in the IIO ADC driver now), arch/arm/boot/dts/axp209.dtsi | 5 + 1

[PATCH v2 18/25] mfd: axp20x: add V_OFF to writeable regs for AXP20X and AXP22X

2017-01-27 Thread Quentin Schulz
The V_OFF register has its first 3 read-write bits for the minimal voltage (Voff) of the battery before the system is automatically shut down due to the power being too low. This adds V_OFF register to the writeable registers of AXP20X and AXP22X PMICs. Signed-off-by: Quentin Schulz Acked-for

[PATCH v2 25/25] ARM: sun5i: chip: enable battery power supply subnode

2017-01-27 Thread Quentin Schulz
The NextThing Co. CHIP has an AXP209 PMIC with battery connector. This enables the battery power supply subnode. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/sun5i-r8-chip.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/sun5i-r8-chip.dts b/arch/arm/boot

[PATCH v2 19/25] iio: adc: axp20x_adc: map battery IIO channels

2017-01-27 Thread Quentin Schulz
This maps the IIO channels batt_v, batt_chrg_i and batt_dischrg_i (respectively exposing the current charging and discharging currents and current voltage measures of the battery power supply) to the battery power supply driver. Signed-off-by: Quentin Schulz --- added in v2 drivers/iio/adc

[PATCH v2 23/25] ARM: dtsi: axp22x: add battery power supply subnode

2017-01-27 Thread Quentin Schulz
subnode for AXP22X PMIC. Signed-off-by: Quentin Schulz --- v2: - changed DT node name from battery_power_supply to battery-power-supply, - removed io-channels and io-channel-names from DT (the IIO mapping is done in the IIO ADC driver now), arch/arm/boot/dts/axp22x.dtsi | 5 + 1 file

[PATCH v2 21/25] mfd: axp20x: add MFD cells for AXP20X and AXP22X battery driver

2017-01-27 Thread Quentin Schulz
The X-Powers AXP20X and AXP22X PMICs can have a battery as power supply. This patch adds the AXP20X/AXP22X battery driver to the MFD cells of the AXP209, AXP221 and AXP223 MFD. Signed-off-by: Quentin Schulz Acked-for-MFD-by: Lee Jones --- drivers/mfd/axp20x.c | 9 + 1 file changed, 9

[PATCH v2 16/25] dt-bindings: power: supply: add AXP20X/AXP22X battery DT binding

2017-01-27 Thread Quentin Schulz
capacity (in percentage), voltage max and min limits, current voltage and battery capacity (in Ah). Signed-off-by: Quentin Schulz --- v2: - changed DT node name from ac_power_supply to ac-power-supply, - removed io-channels and io-channel-names from DT (the IIO mapping is done in the IIO ADC

[PATCH v2 04/25] iio: adc: add support for X-Powers AXP20X and AXP22X PMICs ADCs

2017-01-27 Thread Quentin Schulz
c @@ -0,0 +1,572 @@ +/* ADC driver for AXP20X and AXP22X PMICs + * + * Copyright (c) 2016 Free Electrons NextThing Co. + * Quentin Schulz + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License version 2 as publish

[PATCH v2 03/25] power: supply: axp20x_usb_power: use IIO channels when available

2017-01-27 Thread Quentin Schulz
compiled, this driver will fall back on previous behaviour which is direct register readings. Signed-off-by: Quentin Schulz --- added in v2 drivers/power/supply/axp20x_usb_power.c | 70 +++-- 1 file changed, 66 insertions(+), 4 deletions(-) diff --git a/drivers/power

[PATCH v2 00/25] add support for AXP20X and AXP22X power supply drivers

2017-01-27 Thread Quentin Schulz
. voltage and current of the battery have the same index in different IIO types), - Added structures for specific data instead of matching on IDs, - Switched from DT IIO channels mapping to iio_map structures IIO channels mapping, Quentin Quentin Schulz (25): dt-bindings: iio: adc: add AXP

[PATCH v2 01/25] dt-bindings: iio: adc: add AXP20X/AXP22X ADC DT binding

2017-01-27 Thread Quentin Schulz
AXP22X PMICs ADCs. Signed-off-by: Quentin Schulz Acked-by: Rob Herring Acked-by: Chen-Yu Tsai Acked-by: Maxime Ripard --- v2: - removing io-channels from required properties, - update AXP ADC DT node name from axp209_adc to simply adc, .../devicetree/bindings/iio/adc/axp20x_adc.txt | 22

[PATCH v2 10/25] power: supply: add AC power supply driver for AXP20X and AXP22X PMICs

2017-01-27 Thread Quentin Schulz
: Quentin Schulz Acked-by: Jonathan Cameron --- v2: - replaced µ character by a common u for micro units to make checkpatch happy, - use of structure for specific data instead of an ID and if condiftions, - use dev_get_regmap instead of manually looking for it in the parent drvdata, drivers

[PATCH v2 09/25] iio: adc: axp20x_adc: map acin_i and acin_v

2017-01-27 Thread Quentin Schulz
This maps the IIO channels acin_i and acin_v (respectively exposing the current current and voltage measures of the AC power supply) to the AC power supply driver. Only the AXP20X PMICs have these ADC channels and thus they are only mapped for this version of the PMIC. Signed-off-by: Quentin

[PATCH v2 05/25] mfd: axp20x: add ADC cells for AXP20X and AXP22X PMICs

2017-01-27 Thread Quentin Schulz
This adds the AXP20X/AXP22x ADCs driver to the mfd cells of the AXP209, AXP221 and AXP223 MFD. Signed-off-by: Quentin Schulz Acked-for-MFD-by: Lee Jones Acked-by: Chen-Yu Tsai --- drivers/mfd/axp20x.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/mfd/axp20x.c b/drivers

[PATCH v2 12/25] ARM: dtsi: axp209: add AC power supply subnode

2017-01-27 Thread Quentin Schulz
The X-Powers AXP20X PMIC exposes the status of AC power supply, the current current and voltage supplied to the board by the AC power supply. This adds the AC power supply subnode for AXP20X PMIC. Signed-off-by: Quentin Schulz --- v2: - changed DT node name from ac_power_supply to ac-power

[PATCH v2 11/25] mfd: axp20x: add AC power supply cells for AXP22X PMICs

2017-01-27 Thread Quentin Schulz
The X-Powers AXP20X and AXP22X PMICs expose the status of AC power supply. This adds the AC power supply driver to the MFD cells of the AXP22X PMICs. Signed-off-by: Quentin Schulz Acked-for-MFD-by: Lee Jones --- drivers/mfd/axp20x.c | 10 ++ 1 file changed, 10 insertions(+) diff

[PATCH v2 08/25] dt-bindings: power: supply: add AXP20X/AXP22X AC power supply

2017-01-27 Thread Quentin Schulz
The X-Powers AXP20X and AXP22X PMICs have an AC entry to supply power to the board. They have a few registers dedicated to the status of the AC power supply. This adds the DT binding documentation for the AC power supply for AXP20X and AXP22X PMICs. Signed-off-by: Quentin Schulz --- v2

[PATCH v2 13/25] ARM: dtsi: axp22x: add AC power supply subnode

2017-01-27 Thread Quentin Schulz
The X-Powers AXP22X PMIC exposes the status of AC power supply. This adds the AC power supply subnode for the AXP22X PMIC. Signed-off-by: Quentin Schulz --- v2: - changed DT node name from ac_power_supply to ac-power-supply, - removed io-channels and io-channel-names from DT (the IIO mapping

[PATCH v2 06/25] ARM: dtsi: axp209: add AXP209 ADC subnode

2017-01-27 Thread Quentin Schulz
X-Powers AXP209 PMIC has multiple ADCs, each one exposing data from the different power supplies connected to the PMIC. This adds the ADC subnode for AXP20X PMIC. Signed-off-by: Quentin Schulz --- v2: - removed #io-channels property (the IIO channels mapping is done by using iio_map

[PATCH v2 07/25] ARM: dtsi: axp22x: add AXP22X ADC subnode

2017-01-27 Thread Quentin Schulz
X-Powers AXP22X PMIC has multiple ADCs, each one exposing data from the different power supplies connected to the PMIC. This adds the ADC subnode for AXP22X PMIC. Signed-off-by: Quentin Schulz --- v2: - removed #io-channels property (the IIO channels mapping is done by using iio_map

[PATCH v2 14/25] ARM: dts: sun8i: sina33: enable ACIN power supply subnode

2017-01-27 Thread Quentin Schulz
The Sinlinx SinA33 has an AXP223 PMIC and an ACIN connector, thus, we enable the ACIN power supply in its Device Tree. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a33-sinlinx

[PATCH v2 02/25] mfd: axp20x: correct name of temperature data ADC registers

2017-01-27 Thread Quentin Schulz
The registers 0x56 and 0x57 of AXP22X PMIC store the value of the internal temperature of the PMIC. This patch modifies the name of these registers from AXP22X_PMIC_ADC_H/L to AXP22X_PMIC_TEMP_H/L so their purpose is clearer. Signed-off-by: Quentin Schulz --- added in v2 drivers/mfd/axp20x.c

[PATCH v2 17/25] mfd: axp20x: add CHRG_CTRL1/2/3 to writeable regs for AXP20X/AXP22X

2017-01-27 Thread Quentin Schulz
registers to the list of writeable registers for AXP20X and AXP22X PMICs. Signed-off-by: Quentin Schulz Acked-for-MFD-by: Lee Jones --- v2: - added AXP20X_CHRG_CTRL2 and AXP20X_CHRG_CTRL3 to the writeable registers table, - removed added reg range for ADC data in volatile regs range, drivers/mfd

Re: [PATCH 08/22] power: supply: add AC power supply driver for AXP20X and AXP22X PMICs

2017-01-26 Thread Quentin Schulz
Hi Sebastian, On 17/01/2017 04:00, Sebastian Reichel wrote: > Hi Quentin, > > The driver looks mostly fine. I do have a two comments, though. > > On Mon, Jan 02, 2017 at 05:37:08PM +0100, Quentin Schulz wrote: >> [...] >> >> +static int axp20x_ac_power_p

Re: [PATCH v9 3/3] iio: adc: add support for Allwinner SoCs ADC

2017-01-14 Thread Quentin Schulz
Hi Jonathan, On 08/01/2017 12:17, Jonathan Cameron wrote: > On 30/12/16 14:40, Jonathan Cameron wrote: >> On 13/12/16 14:33, Quentin Schulz wrote: >>> The Allwinner SoCs all have an ADC that can also act as a touchscreen >>> controller and a thermal sensor. This patch a

Re: [PATCH 14/22] dt-bindings: power: supply: add AXP20X/AXP22X battery DT binding

2017-01-08 Thread Quentin Schulz
Hi Jonathan, On 07/01/2017 20:33, Jonathan Cameron wrote: > On 04/01/17 08:21, Rob Herring wrote: >> On Mon, Jan 02, 2017 at 05:37:14PM +0100, Quentin Schulz wrote: >>> The X-Powers AXP20X and AXP22X PMICs can have a battery as power supply. >>> >>> This pat

Re: [PATCH 08/22] power: supply: add AC power supply driver for AXP20X and AXP22X PMICs

2017-01-08 Thread Quentin Schulz
Hi Jonathan, On 07/01/2017 20:31, Jonathan Cameron wrote: > On 02/01/17 11:37, Quentin Schulz wrote: [...] >> +/* >> + * IIO framework gives mV but Power Supply framework gives µV. >> + */ > single line comment syntax throughout or we

Re: [PATCH 17/22] power: supply: add battery driver for AXP20X and AXP22X PMICs

2017-01-06 Thread Quentin Schulz
Hi, On 06/01/2017 04:39, Chen-Yu Tsai wrote: > Hi, > > On Tue, Jan 3, 2017 at 12:37 AM, Quentin Schulz > wrote: [...] >> + case POWER_SUPPLY_PROP_CURRENT_MAX: >> + ret = regmap_read(axp20x_batt->regmap, AXP20X_CHRG_CTRL1, >&g

Re: [PATCH 03/22] iio: adc: add support for X-Powers AXP20X and AXP22X PMICs ADCs

2017-01-05 Thread Quentin Schulz
On 05/01/2017 09:27, Chen-Yu Tsai wrote: > On Thu, Jan 5, 2017 at 4:06 PM, Quentin Schulz > wrote: >> Hi Chen-Yu, >> >> On 05/01/2017 06:42, Chen-Yu Tsai wrote: >>> On Tue, Jan 3, 2017 at 12:37 AM, Quentin Schulz >>> wrote: >> [...] >>>&g

Re: [PATCH 03/22] iio: adc: add support for X-Powers AXP20X and AXP22X PMICs ADCs

2017-01-05 Thread Quentin Schulz
Hi Chen-Yu, On 05/01/2017 06:42, Chen-Yu Tsai wrote: > On Tue, Jan 3, 2017 at 12:37 AM, Quentin Schulz > wrote: [...] >> + >> +#define AXP20X_ADC_RATE_MASK (3 << 6) >> +#define AXP20X_ADC_RATE_25HZ (0 <<

Re: [PATCH 15/22] mfd: axp20x: add CHRG_CTRL1 to writeable regs for AXP20X/AXP22X

2017-01-05 Thread Quentin Schulz
On 05/01/2017 07:10, Chen-Yu Tsai wrote: > On Tue, Jan 3, 2017 at 12:37 AM, Quentin Schulz > wrote: >> The CHR_CTRL1 register is made of 7 read-write bits with one being used >> to set the target voltage for battery charging. > > The description is incorrect. >

Re: [PATCH 05/22] ARM: dtsi: axp209: add AXP209 ADC subnode

2017-01-05 Thread Quentin Schulz
On 05/01/2017 06:51, Chen-Yu Tsai wrote: > On Tue, Jan 3, 2017 at 12:37 AM, Quentin Schulz > wrote: >> X-Powers AXP209 PMIC has multiple ADCs, each one exposing data from the >> different power supplies connected to the PMIC. >> >> This adds the ADC subnode for AX

[PATCH 04/22] mfd: axp20x: add ADC cells for AXP20X and AXP22X PMICs

2017-01-02 Thread Quentin Schulz
This adds the AXP20X/AXP22x ADCs driver to the mfd cells of the AXP209, AXP221 and AXP223 MFD. Signed-off-by: Quentin Schulz --- drivers/mfd/axp20x.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index a33db5e..31a84d81 100644 --- a

[PATCH 03/22] iio: adc: add support for X-Powers AXP20X and AXP22X PMICs ADCs

2017-01-02 Thread Quentin Schulz
20X and AXP22X PMICs + * + * Copyright (c) 2016 Free Electrons NextThing Co. + * Quentin Schulz + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License version 2 as published by the + * Free Software Foundation. + * + */ +

<    1   2   3   4   5   6   7   >