[PATCH 1/2] can: m_can: move Message RAM initialization to function

2017-05-03 Thread Quentin Schulz
it can be called separately from device initialization from Device Tree. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drivers/net/can/m_can/m_can.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers/net/can/m_can/m_c

Re: [PATCH 1/2] ARM: at91/defconfig: make system tickless when idle

2017-05-12 Thread Quentin Schulz
Hi all, On 05/05/2017 10:43, Quentin Schulz wrote: > This makes Atmel sama5 platforms' system tickless when idle. > > Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> It's been a week since I posted this patch series. Any comment? Thanks, Quentin > --- &

[PATCH] iio: adc: sun4i-gpadc-iio: fix parent device being used in devm function

2017-05-15 Thread Quentin Schulz
Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> Reported-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/iio/adc/sun4i-gpadc-iio.c | 31 ++- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/drivers/iio/adc/sun4i-gpadc-ii

Re: [PATCH v4 1/4] can: m_can: move Message RAM initialization to function

2017-05-12 Thread Quentin Schulz
Hi all, On 05/05/2017 15:50, Quentin Schulz wrote: > To avoid possible ECC/parity checksum errors when reading an > uninitialized buffer, the entire Message RAM is initialized when probing > the driver. This initialization is done in the same function reading the > Device Tre

[PATCH] ASoC: atmel-classd: sync regcache when resuming

2017-05-15 Thread Quentin Schulz
The PM functions used in this driver are the ones defined in sounc/soc/soc-core.c. When suspending (using snd_soc_suspend), the regcache is marked dirty but is never synced on resume. Sync regcache on resume of Atmel ClassD device. Signed-off-by: Quentin Schulz <quentin.sch...@f

Re: [PATCH] iio: adc: sun4i-gpadc-iio: fix parent device being used in devm function

2017-05-15 Thread Quentin Schulz
Hi Maxime, On 15/05/2017 11:11, Maxime Ripard wrote: > On Mon, May 15, 2017 at 09:39:02AM +0200, Quentin Schulz wrote: >> For the sake of DT binding stability, this IIO driver is a child of an >> MFD driver for Allwinner A10, A13 and A31 because there already exists a >> D

[PATCH 4/4] power: supply: axp20x_battery: add DT support for battery max constant charge current

2017-05-11 Thread Quentin Schulz
this might damage the battery. The reason for letting the user change the maximum constant charge current is for letting users change the battery and thus, let them adjust the maximum constant charge current according to what the battery can support. Signed-off-by: Quentin Schulz <quentin.sch...@f

[PATCH 0/4] set battery info on AXP20X and AXP22X from DT

2017-05-11 Thread Quentin Schulz
would like to switch the battery attached to their board, so they can set an appropriate constant current charge and take advantage of higher constant current charge. Quentin Quentin Schulz (4): power: supply: axp20x_battery: add support for DT battery dt-bindings: power: battery: add constant

[PATCH 1/4] power: supply: axp20x_battery: add support for DT battery

2017-05-11 Thread Quentin Schulz
. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drivers/power/supply/axp20x_battery.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c index 5d29b2eab8fc..66f530541735

[PATCH 2/4] dt-bindings: power: battery: add constant-charge-current-max-microamp property

2017-05-11 Thread Quentin Schulz
This adds the constant-charge-current-max-microamp 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 <quentin.sch...@free-electrons.com> --- Documen

[PATCH 3/4] power: supply: power_supply_core: add constant-charge-current optional property

2017-05-11 Thread Quentin Schulz
This adds the constant-charge-current 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 <quentin.sch...@free-electrons.com> --- drivers/power/

Re: [BUG] crash when removing sun4i_gpadc_iio module

2017-05-09 Thread Quentin Schulz
00 0013 >> 6fffd861 6fffdc61 >> [80105.577558] [] (arch_timer_read_counter_long) from [<0010>] >> (0x10) >> [80105.584952] Code: bad PC value >> [80105.588283] ---[ end trace ff84d9d449c6a5b5 ]--- >> >> Regards >> Corentin Labbe >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-iio" in >> the body of a message to majord...@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> > -- Quentin Schulz, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

[PATCH v2] iio: adc: sun4i-gpadc-iio: fix parent device being used in devm function

2017-05-18 Thread Quentin Schulz
Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> Reported-by: Corentin Labbe <clabbe.montj...@gmail.com> --- v2: - save struct device used to register in thermal framework in sun4i_gpadc_iio, - use this struct device to unregister from thermal framework instead of doi

Re: [PATCH 1/4] power: supply: axp20x_battery: add support for DT battery

2017-05-16 Thread Quentin Schulz
Hi Chen-Yu, On 16/05/2017 07:18, Chen-Yu Tsai wrote: > On Thu, May 11, 2017 at 9:42 PM, Quentin Schulz > <quentin.sch...@free-electrons.com> wrote: >> This adds support in X-Powers AXP20X and AXP22X battery driver for a >> fixed battery in DT. >> >> It wil

[PATCH] PCI: imx6: add regulator support

2017-06-08 Thread Quentin Schulz
process and will be disabled when shutting down. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- .../devicetree/bindings/pci/fsl,imx6q-pcie.txt | 4 +++ drivers/pci/dwc/pci-imx6.c | 34 +- 2 files changed, 37 insertions

Re: [PATCH 1/2] mmc: sdhci-of-at91: factor out clks and presets setting

2017-06-20 Thread Quentin Schulz
Hi Adrian, On 20/06/2017 08:36, Adrian Hunter wrote: > On 16/06/17 10:29, Quentin Schulz wrote: >> The setting of clocks and presets is currently done in probe only but >> once deep PM support is added, it'll be needed in the resume function. >> >> Let's create

Re: [PATCH 2/2] mmc: sdhci-of-at91: set clocks and presets after resume from deepest PM

2017-06-20 Thread Quentin Schulz
Hi Adrian, On 20/06/2017 09:39, Adrian Hunter wrote: > On 16/06/17 10:29, Quentin Schulz wrote: >> This adds deepest (Backup+Self-Refresh) PM support to the ATMEL SAMA5D2 >> SoC's SDHCI controller. >> >> When resuming from deepest state, it is required to

[PATCH 5/6] clk: at91: clk-generated: make gclk determine audio_pll rate

2017-06-23 Thread Quentin Schulz
to be re-worked once we have a rate locking system so two clocks could be children of the same clock and be sure the clock rate isn't changed by one or the other. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drivers/clk/at91/clk-generated.

[PATCH 1/6] clk: at91: clk-generated: remove useless divisor loop

2017-06-23 Thread Quentin Schulz
(passed along req argument of the function) and the parent clock rate, thus we know the closest rounded divisor, we don't need to iterate over the available divisors to find the best one for a given clock. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drivers/clk/at

[PATCH 6/6] ARM: dts: at91: sama5d2_xplained: add pin muxing and enable classd

2017-06-23 Thread Quentin Schulz
From: Cyrille Pitchen <cyrille.pitc...@atmel.com> This patch adds the pin muxing for classd and enables it. Signed-off-by: Cyrille Pitchen <cyrille.pitc...@atmel.com> Signed-off-by: Nicolas Ferre <nicolas.fe...@atmel.com> Signed-off-by: Quentin Schulz <quentin.sch.

[PATCH 2/6] clk: at91: add audio pll clock driver

2017-06-23 Thread Quentin Schulz
ed-off-by: Nicolas Ferre <nicolas.fe...@atmel.com> Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- .../devicetree/bindings/clock/at91-clock.txt | 10 + arch/arm/mach-at91/Kconfig | 4 + drivers/clk/at91/Makefile |

[PATCH 4/6] clk: at91: clk-generated: create function to find best_diff

2017-06-23 Thread Quentin Schulz
The way to find the best_diff and do the appropriate process afterwards can be re-used. This patch prepares the driver for an upcoming patch that will allow clk_generated to determine the rate of the audio_pll. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drive

[PATCH 0/6] add support for Sama5d2 audio PLL and enable ClassD

2017-06-23 Thread Quentin Schulz
://patchwork.kernel.org/patch/9462349/ [4] https://www.spinics.net/lists/arm-kernel/msg436120.html Cyrille Pitchen (2): ARM: dts: at91: sama5d2: add classd nodes ARM: dts: at91: sama5d2_xplained: add pin muxing and enable classd Nicolas Ferre (1): clk: at91: add audio pll clock driver Quentin Schulz (3): clk

[PATCH 3/6] ARM: dts: at91: sama5d2: add classd nodes

2017-06-23 Thread Quentin Schulz
From: Cyrille Pitchen <cyrille.pitc...@atmel.com> This patch adds nodes for the classd device and its generated clock. Signed-off-by: Cyrille Pitchen <cyrille.pitc...@atmel.com> Signed-off-by: Nicolas Ferre <nicolas.fe...@atmel.com> Signed-off-by: Quentin Schulz &l

[PATCH] net: fec: add post PHY reset delay DT property

2017-05-22 Thread Quentin Schulz
and are default to 1ms. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- Documentation/devicetree/bindings/net/fsl-fec.txt | 5 + drivers/net/ethernet/freescale/fec_main.c | 17 +++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff

Re: [PATCH] net: fec: add post PHY reset delay DT property

2017-05-22 Thread Quentin Schulz
Hi Andrew On 22/05/2017 15:57, Andrew Lunn wrote: > On Mon, May 22, 2017 at 11:15:17AM +0200, Quentin Schulz wrote: >> Some PHY require to wait for a bit after the reset GPIO has been >> toggled. This adds support for the DT property `phy-reset-post-delay` >> which gives the

[PATCH v2] net: fec: add post PHY reset delay DT property

2017-05-23 Thread Quentin Schulz
. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- v2: - return -EINVAL when phy-reset-post-delay is greater than 1000ms instead of defaulting to 1ms, - remove `default to 1ms` when phy-reset-post-delay > 1000Ms from DT binding doc and commit log, - move

[PATCH 1/2] mmc: sdhci-of-at91: factor out clks and presets setting

2017-06-16 Thread Quentin Schulz
The setting of clocks and presets is currently done in probe only but once deep PM support is added, it'll be needed in the resume function. Let's create a function for this setting. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drivers/mmc/host/sdhci-of-at91.c

[PATCH 2/2] mmc: sdhci-of-at91: set clocks and presets after resume from deepest PM

2017-06-16 Thread Quentin Schulz
to be reconfigured as well. The other registers and init process are taken care of by the SDHCI core. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drivers/mmc/host/sdhci-of-at91.c | 34 -- 1 file changed, 32 insertions(+), 2 deletions(-)

[PATCH v3 1/2] can: m_can: move Message RAM initialization to function

2017-05-05 Thread Quentin Schulz
it can be called separately from device initialization from Device Tree. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drivers/net/can/m_can/m_can.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers/net/can/m_can/m_c

[PATCH v3 2/2] can: m_can: add deep Suspend/Resume support

2017-05-05 Thread Quentin Schulz
This adds Power Management deep Suspend/Resume support for Bosch M_CAN chip. When entering deep sleep, the clocks are gated, the interrupts are disabled. When resuming from deep sleep, the chip needs to be reinitialized, the clocks ungated and the interrupts enabled. Signed-off-by: Quentin

[PATCH 2/2] ARM: at91/defconfig: enable HIGH_RES_TIMERS

2017-05-05 Thread Quentin Schulz
This enables by default the high resolution timers on sama5d2 platforms. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- arch/arm/configs/sama5_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_def

[PATCH 1/2] ARM: at91/defconfig: make system tickless when idle

2017-05-05 Thread Quentin Schulz
This makes Atmel sama5 platforms' system tickless when idle. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- arch/arm/configs/sama5_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig

[PATCH v4 1/4] can: m_can: move Message RAM initialization to function

2017-05-05 Thread Quentin Schulz
it can be called separately from device initialization from Device Tree. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- v4: - remove unused variables from m_can_of_parse_mram, drivers/net/can/m_can/m_can.c | 26 +++--- 1 file changed, 15 inse

[PATCH v4 3/4] can: m_can: factorize clock gating and ungating

2017-05-05 Thread Quentin Schulz
This creates a function to ungate M_CAN clocks and another to gate the same clocks, then swaps all gating/ungating code with their respective function. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- added in v4 drivers/net/can/m_can/m_can.

[PATCH v4 2/4] can: m_can: make m_can_start and m_can_stop symmetric

2017-05-05 Thread Quentin Schulz
This moves clocks gating outside of the m_can_stop function as the m_can_start function does not (and cannot, at least in current implementation) ungate clocks. This way, both functions can now be used symmetrically. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> ---

[PATCH v4 4/4] can: m_can: add deep Suspend/Resume support

2017-05-05 Thread Quentin Schulz
This adds Power Management deep Suspend/Resume support for Bosch M_CAN chip. When entering deep sleep, the clocks are gated, the interrupts are disabled. When resuming from deep sleep, the chip needs to be reinitialized, the clocks ungated and the interrupts enabled. Signed-off-by: Quentin

Re: [PATCH v4 4/6] iio: adc: sun4i-gpadc-iio: add support for H3 thermal sensor

2017-09-16 Thread Quentin Schulz
utdown your board? The H3 apparently supports IRQs, why do you not support them for the temperature? They might be broken as it is on A33 but then it might be a good idea to write it down in a comment in the driver (and not adding the unused registers in the header file) or at least in the commit log. 3) Now that you have support for clocks, wouldn't it be a good idea to disable them during suspend? Thanks, Quentin -- Quentin Schulz, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

Re: [PATCH v4 6/6] ARM: sun8i: h3: add partial CPU thermal zone

2017-09-16 Thread Quentin Schulz
polling-delay-passive = <250>; > + polling-delay = <1000>; > + thermal-sensors = <>; > + }; > + }; > + > timer { > compatible = "arm,armv7-timer"; >

Re: [PATCH v4 4/6] iio: adc: sun4i-gpadc-iio: add support for H3 thermal sensor

2017-09-16 Thread Quentin Schulz
Hi Icenowy, On 16/09/2017 12:14, icen...@aosc.io wrote: > 在 2017-09-16 17:45,Quentin Schulz 写道: >> Hi Icenowy, >> >> On 14/09/2017 16:52, Icenowy Zheng wrote: >>> This adds support for the Allwinner H3 thermal sensor. >>> >>> Allwinner H3 has a

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

2017-10-04 Thread Quentin Schulz
Hi Chen-Yu, Linus, On 03/10/2017 17:08, Chen-Yu Tsai wrote: > On Tue, Oct 3, 2017 at 10:47 PM, Maxime Ripard > <maxime.rip...@free-electrons.com> wrote: >> Hi Linus, >> >> On Tue, Oct 03, 2017 at 09:27:17AM +, Linus Walleij wrote: >>> On Mon,

[PATCH v2 06/10] pinctrl: axp209: add support for AXP813 GPIOs

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

[PATCH v2 07/10] mfd: axp20x: add pinctrl cell for AXP813

2017-09-26 Thread Quentin Schulz
As pinctrl and GPIO driver now supports AXP813, add a cell for it. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drivers/mfd/axp20x.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index 336de66..a457528

[PATCH v2 09/10] ARM: dts: sun8i: a711: include axp813 dtsi

2017-09-26 Thread Quentin Schulz
This board has an AXP813 PMIC so let's include its dtsi. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/sun8

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

2017-09-26 Thread Quentin Schulz
To prepare for patches that will add support for a new PMIC that has a different GPIO input status register, add a gpio_status_offset within axp20x_pctl structure and use it. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drivers/pinctrl/pinctrl-axp209.c | 4 +++-

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

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

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

2017-09-26 Thread Quentin Schulz
Instead of using a function to retrieve each pin's correct control register, use drv_data within pinctrl_pin_desc to store the ctrl reg. Remove axp20x_gpio_get_reg and replace every occurrence by a get from drv_data. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- d

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

2017-09-26 Thread Quentin Schulz
. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drivers/pinctrl/pinctrl-axp209.c | 198 1 file changed, 99 insertions(+), 99 deletions(-) diff --git a/drivers/pinctrl/pinctrl-axp209.c b/drivers/pinctrl/pinctrl-axp209.c index 4bbcba2..4

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

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

[PATCH v2 10/10] ARM: dts: sun8i: bananapi-m3: include axp813 dtsi

2017-09-26 Thread Quentin Schulz
This board has an AXP813 PMIC so let's include its dtsi. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts

[PATCH v2 08/10] ARM: dts: add dtsi for AXP813 PMIC

2017-09-26 Thread Quentin Schulz
From: Maxime Ripard <maxime.rip...@free-electrons.com> The AXP813 PMIC is used with some Allwinner SoCs. Create a dtsi to include in each board embedding it. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- arch/arm/boot/dts/axp8

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

2017-09-26 Thread Quentin Schulz
to follow the modifications, - reorder of some patches, - register all pins within the same range instead of a range per pin, Thanks, Quentin Maxime Ripard (1): ARM: dts: add dtsi for AXP813 PMIC Quentin Schulz (9): pinctrl: move gpio-axp209 to pinctrl pinctrl: axp209: add pinctr

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

2017-09-26 Thread Quentin Schulz
To prepare the driver for the upcoming pinctrl features, move the GPIO driver AXP209 from GPIO to pinctrl subsystem. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- Documentation/devicetree/bindings/gpio/gpio-axp209.txt | 30 +- Documentation/devicetree/bi

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

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

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

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

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

2017-09-26 Thread Quentin Schulz
, forcing the thermal framework to shutdown the board. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drivers/iio/adc/sun4i-gpadc-iio.c | 34 ++-- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/d

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

2017-09-26 Thread Quentin Schulz
(waiting for other drivers for example) so check on ENODEV only. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drivers/iio/adc/sun4i-gpadc-iio.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc

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

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

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

2017-09-29 Thread Quentin Schulz
te: Fri, 29 Sep 2017 20:00:03 +0800 > From: kbuild test robot <fengguang...@intel.com> > To: kbu...@01.org > Cc: Julia Lawall <julia.law...@lip6.fr> > Subject: Re: [PATCH v2 02/10] pinctrl: axp209: add pinctrl features > > Hi Quentin, > > [auto build test WA

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

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

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

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

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

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

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

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

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

2017-10-02 Thread Quentin Schulz
This adds DT node for the GPIO/pinctrl part present in AXP813/AXP818. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- arch/arm/boot/dts/axp81x.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/axp81x.dtsi b/arch/arm/boot/dts/axp81x.dtsi

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

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

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

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

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

2017-10-02 Thread Quentin Schulz
On AXP813/818, GPIO0 and GPIO1 can be used as LDO as (respectively) ldo_io0 and ldo_io1. Let's add the pinctrl properties to the said regulators. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- arch/arm/boot/dts/axp81x.dtsi | 14 ++ 1 file chang

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

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

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

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

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

2017-10-02 Thread Quentin Schulz
. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drivers/pinctrl/pinctrl-axp209.c | 178 +++ 1 file changed, 89 insertions(+), 89 deletions(-) diff --git a/drivers/pinctrl/pinctrl-axp209.c b/drivers/pinctrl/pinctrl-axp209.c index 96ef0c

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

2017-10-02 Thread Quentin Schulz
To prepare for patches that will add support for a new PMIC that has a different GPIO input status register, add a gpio_status_offset within axp20x_pctl structure and use it. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drivers/pinctrl/pinctrl-axp209.c | 4 +++-

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

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

Re: [RFC PATCH 3/7] iio: adc: axp20x-adc: add support for AXP803

2017-09-25 Thread Quentin Schulz
t; > +static const struct axp_data axp803_data = { > + .iio_info = _adc_iio_info, > + .num_channels = ARRAY_SIZE(axp803_adc_channels), > + .channels = axp803_adc_channels, > + .adc_en1_mask = AXP803_ADC_EN1_MASK, > + .adc_en2 = false, Not required I guess, by default

Re: [RFC PATCH 4/7] power: supply: axp20x-battery: support AXP803

2017-09-25 Thread Quentin Schulz
case AXP221_ID: > + case AXP803_ID: > + if (!(reg & AXP22X_FG_VALID)) > + return -EINVAL; > + break; > + }; Looks weird to me. if (axp20x_batt->axp_id != AXP209_ID && !(reg & AXP22X_FG_VALID)) would be a better match? [...] Thanks, Quentin -- Quentin Schulz, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

Re: [RFC PATCH 6/7] arm64: allwinner: a64: add power supply nodes in AXP803 DTSI

2017-09-25 Thread Quentin Schulz
t; + compatible = "x-powers,axp803-usb-power-supply"; > + status = "disabled"; > + }; No. You have added support for the AC and battery power supply drivers in this patchset, not for USB. Quentin -- Quentin Schulz, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

Re: [RFC PATCH 1/7] dt-bindings: add compatibles for AXP803 Battery/USB power supplies

2017-09-25 Thread Quentin Schulz
"x-powers,axp223-usb-power-supply" > + "x-powers,axp803-usb-power-supply" No. You are adding support for AC and battery power supply in this patchset, not for USB. Quentin -- Quentin Schulz, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

Re: [RFC PATCH 0/7] AXP803 AC/Battery support

2017-09-25 Thread Quentin Schulz
| 11 ++ >>>> drivers/power/supply/axp20x_battery.c | 88 >>> ++-- >>>> 7 files changed, 226 insertions(+), 12 deletions(-) >>>> >>> >>> >>> ___ >>> linux-arm-kernel mailing list >>> linux-arm-ker...@lists.infradead.org >>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-iio" in >> the body of a message to majord...@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > > > ___ > linux-arm-kernel mailing list > linux-arm-ker...@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > -- Quentin Schulz, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

Re: [RFC PATCH 6/7] arm64: allwinner: a64: add power supply nodes in AXP803 DTSI

2017-09-25 Thread Quentin Schulz
Hi Icenowy, On 25/09/2017 11:14, Icenowy Zheng wrote: > > > 于 2017年9月25日 GMT+08:00 下午5:11:57, Quentin Schulz > <quentin.sch...@free-electrons.com> 写到: >> Hi Icenowy, >> >> On 20/09/2017 17:18, Icenowy Zheng wrote: >>> AXP803 PMIC features AC/USB/B

Re: [RFC PATCH 2/7] iio: adc: axp20x-adc: allow to skip ADC rate setup now

2017-09-25 Thread Quentin Schulz
; -info->data->adc_rate(100)); > + if (info->data->adc_rate) > + regmap_update_bits(info->regmap, AXP20X_ADC_RATE, > +AXP20X_ADC_RATE_MASK, > +info->data->adc_rate(100)); &g

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

2017-12-05 Thread Quentin Schulz
To prepare for patches that will add support for a new PMIC that has a different GPIO input status register, add a gpio_status_offset within axp20x_pctl structure and use it. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> Acked-by: Maxime Ripard <maxime.ri

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

2017-12-05 Thread Quentin Schulz
To prepare the driver for the upcoming pinctrl features, move the GPIO driver AXP209 from GPIO to pinctrl subsystem. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> Acked-by: Maxime Ripard <maxime.rip...@free-electrons.com> Acked-by: Chen-Yu Tsai <w...@csie.or

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

2017-12-05 Thread Quentin Schulz
Checkpatch complains with the following message: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Let's make it happy by switching over to unsigned int. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drivers/gpio/gpio-axp209.c | 13 +++-- 1 file chan

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

2017-12-05 Thread Quentin Schulz
. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> Acked-by: Maxime Ripard <maxime.rip...@free-electrons.com> --- drivers/pinctrl/pinctrl-axp209.c | 176 +++ 1 file changed, 88 insertions(+), 88 deletions(-) diff --git a/drivers/pin

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

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

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

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

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

2017-12-05 Thread Quentin Schulz
To prepare for patches that will add support for a new PMIC that has a different GPIO adc muxing value, add an adc_mux within axp20x_pctl structure and use it. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> Acked-by: Maxime Ripard <maxime.rip...@free-electrons.com>

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

2017-12-05 Thread Quentin Schulz
The X-Powers AXP209 has 3 GPIOs. GPIO0/1 can each act either as a GPIO, an ADC or a LDO regulator. GPIO2 can only act as a GPIO. This adds the pinctrl features to the driver so GPIO0/1 can be used as ADC or LDO regulator. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com>

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

2017-12-05 Thread Quentin Schulz
The X-Powers AXP209 has 3 GPIOs. GPIO0/1 can each act either as a GPIO, an ADC or a LDO regulator. GPIO2 can only act as a GPIO. This adds the pinctrl features to the driver so GPIO0/1 can be used as ADC or LDO regulator. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com>

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

2017-12-05 Thread Quentin Schulz
As GPIO/pinctrl driver now supports AXP813, add a cell for it. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> Acked-by: Maxime Ripard <maxime.rip...@free-electrons.com> Acked-by: Linus Walleij <linus.wall...@linaro.org> Acked-for-MFD-by: Lee Jones <

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

2017-12-13 Thread Quentin Schulz
pport for AXP813 GPIOs") Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> Reported-by: Mylène Josserand <mylene.josser...@free-electrons.com> --- drivers/pinctrl/pinctrl-axp209.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pinc

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

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

[PATCH] pinctrl: axp209: add missing Kconfig dependencies

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

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

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

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

2017-12-01 Thread Quentin Schulz
To prepare the driver for the upcoming pinctrl features, move the GPIO driver AXP209 from GPIO to pinctrl subsystem. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> Acked-by: Maxime Ripard <maxime.rip...@free-electrons.com> Acked-by: Chen-Yu Tsai <w...@csie.or

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

2017-12-01 Thread Quentin Schulz
As GPIO/pinctrl driver now supports AXP813, add a cell for it. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> Acked-by: Maxime Ripard <maxime.rip...@free-electrons.com> --- drivers/mfd/axp20x.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mf

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

2017-12-01 Thread Quentin Schulz
The X-Powers AXP209 has 3 GPIOs. GPIO0/1 can each act either as a GPIO, an ADC or a LDO regulator. GPIO2 can only act as a GPIO. This adds the pinctrl features to the driver so GPIO0/1 can be used as ADC or LDO regulator. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com>

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

2017-12-01 Thread Quentin Schulz
On AXP813/818, GPIO0 and GPIO1 can be used as LDO as (respectively) ldo_io0 and ldo_io1. Let's add the pinctrl properties to the said regulators. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- arch/arm/boot/dts/axp81x.dtsi | 14 ++ 1 file chang

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

2017-12-01 Thread Quentin Schulz
To prepare for patches that will add support for a new PMIC that has a different GPIO input status register, add a gpio_status_offset within axp20x_pctl structure and use it. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> Acked-by: Maxime Ripard <maxime.ri

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

2017-12-01 Thread Quentin Schulz
. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- drivers/pinctrl/pinctrl-axp209.c | 180 1 file changed, 90 insertions(+), 90 deletions(-) diff --git a/drivers/pinctrl/pinctrl-axp209.c b/drivers/pinctrl/pinctrl-axp209.c index 2dc286f..6

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

2017-12-01 Thread Quentin Schulz
This adds DT node for the GPIO/pinctrl part present in AXP813/AXP818. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- arch/arm/boot/dts/axp81x.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/axp81x.dtsi b/arch/arm/boot/dts/axp81x.dtsi

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