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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
>> ---
>>
>&
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
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
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
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
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
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
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
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
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
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
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
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 ++
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
>>>
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
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
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
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
>>
= 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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
>&
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
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
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
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
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
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
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
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
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
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
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
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
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
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
.
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
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
: 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 <<
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.
>
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
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
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.
+ *
+ */
+
401 - 500 of 655 matches
Mail list logo