Re: [PATCH 4/4] power: supply: add AXP803/AXP813 AC and battery power supply support

2018-10-05 Thread Quentin Schulz
Hi Oskari, On Thu, Oct 04, 2018 at 10:34:10PM +0300, Oskari Lemmela wrote: > AXP803 PMIC is register compatible with AXP813. > > Added support for AXP803/AXP813 AC power supply. > AXP8x3 is capable to limit input current and minimum input voltage. > Both of these register values are writeable. >

Re: [PATCH v3 2/7] ARM: dts: axp81x: add AC power supply subnode

2018-10-12 Thread Quentin Schulz
Hi Oskari, On Mon, Oct 08, 2018 at 09:19:03PM +0300, Oskari Lemmela wrote: > Add AC power supply subnode for AXP81X PMIC. > Reviewed-by: Quentin Schulz Thanks, Quentin signature.asc Description: PGP signature

Re: [PATCH v3 1/7] dt-bindings: power: supply: axp20x: add AXP813 AC power DT binding

2018-10-12 Thread Quentin Schulz
Hi Oskari, On Mon, Oct 08, 2018 at 09:19:02PM +0300, Oskari Lemmela wrote: > The AXP803/AXP813 AC power supply can limit input current and voltage. > Reviewed-by: Quentin Schulz Thanks, Quentin signature.asc Description: PGP signature

Re: [PATCH v3 3/7] arm64: dts: allwinner: axp803: add AC and battery power supplies

2018-10-12 Thread Quentin Schulz
Hi Oskari, On Mon, Oct 08, 2018 at 09:19:04PM +0300, Oskari Lemmela wrote: > AXP803 is compatible with AXP813. Add DT nodes ADC, GPIO, > AC and battery power supplies. > Reviewed-by: Quentin Schulz Thanks, Quentin signature.asc Description: PGP signature

Re: [PATCH v3 4/7] arm64: dts: allwinner: a64: sopine: enable power supplies

2018-10-12 Thread Quentin Schulz
Hi Oskari, On Mon, Oct 08, 2018 at 09:19:05PM +0300, Oskari Lemmela wrote: > Sopine baseboard have ACIN and battery connectors. > Reviewed-by: Quentin Schulz Thanks, Quentin signature.asc Description: PGP signature

Re: [PATCH v3 6/7] mfd: axp20x: Add AC power supply cell for AXP813

2018-10-12 Thread Quentin Schulz
Hi Oskari, On Mon, Oct 08, 2018 at 09:19:07PM +0300, Oskari Lemmela wrote: > As axp20x-ac-power-supply now supports AXP813, add a cell for it. > Reviewed-by: Quentin Schulz Thanks, Quentin signature.asc Description: PGP signature

Re: [PATCH 5/7] MIPS: mscc: ocelot: add GPIO4 pinmuxing DT node

2018-10-01 Thread Quentin Schulz
Hi Andrew, On Fri, Sep 14, 2018 at 07:02:21PM +0200, Andrew Lunn wrote: > On Fri, Sep 14, 2018 at 06:26:38PM +0200, Quentin Schulz wrote: > > Hi Alexandre, > > > > On Fri, Sep 14, 2018 at 04:54:46PM +0200, Alexandre Belloni wrote: > > > Hi, > > > >

Re: [PATCH net-next 2/7] net: phy: mscc: add support for VSC8584 PHY

2018-10-01 Thread Quentin Schulz
Hi Andrew, On Fri, Sep 14, 2018 at 07:27:54PM +0200, Andrew Lunn wrote: > > > struct vsc8531_private { > > int rate_magic; > > u16 supp_led_modes; > > @@ -181,6 +354,7 @@ struct vsc8531_private { > > struct vsc85xx_hw_stat *hw_stats; > > u64 *stats; > > int nstats; > > +

Re: [PATCH 2/2] pinctrl: ocelot: add support for interrupt controller

2018-08-06 Thread Quentin Schulz
Hi Linus, On Mon, Aug 06, 2018 at 01:06:23PM +0200, Linus Walleij wrote: > Hi Quentin, sorry for delays! > No worries :) > On Wed, Jul 25, 2018 at 2:27 PM Quentin Schulz > wrote: > > > This GPIO controller can serve as an interrupt controller as well on the

Re: [PATCH v6 8/8] mfd: axp20x: Add supported cells for AXP803

2018-12-08 Thread Quentin Schulz
Hi Lee, On Fri, Dec 07, 2018 at 07:22:37PM +, Lee Jones wrote: > On Fri, 07 Dec 2018, Vasily Khoruzhick wrote: > > > On Fri, Dec 7, 2018 at 8:40 AM Lee Jones wrote: > > > > > My OCD-dar is going crazy. > > > > > > Why haven't you used the same alignment as is already there? > > > > > > If

Re: [PATCH v6 8/8] mfd: axp20x: Add supported cells for AXP803

2018-12-10 Thread Quentin Schulz
Hi Lee, On Mon, Dec 10, 2018 at 06:27:18AM +, Lee Jones wrote: > On Sat, 08 Dec 2018, Quentin Schulz wrote: > > > Hi Lee, > > > > On Fri, Dec 07, 2018 at 07:22:37PM +, Lee Jones wrote: > > > On Fri, 07 Dec 2018, Vasily Khoruzhick wrote: > > >

[PATCH] MIPS: mscc: ocelot: fix length of memory address space for MIIM

2018-07-25 Thread Quentin Schulz
The length of memory address space for MIIM0 is from 0x7107009c to 0x710700bf included which is 36 bytes long in decimal, or 0x24 bytes in hexadecimal and not 0x36. Fixes: 49b031690abe ("MIPS: mscc: Add switch to ocelot") Signed-off-by: Quentin Schulz --- arch/mips/boot/dts/mscc/o

[PATCH] MIPS: mscc: ocelot: add MIIM1 bus

2018-07-25 Thread Quentin Schulz
-by: Quentin Schulz --- arch/mips/boot/dts/mscc/ocelot.dtsi | 16 1 file changed, 16 insertions(+) diff --git a/arch/mips/boot/dts/mscc/ocelot.dtsi b/arch/mips/boot/dts/mscc/ocelot.dtsi index 7096915f26e0..d7f0e3551500 100644 --- a/arch/mips/boot/dts/mscc/ocelot.dtsi +++ b/arch/mips

[PATCH 1/2] MIPS: mscc: ocelot: add interrupt controller properties to GPIO controller

2018-07-25 Thread Quentin Schulz
The GPIO controller also serves as an interrupt controller for events on the GPIO it handles. An interrupt occurs whenever a GPIO line has changed. Signed-off-by: Quentin Schulz --- arch/mips/boot/dts/mscc/ocelot.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/mips/boot/dts

[PATCH 2/2] pinctrl: ocelot: add support for interrupt controller

2018-07-25 Thread Quentin Schulz
only after the line gets hold in its default state, this is what's done with the fasteoi functions. Only IRQ_TYPE_EDGE_BOTH and IRQ_TYPE_LEVEL_HIGH are supported for now. Signed-off-by: Quentin Schulz --- drivers/pinctrl/Kconfig | 1 + drivers/pinctrl/pinctrl-ocelot.c | 102

[PATCH v2 00/11] mscc: ocelot: add support for SerDes muxing configuration

2018-09-03 Thread Quentin Schulz
for the deferring of the probe in the SerDes driver, - use constants in the Device Tree to select the SerDes macro in use with a port, - adapt the SerDes driver to use those constants, - add a header file in include/dt-bindings for the constants, - fix space/tab issue, Quentin Schulz (11

[PATCH net-next v2 05/11] net: mscc: ocelot: simplify register access for PLL5 configuration

2018-09-03 Thread Quentin Schulz
-by: Quentin Schulz --- drivers/net/ethernet/mscc/ocelot.h | 73 drivers/net/ethernet/mscc/ocelot_regs.c | 92 +++-- include/soc/mscc/ocelot_hsio.h | 74 3 files changed, 83 insertions(+), 156 deletions(-) diff --git a/drivers/net

[PATCH v2 10/11] phy: add driver for Microsemi Ocelot SerDes muxing

2018-09-03 Thread Quentin Schulz
The Microsemi Ocelot can mux SerDes lanes (aka macros) to different switch ports or even make it act as a PCIe interface. This adds support for the muxing of the SerDes. Signed-off-by: Quentin Schulz --- drivers/phy/Kconfig | 1 + drivers/phy/Makefile | 1

Re: [PATCH net-next v2 1/7] net: phy: mscc: factorize code for LEDs mode

2018-09-04 Thread Quentin Schulz
Hi David, On Tue, Sep 04, 2018 at 10:48:27AM -0700, David Miller wrote: > From: Quentin Schulz > Date: Mon, 3 Sep 2018 10:48:47 +0200 > > > LEDs modes are set the same way, except they are offset by 4 times the > > index of the LED. > > > > Let's factorize

Re: [PATCH 2/2] ubi: introduce ubi.nocheck parameter to skip CRC check when attaching ubi vol

2018-06-11 Thread Quentin Schulz
Hi Richard, On Fri, Apr 20, 2018 at 11:37:07AM +0200, Richard Weinberger wrote: > Quentin, > > Am Freitag, 20. April 2018, 10:52:41 CEST schrieb Quentin Schulz: > > There's already ECC on NAND pages so there may be no need for one to > > check the CRC of a UBI volume. >

Re: [PATCH v6 4/6] power: supply: core: Add some helpers to use the battery OCV capacity table

2018-11-01 Thread Quentin Schulz
Hi Baolin, On Thu, Nov 01, 2018 at 03:22:18PM +0800, Baolin Wang wrote: > Hi Quentin, > > On 29 October 2018 at 22:48, Quentin Schulz > wrote: [...] > > > >> + return len; > >> + } else if (len > POWER_SUPPLY_OCV_TEMP_MAX) { >

Re: [PATCH net-next 2/2] net: phy: mscc: fix memory leak in vsc8574_config_pre_init

2018-10-10 Thread Quentin Schulz
Hi Gustavo, On Tue, Oct 09, 2018 at 09:39:53PM +0200, Gustavo A. R. Silva wrote: > In case memory resources for *fw* were successfully allocated, > release them before return. > > Addresses-Coverity-ID: 1473968 ("Resource leak") > Fixes: 00d70d8e0e78 ("net: phy: mscc: add support for VSC8574

Re: [PATCH net-next 1/2] net: phy: mscc: fix signedness bug in vsc85xx_downshift_get

2018-10-10 Thread Quentin Schulz
lect/restore_page > functions") Reviewed-by: Quentin Schulz Thanks! Quentin signature.asc Description: PGP signature

Re: [PATCH net-next v2 2/2] net: phy: mscc: fix memory leak in vsc8574_config_pre_init

2018-10-10 Thread Quentin Schulz
c: add support for VSC8574 PHY") Reviewed-by: Quentin Schulz Thanks! Quentin signature.asc Description: PGP signature

[PATCH net-next v3 04/11] net: mscc: ocelot: move the HSIO header to include/soc

2018-09-14 Thread Quentin Schulz
Since HSIO address space can be used by different drivers (PLL, SerDes muxing, temperature sensor), let's move it somewhere it can be included by all drivers. Acked-by: Alexandre Belloni Signed-off-by: Quentin Schulz --- drivers/net/ethernet/mscc/ocelot.h | 1 +- drivers/net/ethernet

[PATCH net-next 5/5] net: phy: mscc: remove unneeded temporary variable

2018-09-14 Thread Quentin Schulz
Here, the rc variable is either used only for the condition right after the assignment or right before being used as the return value of the function it's being used in. So let's remove this unneeded temporary variable whenever possible. Signed-off-by: Quentin Schulz --- drivers/net/phy/mscc.c

[PATCH net-next 4/5] net: phy: mscc: shorten `x != 0` condition to `x`

2018-09-14 Thread Quentin Schulz
`if (x != 0)` is basically a more verbose version of `if (x)` so let's use the latter so it's consistent throughout the whole driver. Signed-off-by: Quentin Schulz --- drivers/net/phy/mscc.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git

Re: [PATCH v2 0/6] AXP8x3 AC and battery power supply support

2018-10-08 Thread Quentin Schulz
Hi Oskari, On Sun, Oct 07, 2018 at 12:18:30AM +0300, Oskari Lemmela wrote: > AXP813 AC power supply support with input current and > voltage limiting support. > > AXP803 AC and battery power supply support. > Great to see a new developer taking interest in those PMICs :) I received the v2

Re: [PATCH v2 2/6] ARM: dts: axp81x: add AC power supply subnode

2018-10-08 Thread Quentin Schulz
Hi Oskari, On Sun, Oct 07, 2018 at 12:18:32AM +0300, Oskari Lemmela wrote: > Add AC power supply subnode for AXP81X PMIC. > > Signed-off-by: Oskari Lemmela > --- > arch/arm/boot/dts/axp81x.dtsi | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/arch/arm/boot/dts/axp81x.dtsi

Re: [PATCH v2 3/6] arm64: dts: allwinner: axp803: add AC and battery power supplies

2018-10-08 Thread Quentin Schulz
Hi Oskari, On Sun, Oct 07, 2018 at 12:18:33AM +0300, Oskari Lemmela wrote: > AXP803 is compatible with AXP813. Add DT nodes ADC, GPIO, > AC and battery power supplies. > > Signed-off-by: Oskari Lemmela > --- > arch/arm64/boot/dts/allwinner/axp803.dtsi | 31 +++ > 1 file

Re: [PATCH v2 5/6] mfd: axp20x: add support AXP803 AC and battery power supplies

2018-10-08 Thread Quentin Schulz
Hi Oskari, On Sun, Oct 07, 2018 at 12:18:35AM +0300, Oskari Lemmela wrote: > AXP803 is compatible with AXP813. > Adding needed cells for AC and battery power supplies. > > AXP813 AC power supply cell added. > > Signed-off-by: Oskari Lemmela > --- > drivers/mfd/axp20x.c | 22

Re: [PATCH v2 6/6] power: supply: add AC power supply driver for AXP813

2018-10-08 Thread Quentin Schulz
r_supply_property psp, > + const union power_supply_propval *val) > +{ Argh, missed this one in the first version. Since you're introducing it with the AXP813 and it isn't used with the AXP20X, I'd name it axp813_ac_power_set_property. I'll let Maxime or Chen-Yu confirm though. With the modification in the header from the previous patch in this patch, Reviewed-by: Quentin Schulz Thanks! Quentin signature.asc Description: PGP signature

[PATCH net-next v3 3/6] net: phy: mscc: Add EEE init sequence

2018-10-08 Thread Quentin Schulz
to EEE in order to improve performance. Reviewed-by: Florian Fainelli Signed-off-by: Raju Lakkaraju Signed-off-by: Quentin Schulz --- drivers/net/phy/mscc.c | 65 ++ 1 file changed, 65 insertions(+) diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy

[PATCH net-next v3 2/6] net: phy: mscc: add ethtool statistics counters

2018-10-08 Thread Quentin Schulz
-by: Andrew Lunn Signed-off-by: Raju Lakkaraju Signed-off-by: Quentin Schulz --- drivers/net/phy/mscc.c | 119 + 1 file changed, 119 insertions(+) diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c index 52198be46c68..47fbab489287 100644

Re: [PATCH] phy: ocelot-serdes: fix out-of-bounds read

2018-10-08 Thread Quentin Schulz
Hi Gustavo, On Mon, Oct 08, 2018 at 08:06:49PM +0200, Gustavo A. R. Silva wrote: > Currently, there is an out-of-bounds read on array ctrl->phys, > once variable i reaches the maximum array size of SERDES_MAX > in the for loop. > > Fix this by changing the condition in the for loop from > i <=

Re: [PATCH 1/2] dt-bindings: phy: Update SERDES_MAX to be SERDES_MAX + 1

2018-10-09 Thread Quentin Schulz
, because the size of > array ctrl->phys is SERDES_MAX. > > Partially fix this by updating SERDES_MAX to be SERDES6G_MAX + 1. > > Notice that this is the first part of the solution to > the out-of-bounds bug mentioned above. Although this > change is not dependent on any

Re: [PATCH 2/2] phy: ocelot-serdes: fix out-of-bounds read

2018-10-09 Thread Quentin Schulz
for loop from > i <= SERDES_MAX to i < SERDES_MAX. > Reviewed-by: Quentin Schulz Thanks, Quentin signature.asc Description: PGP signature

Re: [PATCH 0/2] phy: ocelot-serdes: fix out-of-bounds bug

2018-10-09 Thread Quentin Schulz
size of SERDES_MAX > in the for loop. > > Quentin Schulz pointed out that SERDES_MAX is a valid value to > index ctrl->phys. So, I updated SERDES_MAX to be SERDES6G_MAX + 1 > in include/dt-bindings/phy/phy-ocelot-serdes.h. > > Then I changed the condition in the for loo

Re: [PATCH 2/2] mmc: Add mmc_force_detect_change_begin / _end functions

2018-10-09 Thread Quentin Schulz
Hi Frieder, On Mon, Oct 08, 2018 at 11:53:21AM +0200, Frieder Schrempf wrote: > Hi, > > On 27.09.2018 10:14, Maxime Ripard wrote: > > On Wed, Sep 26, 2018 at 10:19:22PM +0200, Hans de Goede wrote: > > > On 26-09-18 16:44, Frieder Schrempf wrote: > > > > Hi, > > > > > > > > On Fri, Feb 09, 2018

[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 --- drivers/gpio/gpio-axp209.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpio/gpio-axp209.c b

[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 --- .../devicetree/bindings/gpio/gpio-axp209.txt | 28 +- drivers/gpio/gpio-axp209.c | 551 ++--- 2 files changed, 503

[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 --- .../devicetree/bindings/gpio/gpio-axp209.txt | 28 +- drivers/gpio/gpio-axp209.c | 551 ++--- 2 files changed, 503

[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 --- drivers/gpio/gpio-axp209.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpio/gpio-axp209.c b

[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

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 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
he 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
t;>>> + 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 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. Stefan

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

2016-12-20 Thread Quentin Schulz
pport 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 table fo

[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/sun4i

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

2016-12-20 Thread Quentin Schulz
. If there is not 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 changed, 57

[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/sun8i

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

2016-12-20 Thread Quentin Schulz
the 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 | 204

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

[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: Quentin Sch

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

[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

[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
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 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 v3 11/18] dt-bindings: power: supply: add AXP20X/AXP22X battery DT binding

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

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

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

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

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

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

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

Re: [RFC PATCH 2/3] iio: adc: sun4i-gpadc-iio: add support for H3 thermal sensor

2017-03-29 Thread Quentin Schulz
> + reset_control_deassert(info->reset); > + } > + I'm not really fond of using this boolean as I don't see it being possibly reused for any other SoCs that has a GPADC or THS. Here, you could make use of a list/array of clk which then can be reused for other SoCs just by changing the list. Add

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

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

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

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

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

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

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

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

[PATCH v3 04/11] Documentation: DT: bindings: mfd: add A33 GPADC binding

2017-03-21 Thread Quentin Schulz
This patch adds documentation for the A33 GPADC binding. Signed-off-by: Quentin Schulz --- v3: - fixed missing allwinner in front of compatible, - updated compatible to allwinner,sun8i-a33-ths to better reflect the datasheet's name, - updated example's DT node name and label to ths

[PATCH v3 05/11] Documentation: DT: bindings: input: touschcreen: remove sun4i documentation

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

[PATCH] iio: bmg160: reset chip when probing

2017-03-21 Thread Quentin Schulz
on a BMX055 and the datasheet of the BMG160 and the BMI055 give the same reset register and bits. Signed-off-by: Quentin Schulz --- drivers/iio/gyro/bmg160_core.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/iio/gyro/bmg160_core.c b/drivers/iio/gyro/bmg160_core.c index

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

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

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

2017-03-21 Thread Quentin Schulz
boards defining the CPU regulator, we cannot have these two frequencies as it would cause the CPU to try to run a higher frequency without "overvolting" which is very likely to crash the CPU. Therefore, these two frequencies must be enabled on a per-board basis. Signed-off-by: Quen

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

2017-03-21 Thread Quentin Schulz
(1): ARM: sun8i: a33: Add devfreq-based GPU cooling Quentin Schulz (10): ARM: sun8i: a33: add operating-points-v2 property to all nodes ARM: sun8i: a33: add all operating points ARM: dts: sun8i: sina33: add cpu-supply Documentation: DT: bindings: mfd: add A33 GPADC binding Documentation: DT

[PATCH v3 09/11] ARM: dtsi: sun8i: a33: add CPU thermal throttling

2017-03-21 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 --- v3: - switched to new phandle because of modified DT node name for the GPADC (named THS), - got rid of cooling-min-level and cooling-max-level

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

2017-03-21 Thread Quentin Schulz
From: Maxime Ripard This adds GPU thermal throttling for the Allwinner A33. Signed-off-by: Maxime Ripard Signed-off-by: Quentin Schulz --- v3: - got rid of cooling-min-level and cooling-max-level as it's not used in any code in the kernel, added in v2 arch/arm/boot/dts/sun8i-a23-a33

[PATCH v3 11/11] ARM: sun8i: sina33: add highest OPP of CPUs

2017-03-21 Thread Quentin Schulz
table of the Sinlinx SinA33. Signed-off-by: Quentin Schulz --- added in v3 arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts b/arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts index

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

2017-03-21 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 v3 08/11] ARM: dtsi: sun8i: a33: add thermal sensor

2017-03-21 Thread Quentin Schulz
This adds the DT node for the thermal sensor present in the Allwinner A33 GPADC. Signed-off-by: Quentin Schulz --- v3: - switched compatible to allwinner,sun8i-a33-ths, - renamed DT node name and label to ths to better match datasheet's name, arch/arm/boot/dts/sun8i-a33.dtsi | 12

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

2017-03-21 Thread Quentin Schulz
supported SoCs and almost the same bits, for the same purpose (thermal sensor). The thermal sensor behaves exactly the same (except the presence of interrupts or not) on the different SoCs. Signed-off-by: Quentin Schulz Acked-by: Lee Jones --- v3: - switched compatible from allwinner,sun8i

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

2017-03-21 Thread Quentin Schulz
that will require to create a DT binding for this IP, we can avoid using an MFD, thus we need two separate functions: one for probing via MFD and one for probing without MFD. This split the code specific to MFD probing in a function separated from the driver probe function. Signed-off-by: Quentin

Re: [PATCH v2 2/2] iio: Aspeed AST2400/AST2500 ADC

2017-03-22 Thread Quentin Schulz
->modes = INDIO_DIRECT_MODE; > + indio_dev->channels = aspeed_adc_iio_channels; > + indio_dev->num_channels = ARRAY_SIZE(aspeed_adc_iio_channels); > + > + ret = iio_device_register(indio_dev); > + if (ret) { > + dev_err(>dev, "Could't register the device.\n"); > + goto iio_register_error; > + } > + > + return 0; > + > +iio_register_error: > + writel(0x0, data->base + ASPEED_ADC_REG_ENGINE_CONTROL); > + clk_disable_unprepare(data->clk_scaler->clk); > + clk_hw_unregister_divider(data->clk_scaler); > + > +scaler_error: > + clk_hw_unregister_divider(data->clk_prescaler); > + > +prescaler_error: > +resource_error: > + return ret; > +} [...] Thanks,Quentin -- Quentin Schulz, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

Re: [PATCH v2 2/2] iio: Aspeed AST2400/AST2500 ADC

2017-03-23 Thread Quentin Schulz
Hi, On 22/03/2017 21:46, Rick Altherr wrote: > On Wed, Mar 22, 2017 at 12:21 AM, Quentin Schulz > wrote: >> Hi, >> >> On 21/03/2017 21:48, Rick Altherr wrote: >>> Aspeed AST2400/AST2500 BMC SoCs include a 16 channel, 10-bit ADC. Low >>> and high threshol

[RESEND PATCH v4 4/9] mfd: axp20x: add AC power supply cells for AXP22X PMICs

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

<    5   6   7   8   9   10   11   12   13   14   >