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

2017-02-15 Thread Quentin Schulz
Tested with a SAMA5D2 SoC (CREL = 0x31040730) Signed-off-by: Florian Vallee <fval...@eukrea.fr> Tested-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drivers/net/can/m_can/m_can.c | 38 +++--- 1 file changed, 35 insertions(+), 3 deletions(-) di

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

2016-09-05 Thread Quentin Schulz
On 05/09/2016 10:07, Peter Meerwald-Stadler 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 ADC. >>> >>> nitpicking ahead > >> [...] +

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

2016-09-01 Thread Quentin Schulz
On 31/08/2016 13:56, Lee Jones wrote: > On Wed, 24 Aug 2016, Maxime Ripard wrote: > >> Hi Lee, >> >> On Tue, Aug 09, 2016 at 02:48:47PM +0100, Lee Jones wrote: >>> On Tue, 26 Jul 2016, Quentin Schulz wrote: >>> >>>> When an MFD cell has

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

2016-09-01 Thread Quentin Schulz
ul 26, 2016 at 12:00:33PM +0200, 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: >>>>

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

2016-09-01 Thread Quentin Schulz
On 01/09/2016 09:15, Quentin Schulz wrote: > On 15/08/2016 23:35, Jonathan Cameron wrote: >> >> >> On 15 August 2016 18:07:30 BST, Guenter Roeck <li...@roeck-us.net> wrote: >>> On Mon, Aug 15, 2016 at 04:40:21PM +0100, Jonathan Cameron wrote: >>

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

2016-09-08 Thread Quentin Schulz
the 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 <quentin.sch...@free-electrons.

[PATCH v5 1/3] hwmon: iio_hwmon: defer probe when no channel is found

2016-09-08 Thread Quentin Schulz
of 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 <quentin.sch...@free-electrons.com> --- v5: - patch re-inserted, v3: - patch removed, drivers/hwmon/iio_hwmon.c | 5 -

[PATCH v5 2/3] mfd: add support for Allwinner SoCs ADC

2016-09-08 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 <quentin.sch...@f

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

2016-09-08 Thread Quentin Schulz
gister(>dev, 0, info, _ts_tz_ops); we now have: tzd = devm_thermal_zone_of_sensor_register(pdev->dev.parent, 0, info, _ts_tz_ops); Removal of proposed patch to use late_initcall for iio_hwmon probe deferring. Quentin Schulz (3): hwm

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

2016-09-05 Thread Quentin Schulz
On 04/09/2016 16:35, Jonathan Cameron wrote: > On 01/09/16 15:05, 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 v4 3/3] iio: adc: add support for Allwinner SoCs ADC

2016-09-05 Thread Quentin Schulz
for sunxi platforms' (A10, A13 and A31) GPADC >> + * >> + * Copyright (c) 2016 Quentin Schulz <quentin.schulz@free-electrons> > > email address is incomplete > As in my other patches, thanks! >> + * >> + * This program is free software; you can

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

2016-09-05 Thread Quentin Schulz
On 05/09/2016 09:07, Maxime Ripard wrote: > Hi, > > Nitpicks ahead. > > On Thu, Sep 01, 2016 at 04:05:05PM +0200, Quentin Schulz wrote: >> +info->soc_specific = (struct soc_specific >> *)platform_get_device_id(pdev)->driver_data; > > This line

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

2016-09-07 Thread Quentin Schulz
for sunxi platforms' (A10, A13 and A31) GPADC >> + * >> + * Copyright (c) 2016 Quentin Schulz <quentin.schulz@free-electrons> > > email address is incomplete > As in my other patches, thanks! >> + * >> + * This program is free software; you can

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

2016-09-07 Thread Quentin Schulz
On 04/09/2016 16:35, Jonathan Cameron wrote: > On 01/09/16 15:05, 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

[PATCH v4 1/3] hwmon: iio_hwmon: delay probing with late_initcall

2016-09-01 Thread Quentin Schulz
() as their init. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- v4: - use platform_driver_register instead of platform_register_drivers, v3: - use late_initcall instead of deferring probe, drivers/hwmon/iio_hwmon.c | 12 +++- 1 file changed, 11 insertions

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

2016-09-01 Thread Quentin Schulz
ver) instead of: tzd = devm_thermal_zone_of_sensor_register(>dev, 0, info, _ts_tz_ops); we now have: tzd = devm_thermal_zone_of_sensor_register(pdev->dev.parent, 0, info, _ts_tz_ops); Quentin Schulz (3): hwmon

[PATCH v4 2/3] mfd: add support for Allwinner SoCs ADC

2016-09-01 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 <quentin.sch...@f

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

2016-09-01 Thread Quentin Schulz
the 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 <quentin.sch...@free-electrons.

Re: [PATCH v5 2/3] mfd: add support for Allwinner SoCs ADC

2016-09-12 Thread Quentin Schulz
On 12/09/2016 11:18, Lee Jones wrote: > On Thu, 08 Sep 2016, Quentin Schulz wrote: > [...] >> + To compile this driver as a module, choose M here: the module will be >> + called sun4i-gpadc-mfd. > > Drop the -mfd. > >> config MFD_AS3711 >>

Re: [PATCH v5 2/3] mfd: add support for Allwinner SoCs ADC

2016-09-12 Thread Quentin Schulz
On 12/09/2016 11:59, Lee Jones wrote: > On Mon, 12 Sep 2016, Quentin Schulz wrote: > >> On 12/09/2016 11:18, Lee Jones wrote: >>> On Thu, 08 Sep 2016, Quentin Schulz wrote: >>> >> [...] > > [...] > >>>> +++ b/drivers/mfd/sun

Re: [PATCH v5 2/3] mfd: add support for Allwinner SoCs ADC

2016-09-12 Thread Quentin Schulz
On 12/09/2016 12:49, Lee Jones wrote: > On Mon, 12 Sep 2016, Maxime Ripard wrote: > >> On Mon, Sep 12, 2016 at 10:59:23AM +0100, Lee Jones wrote: >> +static const struct of_device_id sun4i_gpadc_mfd_of_match[] = { >> +{ >> +.compatible =

[PATCH v6 0/2] add support for Allwinner SoCs ADC

2016-09-15 Thread Quentin Schulz
probe deferring. Removal of patch for iio_hwmon probe deferring due to being applied to -next by Guenter Roeck. Quentin Schulz (2): mfd: add support for Allwinner SoCs ADC iio: adc: add support for Allwinner SoCs ADC drivers/iio/adc/Kconfig | 13 + drivers/iio/adc/Makefile

[PATCH v6 1/2] mfd: add support for Allwinner SoCs ADC

2016-09-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 <quentin.sch...@f

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

2016-09-15 Thread Quentin Schulz
the 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 <quentin.sch...@free-electrons.

Re: [PATCH v5 2/3] mfd: add support for Allwinner SoCs ADC

2016-09-13 Thread Quentin Schulz
On 12/09/2016 15:56, Lee Jones wrote: > On Mon, 12 Sep 2016, Quentin Schulz wrote: >> On 12/09/2016 11:59, Lee Jones wrote: >>> On Mon, 12 Sep 2016, Quentin Schulz wrote: >>> >>>> On 12/09/2016 11:18, Lee Jones wrote: >>

Re: [PATCH 4/5] input: touchscreen: support Allwinner SoCs' touchscreen

2016-09-25 Thread Quentin Schulz
On 24/07/2016 13:24, Jonathan Cameron wrote: > On 20/07/16 09:29, Quentin Schulz wrote: >> This adds support for Allwinner SoCs' (A10, A13 and A31) resistive >> touchscreen. This driver is probed by the MFD sunxi-gpadc-mfd. >> >> This driver uses ADC channels expose

Re: [PATCH 3/5] iio: adc: sunxi-gpadc-iio: enable iio_buffers

2016-09-25 Thread Quentin Schulz
On 25/09/2016 11:10, Jonathan Cameron wrote: > On 24/09/16 18:40, Quentin Schulz wrote: >> Hi Jonathan, >> >> Sorry for the (long) delay, I did not have time to work on it. I'll >> mainly work in my free time now. >> >> Keep in mind this patch was prop

Re: [PATCH 3/5] iio: adc: sunxi-gpadc-iio: enable iio_buffers

2016-09-24 Thread Quentin Schulz
, so comments here might include references to code parts added later in the ADC patch series. On 24/07/2016 13:03, Jonathan Cameron wrote: > On 20/07/16 09:29, Quentin Schulz wrote: >> This enables the use of buffers on ADC channels of sunxi-gpadc-iio driver. >> It also prepares

Re: [PATCH 4/5] input: touchscreen: support Allwinner SoCs' touchscreen

2016-09-24 Thread Quentin Schulz
Hi Dimitry, Sorry for the (long) delay, I did not have time to work on it. I'll mainly work in my free time now. On 20/07/2016 19:25, Dmitry Torokhov wrote: > Hi Quentin, > > On Wed, Jul 20, 2016 at 10:29:10AM +0200, Quentin Schulz wrote: >> This adds support for Allwinner

Re: [PATCH 2/2] clk: sunxi-ng: fix up PLL_CPUX adjusting for A23/A33

2016-11-06 Thread Quentin Schulz
_a33_ccu_setup(struct device_node > *node) > writel(val, reg + SUN8I_A33_PLL_MIPI_REG); > > sunxi_ccu_probe(node, reg, _a33_ccu_desc); > + > + ccu_mux_notifier_register(pll_cpux_clk.common.hw.clk, > + _a33_cpu_nb); > } > CLK_OF_DECLARE(sun8i_a33_ccu, "allwinner,sun8i-a33-ccu", > sun8i_a33_ccu_setup); > -- Quentin Schulz, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

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

2016-11-23 Thread Quentin Schulz
. [1] see registers 90H, 92H and 93H at http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- .../devicetree/bindings/gpio/gpio-axp209.txt | 28 +- drivers/gpio/gpio-axp209.c

[PATCH RESEND 1/2] gpio: axp209: use correct register for GPIO input status

2016-11-23 Thread Quentin Schulz
The GPIO input status was read from control register (AXP20X_GPIO[210]_CTRL) instead of status register (AXP20X_GPIO20_SS). Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drivers/gpio/gpio-axp209.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff

[PATCH RESEND 0/2] add support for AXP209 GPIOs functions

2016-11-23 Thread Quentin Schulz
/AXP209_Datasheet_v1.0en.pdf Quentin Schulz (2): gpio: axp209: use correct register for GPIO input status gpio: axp209: add pinctrl support .../devicetree/bindings/gpio/gpio-axp209.txt | 28 +- drivers/gpio/gpio-axp209.c | 557 ++--- 2 files changed

[PATCH 0/2] add support for AXP209 GPIOs functions

2016-11-23 Thread Quentin Schulz
/AXP209_Datasheet_v1.0en.pdf Quentin Schulz (2): gpio: axp209: use correct register for GPIO input status gpio: axp209: add pinctrl support .../devicetree/bindings/gpio/gpio-axp209.txt | 28 +- drivers/gpio/gpio-axp209.c | 557 ++--- 2 files changed

[PATCH 1/2] gpio: axp209: use correct register for GPIO input status

2016-11-23 Thread Quentin Schulz
The GPIO input status was read from control register (AXP20X_GPIO[210]_CTRL) instead of status register (AXP20X_GPIO20_SS). Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drivers/gpio/gpio-axp209.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff

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

2016-11-23 Thread Quentin Schulz
. [1] see registers 90H, 92H and 93H at http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- .../devicetree/bindings/gpio/gpio-axp209.txt | 28 +- drivers/gpio/gpio-axp209.c

[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 <quentin.sch...@free-electrons.com> --- drivers/power/supply/axp20x_usb_power.c | 72 + i

[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 <quentin.sch...@free-electrons.com> --- Documentation/devicetree/bindings/power/supply/axp20x_usb_power.txt | 1 + 1 file changed, 1 in

[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

[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 <quentin.sch...@free-electrons.com> --- drivers/power/supply/axp20x_usb_power.c | 39 - 1 file changed, 24 inse

[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 <quentin.sch...@free-electrons.

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

2016-11-25 Thread Quentin Schulz
the 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 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 <quentin.sch...@free-electrons.com> --- 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..6

[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 <quentin.sch...@free-electrons.com> --- arch/arm/boot/dts/axp223.dtsi | 55 +++ 1 file changed, 55 insertions(+) creat

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 v7 2/3] ARM: sunxi_defconfig: Add CONFIG_THERMAL_OF

2016-11-03 Thread Quentin Schulz
This enables CONFIG_THERMAL_OF by default for sunxi_defconfig. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- added in v7 arch/arm/configs/sunxi_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/c

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

2016-11-03 Thread Quentin Schulz
of not 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: Quen

[PATCH v7 1/3] input: touchscreen: TOUCHSCREEN_SUN4I depends on !SUN4I_GPADC

2016-11-03 Thread Quentin Schulz
SUN4I_GPADC and TOUCHSCREEN_SUN4I are incompatible (both are drivers for Allwinner SoCs' ADC). This makes sure TOUCHSCREEN_SUN4I isn't enabled while SUN4I_GPADC is enabled. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- added in v7 drivers/input/touchscreen/Kconf

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

2016-11-03 Thread Quentin Schulz
n 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/ Quentin Schulz (3): input: touchscreen: TOUCHSCREEN

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 > <quentin.sch...@free-electrons.com> wrote: > >> The GPIOs present in the AXP209 PMIC have multiple functions. They >> typically allow a pin to be used as GPIO i

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

2016-12-09 Thread Quentin Schulz
of not 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: Quen

[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 <quentin.sch...@free-electrons.com> --- added in v8. I wrongly put the XOR depe

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

2016-12-09 Thread Quentin Schulz
n 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/ Quentin Schulz (3): ARM: sunxi_defconfig:

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

2016-12-09 Thread Quentin Schulz
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-off-b

[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 <quentin.sch...@free-electrons.com> --- v2: - adding small explanation on AXP223 variation compared to the AXP221, Documentation/dev

[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 <quentin.sch...@free-electrons.com> Acked-by: Chen-Yu Tsai <w...@csie.org> --- 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/

[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 <quentin.sch...@f

[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 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 <quentin.sch...@free-electrons.com> --- drivers/power/supply/axp20x_usb_power.c | 26 +++--- 1 file changed, 15 insertions(

[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

[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

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

2016-12-09 Thread Quentin Schulz
confusion. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> Acked-by: Chen-Yu Tsai <w...@csie.org> --- v2: - correct indentation, - renaming axp22x_cells to axp221_cells to avoid confusion between axp22x, axp221 and axp223 drivers/mfd/axp20x.c | 28 +++

[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

[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 <quentin.sch...@free-electrons.com> Acked-by: Chen-Yu Tsai <w...@csie.org> --- v2: - adding small explanation of AXP223 variation compared to AXP221

[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 <quentin.sch...@free-electrons.com> --- v2: - moving defines from header mfd/axp20x.h to the driver, - adding two fun

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 >> +

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
ge 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

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

2016-12-13 Thread Quentin Schulz
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-off-b

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

2016-12-13 Thread Quentin Schulz
of not 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: Quen

[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 <quentin.sch...@free-electrons.com> --- added in v8. I wrongly put the XOR depe

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

2016-12-13 Thread Quentin Schulz
n 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/ Quentin Schulz (3): ARM: sunxi_defconfig:

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 patc

[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 <quentin.sch...@f

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 > <quentin.sch...@free-electrons.com> wrote: >> The CHR_CTRL1 register is made of 7 read-write bits with one being used >> to set the target voltage for battery charging. > >

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 > <quentin.sch...@free-electrons.com> wrote: [...] >> + >> +#define AXP20X_ADC_RATE_MASK (3 << 6) >> +#define AXP20X_ADC_RATE_25HZ

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 > <quentin.sch...@free-electrons.com> 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 >&g

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 > <quentin.sch...@free-electrons.com> wrote: >> X-Powers AXP209 PMIC has multiple ADCs, each one exposing data from the >> different power supplies connected to the PMIC. >>

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 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

[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 <quentin.sch...@free-electrons.com> --- drivers/mfd/axp20x.c | 10 ++ 1 file changed, 10 inse

[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 <quentin.sch...@free-electrons.com> --- arch/arm/boot/dts/axp209.dtsi | 5 + 1 file chan

[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 <quentin.sch...@free-electrons.com> --- arch/arm/boot/dts/axp22x.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/ar

[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 <quentin.sch...@free-electrons.com> --- arch/arm/boot/dts/

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

2017-01-02 Thread Quentin Schulz
-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- 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

[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 <quentin.sch...@free-electrons.com> --- arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 4 1 file changed, 4 insertions(+) diff --git

[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 <quentin.sch...@free-electrons.com> --- drive

[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 <quentin.

[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 <quentin.sch...@free-electrons.com> --- 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/bo

[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 <quentin.sch...@free-electrons.com> --- arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 4 1 file changed, 4 insertions(+)

[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 <quentin.sch...@free-electrons.com> --- arch/arm/boot/dts/sun5i-r8-chip.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/bo

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

2017-01-02 Thread Quentin Schulz
and AXP22X PMICs ADCs. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- .../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

[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 <quentin.sch...@free-electrons.com> --- .../bindings/power/supply/axp20x_battery.txt | 27 ++ 1 file changed, 27 insertions(+) creat

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

2017-01-02 Thread Quentin Schulz
the 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: a

[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 <quentin.sch...@free-electrons.com> --- arch/arm/boot/dts/sun5i-r8-chip.dts | 4 1 file changed, 4 inse

[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 <quentin.sch...@free-electrons.com> --- drivers/mfd/axp20x.c | 9 +

[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 <quentin.sch...@free-electrons.com> --- drivers/power/supply/Kconfig | 12 + drivers/power/supply/Ma

<    1   2   3   4   5   6   7   8   9   10   >