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

Re: [PATCH v2 4/4] hwmon: iio: add label for channels read by iio_hwmon

2016-07-15 Thread Quentin Schulz
On 15/07/2016 16:03, Guenter Roeck wrote: > On 07/15/2016 02:59 AM, Quentin Schulz wrote: [...] >> +static ssize_t iio_hwmon_read_label(struct device *dev, >> +struct device_attribute *attr, >> +char *buf) >> +{ >> +stru

Re: [PATCH v2 4/4] hwmon: iio: add label for channels read by iio_hwmon

2016-07-18 Thread Quentin Schulz
On 18/07/2016 14:24, Jonathan Cameron wrote: > On 15/07/16 10:59, Quentin Schulz wrote: >> Currently, iio_hwmon only exposes values of the IIO channels it can read >> but no label by channel is exposed. >> >> This adds exposition of sysfs files containing label for

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-19 Thread Quentin Schulz
On 18/07/2016 15:18, Jonathan Cameron wrote: > On 15/07/16 10:59, Quentin Schulz wrote: >> The Allwinner SoCs all have an ADC that can also act as a touchscreen >> controller and a thermal sensor. This patch adds the ADC driver which is >> based on the MFD for the same SoCs

Re: [PATCH v2 3/4] mfd: add support for Allwinner SoCs ADC

2016-07-19 Thread Quentin Schulz
On 18/07/2016 15:25, Jonathan Cameron wrote: > On 15/07/16 10:59, Quentin Schulz wrote: >> The Allwinner SoCs all have an ADC that can also act as a touchscreen >> controller and a thermal sensor. For now, only the ADC and the thermal >> sensor drivers are probed by the

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-19 Thread Quentin Schulz
On 18/07/2016 14:57, Maxime Ripard wrote: > On Fri, Jul 15, 2016 at 11:59:12AM +0200, Quentin Schulz wrote: >> The Allwinner SoCs all have an ADC that can also act as a touchscreen >> controller and a thermal sensor. This patch adds the ADC driver which is >> based on the MFD

Re: [PATCH v2 3/4] mfd: add support for Allwinner SoCs ADC

2016-07-19 Thread Quentin Schulz
On 18/07/2016 15:02, Maxime Ripard wrote: > On Fri, Jul 15, 2016 at 11:59:13AM +0200, Quentin Schulz wrote: >> The Allwinner SoCs all have an ADC that can also act as a touchscreen >> controller and a thermal sensor. For now, only the ADC and the thermal >> sensor drivers

[PATCH v2] ARM: sun8i: Add Parrot Board DTS

2016-06-22 Thread Quentin Schulz
, an audio/microphone jack, a camera CSI port, 2 sets of 22 GPIOs and an accelerometer. Signed-off-by: Quentin Schulz --- Patch dependencies: - regulator: axp20x: Add support for the (external) drivebus regulator - ARM: dts: axp22x.dtsi: Add reg_drivebus node - ARM: dts: axp22x.dtsi: Add

[PATCH v3] ARM: sun8i: Add Parrot Board DTS

2016-06-24 Thread Quentin Schulz
, an audio/microphone jack, a camera CSI port, 2 sets of 22 GPIOs and an accelerometer. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai --- Patch dependency: - phy-sun4i-usb: Add workaround for missing Vbus det interrupts on A31 or the micro USB port would not be powered. v2: - correct

Re: [PATCH] ARM: sun8i: Add Parrot Board DTS

2016-06-14 Thread Quentin Schulz
Hi, On 13/06/2016 15:04, Chen-Yu Tsai wrote: > Hi, > > On Mon, Jun 13, 2016 at 6:15 PM, Quentin Schulz > wrote: >> The Parrot Board is an evaluation board with an Allwinner R16 (assumed >> to be close to an Allwinner A33), 4GB of NAND, 512MB of RAM, USB host > &

[PATCH v2 1/4] hwmon: iio_hwmon: defer probe when no channel is found

2016-07-15 Thread Quentin Schulz
iio_hwmon if such error is returned by iio_channel_get_all in order to let a chance to iio drivers to expose channels in iio_map_list. Signed-off-by: Quentin Schulz --- No modifications for this patch since we did not settled for a solution. What should we do? drivers/hwmon/iio_hwmon.c | 5

[PATCH v2 0/4] add support for Allwinner SoCs ADC

2016-07-15 Thread Quentin Schulz
nnels read by iio_hwmon. Until now, there were no way to identify what the exposed channels are representing. Now, if a channel has its extend_name field set, this value will be exposed in a sysfs file suffixed by _label. If the field is empty, no file will be created. Quentin Schulz (4):

[PATCH v2 4/4] hwmon: iio: add label for channels read by iio_hwmon

2016-07-15 Thread Quentin Schulz
sysfs file is not created by iio_hwmon. Signed-off-by: Quentin Schulz --- patch added in v2 drivers/hwmon/iio_hwmon.c | 77 +-- 1 file changed, 68 insertions(+), 9 deletions(-) diff --git a/drivers/hwmon/iio_hwmon.c b/drivers/hwmon/iio_hwmon.c index

[PATCH v2 3/4] mfd: add support for Allwinner SoCs ADC

2016-07-15 Thread Quentin Schulz
The Allwinner SoCs all have an ADC that can also act as a touchscreen controller and a thermal sensor. For now, only the ADC and the thermal sensor drivers are probed by the MFD, the touchscreen controller support will be added later. Signed-off-by: Quentin Schulz --- v2: - add license headers

[PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-15 Thread Quentin Schulz
Device Tree. This driver probes on three different platform_device_id to take into account slight differences between Allwinner SoCs ADCs. Signed-off-by: Quentin Schulz --- v2: - add SUNXI_GPADC_ prefixes for defines, - correct typo in Kconfig, - reorder alphabetically includes, makefile

[PATCH v3 4/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-26 Thread Quentin Schulz
Device Tree. This registers the driver in the thermal framework. This driver probes on three different platform_device_id to take into account slight differences (registers bit and temperature computation) between Allwinner SoCs ADCs. Signed-off-by: Quentin Schulz --- I don't like how I ge

[PATCH v3 1/4] hwmon: iio_hwmon: delay probing with late_initcall

2016-07-26 Thread Quentin Schulz
() as their init. Signed-off-by: Quentin Schulz --- v3: - use late_initcall instead of deferring probe, drivers/hwmon/iio_hwmon.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/iio_hwmon.c b/drivers/hwmon/iio_hwmon.c index b550ba5..0a00bfb

[PATCH v3 0/4] add support for Allwinner SoCs ADC

2016-07-26 Thread Quentin Schulz
think it is not absolutely necessary to have labels yet in iio_hwmon. Quentin Schulz (4): hwmon: iio_hwmon: delay probing with late_initcall mfd: add support for Allwinner SoCs ADC mfd: mfd-core: reattach mfd of_node to cells without of_compatible iio: adc: add support for Allwinner SoCs ADC

[PATCH v3 2/4] mfd: add support for Allwinner SoCs ADC

2016-07-26 Thread Quentin Schulz
The Allwinner SoCs all have an ADC that can also act as a touchscreen controller and a thermal sensor. For now, only the ADC and the thermal sensor drivers are probed by the MFD, the touchscreen controller support will be added later. Signed-off-by: Quentin Schulz --- v3: - use defines in

[PATCH v3 3/4] mfd: mfd-core: reattach mfd of_node to cells without of_compatible

2016-07-26 Thread Quentin Schulz
of_compatible. Signed-off-by: Quentin Schulz --- We need this modification to register the thermal sensor in the thermal framework. Added in v3. drivers/mfd/mfd-core.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c

[PATCH] hwmon: iio_hwmon: fix memory leak in name attribute

2016-07-26 Thread Quentin Schulz
The "name" variable's memory is now freed when the device is destructed thanks to devm function. Signed-off-by: Quentin Schulz Reported-by: Guenter Roeck --- drivers/hwmon/iio_hwmon.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git

Re: [PATCH v3 1/4] hwmon: iio_hwmon: delay probing with late_initcall

2016-07-26 Thread Quentin Schulz
Hi, On 26/07/2016 09:48, Thomas Petazzoni wrote: > Hello, > > On Tue, 26 Jul 2016 09:43:44 +0200, Quentin Schulz wrote: > >> -module_platform_driver(iio_hwmon_driver); >> +static struct platform_driver * const drivers[] = { >> +&iio_hwmon_driver,

Re: [PATCH v3 1/4] hwmon: iio_hwmon: delay probing with late_initcall

2016-07-26 Thread Quentin Schulz
On 26/07/2016 10:21, Alexander Stein wrote: > On Tuesday 26 July 2016 09:43:44, Quentin Schulz wrote: >> iio_channel_get_all returns -ENODEV when it cannot find either phandles and >> properties in the Device Tree or channels whose consumer_dev_name matches >> iio_hwmon

Re: [PATCH v3 1/4] hwmon: iio_hwmon: delay probing with late_initcall

2016-07-26 Thread Quentin Schulz
On 26/07/2016 11:05, Alexander Stein wrote: > On Tuesday 26 July 2016 10:24:48, Quentin Schulz wrote: >> On 26/07/2016 10:21, Alexander Stein wrote: >>> On Tuesday 26 July 2016 09:43:44, Quentin Schulz wrote: >>>> iio_channel_get_all returns -ENODEV when it cannot

Re: [PATCH v3 1/4] hwmon: iio_hwmon: delay probing with late_initcall

2016-07-26 Thread Quentin Schulz
On 26/07/2016 12:00, Alexander Stein wrote: > On Tuesday 26 July 2016 11:33:59, Quentin Schulz wrote: >> On 26/07/2016 11:05, Alexander Stein wrote: >>> On Tuesday 26 July 2016 10:24:48, Quentin Schulz wrote: >>>> On 26/07/2016 10:21, Alexander Stein wrote: >>

Re: [PATCH 0/3] add support for Allwinner SoCs ADC

2016-07-01 Thread Quentin Schulz
On 29/06/2016 05:28, Chen-Yu Tsai wrote: > Hi, > > On Tue, Jun 28, 2016 at 4:45 PM, Quentin Schulz > wrote: >> The Allwinner SoCs all have an ADC that can also act as a touchscreen >> controller >> and a thermal sensor. The first four channels can be used ei

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

2016-07-04 Thread Quentin Schulz
On 03/07/2016 17:43, Guenter Roeck wrote: > On 07/03/2016 04:54 AM, Jonathan Cameron wrote: >> On 28/06/16 09:18, Quentin Schulz wrote: >>> The Allwinner SoCs all have an ADC that can also act as a touchscreen >>> controller and a thermal sensor. This patch adds the AD

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

2016-07-05 Thread Quentin Schulz
On 04/07/2016 18:29, Guenter Roeck wrote: > On 07/04/2016 12:26 AM, Quentin Schulz wrote: >> On 03/07/2016 17:43, Guenter Roeck wrote: >>> On 07/03/2016 04:54 AM, Jonathan Cameron wrote: >>>> On 28/06/16 09:18, Quentin Schulz wrote: >>>>> The Allwinne

[PATCH 06/10] ARM: dtsi: add DTSI for AXP223

2016-11-25 Thread Quentin Schulz
The AXP223 shares most of its logic with the AXP221 but it has some differences for the VBUS driver. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/axp223.dtsi | 55 +++ 1 file changed, 55 insertions(+) create mode 100644 arch/arm/boot/dts/axp223

[PATCH 04/10] power: supply: axp20x_usb_power: add 100mA max current limit for AXP223

2016-11-25 Thread Quentin Schulz
. Signed-off-by: Quentin Schulz --- drivers/power/supply/axp20x_usb_power.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c index 638cb52..6d5d451 100644 --- a/drivers/power/supply

[PATCH 01/10] power: supply: axp20x_usb_power: use of_device_id data field instead of device_is_compatible

2016-11-25 Thread Quentin Schulz
This replaces calls to of_device_is_compatible to check data field of of_device_id matched when probing the driver. Signed-off-by: Quentin Schulz --- drivers/power/supply/axp20x_usb_power.c | 39 - 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a

[PATCH 07/10] ARM: dts: sun8i-a33-olinuxino: use AXP223 DTSI

2016-11-25 Thread Quentin Schulz
Previously, the Olimex A33-OlinuXino used everything declared in AXP221 DTSI while it has an AXP223 PMIC. This corrects that so the Olimex A33-OlinuXino can get some features the AXP223 has (at the moment, ability to have 100mA as maximal current on VBUS power supply). Signed-off-by: Quentin

[PATCH 05/10] mfd: axp20x: add separate MFD cell for AXP223

2016-11-25 Thread Quentin Schulz
The AXP223 shares most of its logic with the AXP221 but has some differences for the VBUS power supply driver. Thus, to probe the driver with the correct compatible, the AXP221 and the AXP223 now have separate MFD cells. Signed-off-by: Quentin Schulz --- drivers/mfd/axp20x.c | 22

[PATCH 00/10] add support for VBUS max current and min voltage limits AXP20X and AXP22X PMICs

2016-11-25 Thread Quentin Schulz
AXP223 see their DT updated to use the VBUS power supply driver with the correct compatible. This series of patch also migrates from of_device_is_compatible function to the data field of of_device_id to identify the compatible used to probe. This improves the code readability. Quentin Schulz (10

[PATCH 08/10] ARM: dts: sun8i-a33-sinlinx-sina33: use AXP223 DTSI

2016-11-25 Thread Quentin Schulz
Previously, the Sinlinx SinA33 used everything declared in AXP221 DTSI while it has an AXP223 PMIC. This corrects that so the Sinlinx SinA33 can get some features the AXP223 has (at the moment, ability to have 100mA as maximal current on VBUS power supply). Signed-off-by: Quentin Schulz

[PATCH 02/10] power: supply: axp20x_usb_power: set min voltage and max current from sysfs

2016-11-25 Thread Quentin Schulz
AXP20X and AXP22X PMICs allow setting the min voltage and max current of VBUS power supply. This adds entries in sysfs to allow to do so. Signed-off-by: Quentin Schulz --- drivers/power/supply/axp20x_usb_power.c | 72 + include/linux/mfd/axp20x.h

[PATCH 10/10] ARM: dtsi: sun8i-reference-design-tablet: use AXP223 DTSI

2016-11-25 Thread Quentin Schulz
Previously, the sun8i tablets used everything declared in AXP221 DTSI while they have an AXP223 PMIC. This corrects that so the sun8i tablets can get some features the AXP223 has (at the moment, ability to have 100mA as maximal current on VBUS power supply). Signed-off-by: Quentin Schulz

[PATCH 03/10] Documentation: DT: binding: axp20x_usb_power: add axp223 compatible

2016-11-25 Thread Quentin Schulz
This adds the "x-powers,axp223-usb-power-supply" to the list of compatibles for AXP20X VBUS power supply driver. Signed-off-by: Quentin Schulz --- Documentation/devicetree/bindings/power/supply/axp20x_usb_power.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/

[PATCH 09/10] ARM: dts: sun8i-r16-parrot: use AXP223 DTSI

2016-11-25 Thread Quentin Schulz
Previously, the Allwinner Parrot R16 used everything declared in AXP221 DTSI while it has an AXP223 PMIC. This corrects that so the Allwinner Parrot R16 can get some features the AXP223 has (at the moment, ability to have 100mA as maximal current on VBUS power supply). Signed-off-by: Quentin

Re: [PATCH v6 2/2] iio: adc: add support for Allwinner SoCs ADC

2016-10-31 Thread Quentin Schulz
Hi Jonathan and Lee, On 30/10/2016 17:59, Jonathan Cameron wrote: > On 15/09/16 13:44, Quentin Schulz wrote: >> The Allwinner SoCs all have an ADC that can also act as a touchscreen >> controller and a thermal sensor. This patch adds the ADC driver which is >> based on the

[PATCH 5/7] ARM: dts: sun8i-a33-olinuxino: add cpu-supply

2016-12-20 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 --- This hasn't been tested on the board but it is what I understand from the schematics[1] of the board. Stefa

[PATCH 0/7] add CPU thermal throttling to Allwinner A33 SoC

2016-12-20 Thread Quentin Schulz
upport for Allwinner SoCs ADC" [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-December/473962.html : "[PATCH] Allwinner A33 CPU frequency scaling support" without PATCH 4/6 [3] https://lkml.org/lkml/2016/12/19/72 : "[PATCH v2] ARM: dts: sun8i: add opp-v2 tab

[PATCH 2/7] Documentation: DT: bindings: mfd: add documentation for Allwinner SoCs' GPADC MFD driver

2016-12-20 Thread Quentin Schulz
driver re-uses the same bindings as the sun4i-ts input driver and will probe the required drivers to make the ADC and thermal sensor work. This patch adds the binding documentation for the MFD driver of the Allwinner SoCs' GPADC. Signed-off-by: Quentin Schulz --- .../devicetree/bindings/mfd/

[PATCH 1/7] Documentation: DT: bindings: iio: adc: add documentation for Allwinner SoCs' GPADC driver

2016-12-20 Thread Quentin Schulz
a touchscreen controller, the one and only channel is used for the thermal sensor. This patch adds the documentation for the driver of the Allwinner SoCs' GPADC. Signed-off-by: Quentin Schulz --- .../bindings/iio/adc/sun4i-gpadc-iio.txt | 57 ++ 1 file change

[PATCH 7/7] ARM: dtsi: sun8i-a33: add CPU thermal throttling

2016-12-20 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 --- arch/arm/boot/dts/sun8i-a33.dtsi | 47 1 file changed, 47 insertions(+) diff --git a/arch/arm/boot/dts/

[PATCH 3/7] iio: adc: sun4i-gpadc-iio: add support for A33 thermal sensor

2016-12-20 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 --- drivers/iio/adc/Kconfig | 21 ++-- drivers/iio/adc/sun4i-gpadc-iio.c

[PATCH 4/7] ARM: dts: sun8i-a33-sinlinx-sina33: add cpu-supply

2016-12-20 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 6/7] ARM: dtsi: sun8i-a33: add A33 thermal sensor

2016-12-20 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 2878a77

Re: [PATCH 3/7] iio: adc: sun4i-gpadc-iio: add support for A33 thermal sensor

2016-12-20 Thread Quentin Schulz
Hi, On 20/12/2016 15:44, Maxime Ripard wrote: > On Tue, Dec 20, 2016 at 11:27:05AM +0100, Quentin Schulz wrote: >> This adds support for the Allwinner A33 thermal sensor. >> >> Unlike the A10, A13 and A31, the Allwinner A33 only has one channel >> which is dedi

Re: [PATCH 1/7] Documentation: DT: bindings: iio: adc: add documentation for Allwinner SoCs' GPADC driver

2016-12-20 Thread Quentin Schulz
Hi, On 20/12/2016 15:25, Maxime Ripard wrote: > Hi, > > On Tue, Dec 20, 2016 at 11:27:03AM +0100, Quentin Schulz wrote: [...] >> +Currently, the touchscreen controller does not have a driver using this ADC >> +driver. The touchscreen controller is currently driven only by

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

2017-01-02 Thread Quentin Schulz
The CHR_CTRL1 register is made of 7 read-write bits with one being used to set the target voltage for battery charging. This adds the CHRG_CTRL1 register to the list of writeable registers for AXP20X and AXP22X PMICs. Signed-off-by: Quentin Schulz --- drivers/mfd/axp20x.c | 2 ++ 1 file

[PATCH 16/22] mfd: axp20x: add V_OFF to writeable regs for AXP20X and AXP22X

2017-01-02 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

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

2017-01-02 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 --- drivers/power/supply/Kconfig | 12 + drivers/power/supply/Makefile | 1 + drivers/power/supply

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

2017-01-02 Thread Quentin Schulz
supply subnode for AXP20X PMIC. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/axp209.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/axp209.dtsi b/arch/arm/boot/dts/axp209.dtsi index 1bfdc85..9ed2dd2 100644 --- a/arch/arm/boot/dts/axp209.dtsi +++ b/arch

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

2017-01-02 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 --- drivers/mfd/axp20x.c | 9 + 1 file changed, 9 insertions(+) diff --git a

[PATCH 20/22] ARM: dtsi: axp22x: add battery power supply subnode

2017-01-02 Thread Quentin Schulz
subnode for AXP22X PMIC. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/axp22x.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/axp22x.dtsi b/arch/arm/boot/dts/axp22x.dtsi index aba7fde..c4a64a5 100644 --- a/arch/arm/boot/dts/axp22x.dtsi +++ b/arch/arm/boot

[PATCH 21/22] ARM: dts: sun8i: sina33: enable battery power supply subnode

2017-01-02 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 22/22] ARM: sun5i: chip: enable battery power supply subnode

2017-01-02 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 01/22] dt-bindings: iio: adc: add AXP20X/AXP22X ADC DT binding

2017-01-02 Thread Quentin Schulz
AXP22X PMICs ADCs. Signed-off-by: Quentin Schulz --- .../devicetree/bindings/iio/adc/axp20x_adc.txt | 24 ++ 1 file changed, 24 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/axp20x_adc.txt diff --git a/Documentation/devicetree/bindings/iio/adc

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

2017-01-02 Thread Quentin Schulz
capacity (in percentage), voltage max and min limits, current voltage and battery capacity (in Ah). Signed-off-by: Quentin Schulz --- .../bindings/power/supply/axp20x_battery.txt | 27 ++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/devicetree

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

2017-01-02 Thread Quentin Schulz
default battery in the DT and the possibility to modify the OCV curve via the POWER_SUPPLY_PROP_VOLTAGE_OCV sysfs entry? Thanks, Quentin Quentin Schulz (22): dt-bindings: iio: adc: add AXP20X/AXP22X ADC DT binding mfd: axp20x: add ADC data regs to volatile regs for AXP22X iio: adc: add s

[PATCH 13/22] ARM: sun5i: chip: enable ACIN power supply subnode

2017-01-02 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 12/22] ARM: dts: sun8i: sina33: enable ACIN power supply subnode

2017-01-02 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 11/22] ARM: dtsi: axp22x: add AC power supply subnode

2017-01-02 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 --- arch/arm/boot/dts/axp22x.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/axp22x.dtsi b/arch/arm/boot/dts

[PATCH 02/22] mfd: axp20x: add ADC data regs to volatile regs for AXP22X

2017-01-02 Thread Quentin Schulz
The AXP22X PMICs have multiple ADCs, each one exposing data from the different power supplies connected to the PMIC. This adds the different ADC data registers to the volatile registers of the AXP22X PMIC. Signed-off-by: Quentin Schulz --- drivers/mfd/axp20x.c | 1 + 1 file changed, 1

[PATCH 09/22] mfd: axp20x: add AC power supply cells for AXP22X PMICs

2017-01-02 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 --- drivers/mfd/axp20x.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/mfd/axp20x.c b

[PATCH 10/22] ARM: dtsi: axp209: add AC power supply subnode

2017-01-02 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 --- arch/arm/boot/dts/axp209.dtsi | 7 +++ 1 file changed, 7

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

2017-01-02 Thread Quentin Schulz
: Quentin Schulz --- drivers/power/supply/Kconfig | 12 ++ drivers/power/supply/Makefile | 1 + drivers/power/supply/axp20x_ac_power.c | 251 + 3 files changed, 264 insertions(+) create mode 100644 drivers/power/supply/axp20x_ac_power.c diff --git

[PATCH 07/22] dt-bindings: power: supply: add AXP20X/AXP22X AC power supply

2017-01-02 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

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

2017-01-02 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 --- arch/arm/boot/dts/axp209.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm

[PATCH 06/22] ARM: dtsi: axp22x: add AXP22X ADC subnode

2017-01-02 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 --- arch/arm/boot/dts/axp22x.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm

[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. + * + */ +

[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 v9 1/3] ARM: sunxi_defconfig: Add CONFIG_THERMAL_OF

2016-12-13 Thread Quentin Schulz
le of not registering the thermal sensor in the thermal framework and thus, "quicken" the ADC readings. In most use cases, the SoC temperature is more critical (for cpu throttling for example or activating cooling devices) than ADC readings, thus it is now enabled by default. Signed-

[PATCH v9 0/3] add support for Allwinner SoCs ADC

2016-12-13 Thread Quentin Schulz
sed patch to use late_initcall for iio_hwmon probe deferring. Removal of patch for iio_hwmon probe deferring due to being applied to -next by Guenter Roeck. This patch series requires this[1] patch which has already been merged by Lee Jones. [1] https://patchwork.kernel.org/patch/9333547/

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

2016-12-13 Thread Quentin Schulz
registering the thermal sensor in the thermal framework and thus, "quicken" the ADC readings. This driver probes on three different platform_device_id to take into account slight differences (registers bit and temperature computation) between Allwinner SoCs ADCs. Signed-off-by: Quentin Schulz

[PATCH v9 2/3] mfd: Kconfig: MFD_SUN4I_GPADC depends on !TOUCHSCREN_SUN4I_GPADC

2016-12-13 Thread Quentin Schulz
MFD_SUN4I_GPADC and TOUCHSCREEN_SUN4I are incompatible (both are drivers for Allwinner SoCs' ADC). This makes sure TOUCHSCREEN_SUN4I isn't enabled while MFD_SUN4I_GPADC is enabled. Signed-off-by: Quentin Schulz --- added in v8. I wrongly put the XOR dependance for SUN4I

Re: [PATCH v2 02/11] mfd: axp20x: add volatile and writeable reg ranges for VBUS power supply driver

2016-12-19 Thread Quentin Schulz
Hi Chen-Yu, On 14/12/2016 16:43, Chen-Yu Tsai wrote: > On Fri, Dec 9, 2016 at 7:04 PM, Quentin Schulz > wrote: >> The X-Powers AXP20X and AXP22X PMICs allow to choose the maximum voltage >> and minimum current delivered by the VBUS power supply. >> >> This adds

Re: [PATCH v2] ARM: dts: sun8i: add opp-v2 table for A33

2016-12-19 Thread Quentin Schulz
hat only the following frequencies and voltages are supported by all A23-based boards: - 1008 MHz, 1220 mV - 816 MHz, 1120 mV - 600 MHz, 1040 mV Quentin -- Quentin Schulz, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

Re: [PATCH v2] ARM: dts: sun8i: add opp-v2 table for A33

2016-12-19 Thread Quentin Schulz
bits/ 64 <81600>; >>>> + opp-microvolt = <110>; >>>> + clock-latency-ns = <244144>; /* 8 32k periods */ >>>> + }; >>>> + >>>> + opp@100800 { >>>> + opp-hz = /bits/ 64 <100800>; >>>> + opp-microvolt = <120>; >>>> + clock-latency-ns = <244144>; /* 8 32k periods */ >>>> + }; >>>> + >>>> + opp@12 { >>>> + opp-hz = /bits/ 64 <12>; >>>> + opp-microvolt = <132>; >>>> + clock-latency-ns = <244144>; /* 8 32k periods */ >>>> + }; >>>> + }; >>>> + Also, there are a lot more operating points for the A33, see: https://github.com/QSchulz/linux/blob/v4.9-rc4_adc_a31_v7/cpufreq_a33/arch/arm/boot/dts/sun8i-a33.dtsi#L323-L340 They are present in the Allwinner Linux source code and in the fex of all A33-based boards. Is there a reason for not adding all opp? Quentin -- Quentin Schulz, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

[PATCH v2] phy: phy-sun4i-usb: Add log when probing

2016-11-29 Thread Quentin Schulz
When phy-sun4i-usb's probing fails, it does not print the reason in kernel log, forcing the developer to edit this driver to add info logs. This commit makes the kernel print the reason of phy-sun4i-usb's probing failure or a success message. Signed-off-by: Quentin Schulz --- Sorry for

Re: [PATCH RESEND 2/2] gpio: axp209: add pinctrl support

2016-11-29 Thread Quentin Schulz
Hi Linus, On 24/11/2016 15:17, Linus Walleij wrote: > On Wed, Nov 23, 2016 at 3:11 PM, Quentin Schulz > wrote: > >> The GPIOs present in the AXP209 PMIC have multiple functions. They >> typically allow a pin to be used as GPIO input or output and can also be >> u

[PATCH v8 2/3] mfd: Kconfig: MFD_SUN4I_GPADC depends on !TOUCHSCREN_SUN4I_GPADC

2016-12-09 Thread Quentin Schulz
MFD_SUN4I_GPADC and TOUCHSCREEN_SUN4I are incompatible (both are drivers for Allwinner SoCs' ADC). This makes sure TOUCHSCREEN_SUN4I isn't enabled while MFD_SUN4I_GPADC is enabled. Signed-off-by: Quentin Schulz --- added in v8. I wrongly put the XOR dependance for SUN4I

[PATCH v8 0/3] add support for Allwinner SoCs ADC

2016-12-09 Thread Quentin Schulz
sed patch to use late_initcall for iio_hwmon probe deferring. Removal of patch for iio_hwmon probe deferring due to being applied to -next by Guenter Roeck. This patch series requires this[1] patch which has already been merged by Lee Jones. [1] https://patchwork.kernel.org/patch/9333547/

[PATCH v8 1/3] ARM: sunxi_defconfig: Add CONFIG_THERMAL_OF

2016-12-09 Thread Quentin Schulz
le of not registering the thermal sensor in the thermal framework and thus, "quicken" the ADC readings. In most use cases, the SoC temperature is more critical (for cpu throttling for example or activating cooling devices) than ADC readings, thus it is now enabled by default. Signed-

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

2016-12-09 Thread Quentin Schulz
registering the thermal sensor in the thermal framework and thus, "quicken" the ADC readings. This driver probes on three different platform_device_id to take into account slight differences (registers bit and temperature computation) between Allwinner SoCs ADCs. Signed-off-by: Quentin Schulz

[PATCH v2 07/11] ARM: dtsi: add DTSI for AXP223

2016-12-09 Thread Quentin Schulz
The AXP223 shares most of its logic with the AXP221 but it has some differences for the VBUS driver. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai --- v2: - adding small explanation of AXP223 variation compared to AXP221, arch/arm/boot/dts/axp223.dtsi | 58

[PATCH v2 03/11] power: supply: axp20x_usb_power: set min voltage and max current from sysfs

2016-12-09 Thread Quentin Schulz
AXP20X and AXP22X PMICs allow setting the min voltage and max current of VBUS power supply. This adds entries in sysfs to allow to do so. Signed-off-by: Quentin Schulz --- v2: - moving defines from header mfd/axp20x.h to the driver, - adding two functions to reduce indentation in

[PATCH v2 04/11] Documentation: DT: binding: axp20x_usb_power: add axp223 compatible

2016-12-09 Thread Quentin Schulz
This adds the "x-powers,axp223-usb-power-supply" to the list of compatibles for AXP20X VBUS power supply driver. Signed-off-by: Quentin Schulz --- v2: - adding small explanation on AXP223 variation compared to the AXP221, Documentation/devicetree/bindings/power/supply/axp20x_usb

[PATCH v2 05/11] power: supply: axp20x_usb_power: add 100mA max current limit for AXP223

2016-12-09 Thread Quentin Schulz
. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai --- drivers/power/supply/axp20x_usb_power.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c index 9e3f4ae..1bcb025 100644 --- a

[PATCH v2 02/11] mfd: axp20x: add volatile and writeable reg ranges for VBUS power supply driver

2016-12-09 Thread Quentin Schulz
The X-Powers AXP20X and AXP22X PMICs allow to choose the maximum voltage and minimum current delivered by the VBUS power supply. This adds the register used by the VBUS power supply driver to the range of volatile and writeable regs ranges. Signed-off-by: Quentin Schulz --- added in v2

[PATCH v2 00/11] add support for VBUS max current and min voltage limits AXP20X and AXP22X PMICs

2016-12-09 Thread Quentin Schulz
changes in v2 and adding volatile and writeable regs to AXP20X and AXP22X MFD cells for the VBUS power supply driver. Quentin Schulz (11): power: supply: axp20x_usb_power: use of_device_id data field instead of device_is_compatible mfd: axp20x: add volatile and writeable reg ranges for VBUS

[PATCH v2 09/11] ARM: dts: sun8i-a33-sinlinx-sina33: use AXP223 DTSI

2016-12-09 Thread Quentin Schulz
Previously, the Sinlinx SinA33 used everything declared in AXP221 DTSI while it has an AXP223 PMIC. This corrects that so the Sinlinx SinA33 can get some features the AXP223 has (at the moment, ability to have 100mA as maximal current on VBUS power supply). Signed-off-by: Quentin Schulz Acked

[PATCH v2 06/11] mfd: axp20x: add separate MFD cell for AXP223

2016-12-09 Thread Quentin Schulz
confusion. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai --- v2: - correct indentation, - renaming axp22x_cells to axp221_cells to avoid confusion between axp22x, axp221 and axp223 drivers/mfd/axp20x.c | 28 1 file changed, 24 insertions(+), 4 deletions

[PATCH v2 08/11] ARM: dts: sun8i-a33-olinuxino: use AXP223 DTSI

2016-12-09 Thread Quentin Schulz
Previously, the Olimex A33-OlinuXino used everything declared in AXP221 DTSI while it has an AXP223 PMIC. This corrects that so the Olimex A33-OlinuXino can get some features the AXP223 has (at the moment, ability to have 100mA as maximal current on VBUS power supply). Signed-off-by: Quentin

[PATCH v2 11/11] ARM: dtsi: sun8i-reference-design-tablet: use AXP223 DTSI

2016-12-09 Thread Quentin Schulz
Previously, the sun8i tablets used everything declared in AXP221 DTSI while they have an AXP223 PMIC. This corrects that so the sun8i tablets can get some features the AXP223 has (at the moment, ability to have 100mA as maximal current on VBUS power supply). Signed-off-by: Quentin Schulz Acked

[PATCH v2 01/11] power: supply: axp20x_usb_power: use of_device_id data field instead of device_is_compatible

2016-12-09 Thread Quentin Schulz
This replaces calls to of_device_is_compatible to check data field of of_device_id matched when probing the driver. Signed-off-by: Quentin Schulz --- drivers/power/supply/axp20x_usb_power.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers

[PATCH v2 10/11] ARM: dts: sun8i-r16-parrot: use AXP223 DTSI

2016-12-09 Thread Quentin Schulz
Previously, the Allwinner Parrot R16 used everything declared in AXP221 DTSI while it has an AXP223 PMIC. This corrects that so the Allwinner Parrot R16 can get some features the AXP223 has (at the moment, ability to have 100mA as maximal current on VBUS power supply). Signed-off-by: Quentin

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

2016-12-11 Thread Quentin Schulz
Hi Maxime, On 10/12/2016 10:44, Maxime Ripard wrote: > Hi, > > Just some minor comments. > > On Fri, Dec 09, 2016 at 11:22:36AM +0100, Quentin Schulz wrote: >> +/* >> + * Since the thermal sensor needs the IP to be in touchscreen mode and >> + * th

Re: [PATCH v2 00/11] add support for VBUS max current and min voltage limits AXP20X and AXP22X PMICs

2016-12-12 Thread Quentin Schulz
df page 33, REG 30H, BITS 0 & 1 [2] http://dl.linux-sunxi.org/AXP/AXP221%20Datasheet%20V1.2%2020130326%20.pdf page 33, REG 30H, BITS 0 & 1 => 不限流 is written for when the BIT(1) is set. Thanks, Quentin On 09/12/2016 12:04, Quentin Schulz wrote: > The X-Powers AXP209 and AXP20X PMICs ar

<    1   2   3   4   5   6   7   >