Re: [PATCH] iio/adc: ingenic: Fix battery VREF for JZ4770 SoC

2020-11-04 Thread Artur Rojek
On 2020-11-05 01:09, Paul Cercueil wrote: Hi Artur, Le mer. 4 nov. 2020 à 23:29, Artur Rojek a écrit : Hi Paul, On 2020-11-04 20:28, Paul Cercueil wrote: The reference voltage for the battery is clearly marked as 1.2V in the programming manual. With this fixed, the battery channel now

Re: [PATCH] iio/adc: ingenic: Fix battery VREF for JZ4770 SoC

2020-11-04 Thread Artur Rojek
TTERY_VREF1200 #define JZ4770_ADC_BATTERY_VREF_BITS 12 #define JZ_ADC_IRQ_AUX BIT(0) I thought we set it to 6600 because GCW Zero was not showing correct battery values at 1200. But if you verified that 1200 works with JZ4770, then: Acked-by: Artur Rojek

Re: [PATCH] iio/adc: ingenic: Fix AUX/VBAT readings when touchscreen is used

2020-11-04 Thread Artur Rojek
250, 1000); if (ret) - ingenic_adc_enable(adc, engine, false); + ingenic_adc_enable_unlocked(adc, engine, false); + + writel(cfg, adc->base + JZ_ADC_REG_CFG); + mutex_unlock(&adc->lock); return ret; } With the above nitpick corrected: Acked-by: Artur Rojek

[PATCH v10 2/2] input: joystick: Add ADC attached joystick driver.

2020-09-27 Thread Artur Rojek
Add a driver for joystick devices connected to ADC controllers supporting the Industrial I/O subsystem. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Tested-by: Heiko Stuebner --- Changes: v8: - respect scan index when reading channel data, - solve sparse warnings related

[PATCH v10 1/2] dt-bindings: input: Add docs for ADC driven joystick.

2020-09-27 Thread Artur Rojek
Add documentation for the adc-joystick driver, used to provide support for joysticks connected over ADC. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Reviewed-by: Rob Herring --- Changes: v6-v10: no change .../bindings/input/adc-joystick.yaml | 121 ++ 1

[PATCH v3 1/2] dt-bindings: power: Convert ingenic,battery.txt to YAML

2020-09-26 Thread Artur Rojek
Convert the textual documentation of Device Tree bindings for the Ingenic JZ47xx SoCs battery to YAML. Signed-off-by: Artur Rojek --- Changes: v2: move introduction of new compatibles into a separate patch v3: - drop description of `io-channels` property and set its maxItems

[PATCH v3 2/2] dt-bindings: power: ingenic,battery: add new compatibles

2020-09-26 Thread Artur Rojek
battery", "ingenic,jz4740-battery" Signed-off-by: Artur Rojek Reviewed-by: Rob Herring --- Changes: v2: new patch v3: no change .../devicetree/bindings/power/supply/ingenic,battery.yaml | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Docume

[PATCH v2 1/2] dt-bindings: power: Convert ingenic,battery.txt to YAML

2020-09-06 Thread Artur Rojek
Convert the textual documentation of Device Tree bindings for the Ingenic JZ47xx SoCs battery to YAML. Signed-off-by: Artur Rojek --- Changes: v2: move introduction of new compatibles into a separate patch .../bindings/power/supply/ingenic,battery.txt | 31 -- .../power/supply

[PATCH v2 2/2] dt-bindings: power: ingenic,battery: add new compatibles

2020-09-06 Thread Artur Rojek
battery", "ingenic,jz4740-battery" Signed-off-by: Artur Rojek --- Changes: v2: new patch .../devicetree/bindings/power/supply/ingenic,battery.yaml | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/power/supply/ingenic,

Re: [PATCH v9 2/2] input: joystick: Add ADC attached joystick driver.

2020-09-06 Thread Artur Rojek
Hi Andy, thanks for the review, replies inline. On 2020-09-06 11:22, Andy Shevchenko wrote: On Sat, Sep 5, 2020 at 7:34 PM Artur Rojek wrote: Add a driver for joystick devices connected to ADC controllers supporting the Industrial I/O subsystem. ... +static int adc_joystick_handle(const

[PATCH v9 1/2] dt-bindings: input: Add docs for ADC driven joystick.

2020-09-05 Thread Artur Rojek
Add documentation for the adc-joystick driver, used to provide support for joysticks connected over ADC. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Reviewed-by: Rob Herring --- Changes: v6-v9: no change .../bindings/input/adc-joystick.yaml | 121 ++ 1

[PATCH v9 2/2] input: joystick: Add ADC attached joystick driver.

2020-09-05 Thread Artur Rojek
Add a driver for joystick devices connected to ADC controllers supporting the Industrial I/O subsystem. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Tested-by: Heiko Stuebner --- Changes: v8: - respect scan index when reading channel data, - solve sparse warnings related to

[PATCH] dt-bindings: power: Convert ingenic,battery.txt to YAML

2020-07-26 Thread Artur Rojek
Convert the textual documentation of Device Tree bindings for the Ingenic JZ47xx SoCs battery to YAML. Signed-off-by: Artur Rojek --- .../bindings/power/supply/ingenic,battery.txt | 31 - .../power/supply/ingenic,battery.yaml | 67 +++ 2 files changed, 67

Re: [PATCH v8 0/6] iio/adc: ingenic: Cleanups & add touchscreen mode.

2020-07-19 Thread Artur Rojek
On 2020-07-14 20:33, Heiko Stuebner wrote: Hi Artur, Am Donnerstag, 9. Juli 2020, 17:21:54 CEST schrieb Artur Rojek: Hi all, v8 of this patchset introduces some structural changes, which I deemed worthy highlighting here: - adc-joystick related changes have been dropped from this patchset

[PATCH v8 1/2] dt-bindings: input: Add docs for ADC driven joystick.

2020-07-19 Thread Artur Rojek
Add documentation for the adc-joystick driver, used to provide support for joysticks connected over ADC. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Reviewed-by: Rob Herring --- Changes: v2: - Add `reg` property to axis subnode in order to enumerate the axes, - rename `linux

[PATCH v8 2/2] input: joystick: Add ADC attached joystick driver.

2020-07-19 Thread Artur Rojek
Add a driver for joystick devices connected to ADC controllers supporting the Industrial I/O subsystem. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Tested-by: Heiko Stuebner Acked-by: Dmitry Torokhov --- Changes: v2: - sanity check supported channel format on probe, - rename

[PATCH v8 0/2] input: ADC joystick driver & DT bindings

2020-07-19 Thread Artur Rojek
-iio/20200719205307.87385-4-cont...@artur-rojek.eu/ Your scripts will most likely fail to validate this. You have already reviewed this patch when it was still part of the aforementioned series. Cheers, Artur Artur Rojek (2): dt-bindings: input: Add docs for ADC driven joystick. input

[PATCH v9 2/5] IIO: Ingenic JZ47xx: Add xlate cb to retrieve correct channel idx

2020-07-19 Thread Artur Rojek
Provide an of_xlate callback in order to retrieve the correct channel specifier index from the IIO channels array. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil --- Changes: v2-v9: no change drivers/iio/adc/ingenic-adc.c | 16 1 file changed, 16 insertions(+) diff

[PATCH v9 1/5] IIO: Ingenic JZ47xx: Error check clk_enable calls.

2020-07-19 Thread Artur Rojek
Introduce error checks for the clk_enable calls used in this driver. As part of the changes, move clk_enable/clk_disable calls out of ingenic_adc_set_config and into respective logic of its callers. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil --- Changes: v6: new patch v7: no

[PATCH v9 4/5] dt-bindings: iio/adc: Add touchscreen idx for JZ47xx SoC ADC

2020-07-19 Thread Artur Rojek
Introduce support for touchscreen channels found in JZ47xx SoCs. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Acked-by: Rob Herring --- Changes: v2-v7: no change v8: add XN/YN and XD/YD channels v9: no change include/dt-bindings/iio/adc/ingenic,adc.h | 6 ++ 1 file changed

[PATCH v9 5/5] IIO: Ingenic JZ47xx: Add touchscreen mode.

2020-07-19 Thread Artur Rojek
joystick is connected to the X-/Y- pins. All the boards which probe this driver have the interrupt provided from Device Tree, with no need to handle a case where the IRQ was not provided. Co-developed-by: Paul Cercueil Signed-off-by: Paul Cercueil Signed-off-by: Artur Rojek --- Changes: v2

[PATCH v9 3/5] iio/adc: ingenic: Retrieve channels list from soc data struct

2020-07-19 Thread Artur Rojek
From: Paul Cercueil Instead of having one array of struct iio_chan_spec for all SoCs, and have some SoCs remove the last item of the array as they can't use it, have each SoC define its array of supported channels. Signed-off-by: Paul Cercueil Tested-by: Artur Rojek Signed-off-by: Artur

Re: [PATCH v8 4/6] iio/adc: ingenic: Retrieve channels list from soc data struct

2020-07-12 Thread Artur Rojek
On 2020-07-12 14:11, Jonathan Cameron wrote: On Sun, 12 Jul 2020 13:07:13 +0100 Jonathan Cameron wrote: On Thu, 9 Jul 2020 17:21:58 +0200 Artur Rojek wrote: > From: Paul Cercueil > > Instead of having one array of struct iio_chan_spec for all SoCs, and > have some SoCs rem

Re: [PATCH v8 0/6] iio/adc: ingenic: Cleanups & add touchscreen mode.

2020-07-09 Thread Artur Rojek
Hey Andy, On 2020-07-09 17:43, Andy Shevchenko wrote: On Thu, Jul 9, 2020 at 6:22 PM Artur Rojek wrote: Hi all, v8 of this patchset introduces some structural changes, which I deemed worthy highlighting here: Can you remind me if I gave you tags on the previous version? I received no

[PATCH v8 5/6] dt-bindings: iio/adc: Add touchscreen idx for JZ47xx SoC ADC

2020-07-09 Thread Artur Rojek
Introduce support for touchscreen channels found in JZ47xx SoCs. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil --- Changes: v2-v7: no change v8: add XN/YN and XD/YD channels include/dt-bindings/iio/adc/ingenic,adc.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include

[PATCH v8 2/6] IIO: Ingenic JZ47xx: Error check clk_enable calls.

2020-07-09 Thread Artur Rojek
Introduce error checks for the clk_enable calls used in this driver. As part of the changes, move clk_enable/clk_disable calls out of ingenic_adc_set_config and into respective logic of its callers. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil --- Changes: v6: new patch v7: no

[PATCH v8 1/6] dt-bindings: iio/adc: Convert ingenic-adc docs to YAML.

2020-07-09 Thread Artur Rojek
probe this driver. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Reviewed-by: Rob Herring --- Changes: v6: new patch v7: - specify `maxItems: 1` for single entry properties - get rid of redundant descriptions of said properties v8: no change .../bindings/iio/adc/ingenic,adc.txt

[PATCH v8 3/6] IIO: Ingenic JZ47xx: Add xlate cb to retrieve correct channel idx

2020-07-09 Thread Artur Rojek
Provide an of_xlate callback in order to retrieve the correct channel specifier index from the IIO channels array. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil --- Changes: v2-v8: no change drivers/iio/adc/ingenic-adc.c | 16 1 file changed, 16 insertions(+) diff

[PATCH v8 6/6] IIO: Ingenic JZ47xx: Add touchscreen mode.

2020-07-09 Thread Artur Rojek
joystick is connected to the X-/Y- pins. All the boards which probe this driver have the interrupt provided from Device Tree, with no need to handle a case where the IRQ was not provided. Co-developed-by: Paul Cercueil Signed-off-by: Paul Cercueil Signed-off-by: Artur Rojek --- Changes: v2

[PATCH v8 4/6] iio/adc: ingenic: Retrieve channels list from soc data struct

2020-07-09 Thread Artur Rojek
From: Paul Cercueil Instead of having one array of struct iio_chan_spec for all SoCs, and have some SoCs remove the last item of the array as they can't use it, have each SoC define its array of supported channels. Signed-off-by: Paul Cercueil Tested-by: Artur Rojek --- Changes: v8

[PATCH v8 0/6] iio/adc: ingenic: Cleanups & add touchscreen mode.

2020-07-09 Thread Artur Rojek
* defines in the DTS example, causing trouble to Rob's scripts. - Integrated Paul's changes, which introduce an ADCMD low-level command feature. These changes affect patches 5/6 and 6/6, with the former requiring Rob to re-ack. Cheers, Artur Artur Rojek (5): dt-bindings: iio/ad

[PATCH v7 5/7] IIO: Ingenic JZ47xx: Add touchscreen mode.

2020-05-17 Thread Artur Rojek
need to handle a case where the IRQ was not provided. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil --- Changes: v2: - improve description of the touchscreen mode, - get rid of the unneeded kfifo, - drop IIO_BUFFER_CB from Kconfig, - remove extended names from the

[PATCH v7 1/7] dt-bindings: iio/adc: Convert ingenic-adc docs to YAML.

2020-05-17 Thread Artur Rojek
probe this driver. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil --- Changes: v6: new patch v7: - specify `maxItems: 1` for single entry properties - get rid of redundant descriptions of said properties .../bindings/iio/adc/ingenic,adc.txt | 49 - .../bindings

[PATCH v7 4/7] dt-bindings: iio/adc: Add touchscreen idx for JZ47xx SoC ADC

2020-05-17 Thread Artur Rojek
Introduce support for touchscreen channels found in JZ47xx SoCs. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Acked-by: Rob Herring --- Changes: v2-v7: no change include/dt-bindings/iio/adc/ingenic,adc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/dt-bindings/iio

[PATCH v7 3/7] IIO: Ingenic JZ47xx: Add xlate cb to retrieve correct channel idx

2020-05-17 Thread Artur Rojek
Provide an of_xlate callback in order to retrieve the correct channel specifier index from the IIO channels array. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil --- Changes: v2-v7: no change drivers/iio/adc/ingenic-adc.c | 16 1 file changed, 16 insertions(+) diff

[PATCH v7 7/7] input: joystick: Add ADC attached joystick driver.

2020-05-17 Thread Artur Rojek
Add a driver for joystick devices connected to ADC controllers supporting the Industrial I/O subsystem. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Tested-by: Heiko Stuebner Acked-by: Dmitry Torokhov --- Changes: v2: - sanity check supported channel format on probe, - rename

[PATCH v7 6/7] dt-bindings: input: Add docs for ADC driven joystick.

2020-05-17 Thread Artur Rojek
Add documentation for the adc-joystick driver, used to provide support for joysticks connected over ADC. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Reviewed-by: Rob Herring --- Changes: v2: - Add `reg` property to axis subnode in order to enumerate the axes, - rename `linux

[PATCH v7 2/7] IIO: Ingenic JZ47xx: Error check clk_enable calls.

2020-05-17 Thread Artur Rojek
Introduce error checks for the clk_enable calls used in this driver. As part of the changes, move clk_enable/clk_disable calls out of ingenic_adc_set_config and into respective logic of its callers. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil --- Changes: v6: new patch v7: no

[PATCH v6 6/7] dt-bindings: input: Add docs for ADC driven joystick.

2020-05-03 Thread Artur Rojek
Add documentation for the adc-joystick driver, used to provide support for joysticks connected over ADC. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Reviewed-by: Rob Herring --- Changes: v2: - Add `reg` property to axis subnode in order to enumerate the axes, - rename `linux

[PATCH v6 5/7] IIO: Ingenic JZ47xx: Add touchscreen mode.

2020-05-03 Thread Artur Rojek
need to handle a case where the IRQ was not provided. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil --- Changes: v2: - improve description of the touchscreen mode, - get rid of the unneeded kfifo, - drop IIO_BUFFER_CB from Kconfig, - remove extended names from the

[PATCH v6 7/7] input: joystick: Add ADC attached joystick driver.

2020-05-03 Thread Artur Rojek
Add a driver for joystick devices connected to ADC controllers supporting the Industrial I/O subsystem. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Tested-by: Heiko Stuebner Acked-by: Dmitry Torokhov --- v2: - sanity check supported channel format on probe, - rename

[PATCH v6 2/7] IIO: Ingenic JZ47xx: Error check clk_enable calls.

2020-05-03 Thread Artur Rojek
Introduce error checks for the clk_enable calls used in this driver. As part of the changes, move clk_enable/clk_disable calls out of ingenic_adc_set_config and into respective logic of its callers. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil --- Changes: v6: new patch drivers/iio

[PATCH v6 3/7] IIO: Ingenic JZ47xx: Add xlate cb to retrieve correct channel idx

2020-05-03 Thread Artur Rojek
Provide an of_xlate callback in order to retrieve the correct channel specifier index from the IIO channels array. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil --- Changes: v2-v6: no change drivers/iio/adc/ingenic-adc.c | 16 1 file changed, 16 insertions(+) diff

[PATCH v6 1/7] dt-bindings: iio/adc: Convert ingenic-adc docs to YAML.

2020-05-03 Thread Artur Rojek
probe this driver. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil --- Changes: v6: new patch .../bindings/iio/adc/ingenic,adc.txt | 49 .../bindings/iio/adc/ingenic,adc.yaml | 74 +++ 2 files changed, 74 insertions(+), 49 deletions(-) delete

[PATCH v6 4/7] dt-bindings: iio/adc: Add touchscreen idx for JZ47xx SoC ADC

2020-05-03 Thread Artur Rojek
Introduce support for touchscreen channels found in JZ47xx SoCs. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Acked-by: Rob Herring --- Changes: v2-v6: no change include/dt-bindings/iio/adc/ingenic,adc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/dt-bindings/iio

Re: [PATCH v2 1/3] dt-bindings: iio/adc: Add a compatible string for JZ4770 SoC ADC

2019-09-03 Thread Artur Rojek
Hi Jonathan, Just reminding you of this patch set. Artur On 2019-07-28 10:45, Jonathan Cameron wrote: On Sat, 27 Jul 2019 21:59:38 +0200 Artur Rojek wrote: Add a compatible string for the ADC controller present on Ingenic JZ4770 SoC. Signed-off-by: Artur Rojek Reviewed-by: Rob Herring

[PATCH v2 3/3] IIO: Ingenic JZ47xx: Add support for JZ4770 SoC ADC.

2019-07-27 Thread Artur Rojek
Add support for the ADC hardware present on Ingenic JZ4770 SoC. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil --- Changes: v2: - move the IIO_CHAN_INFO_RAW block into a utility function, - unconditionally lock aux_lock for reduced complexity drivers/iio/adc/ingenic-adc.c | 149

[PATCH v2 1/3] dt-bindings: iio/adc: Add a compatible string for JZ4770 SoC ADC

2019-07-27 Thread Artur Rojek
Add a compatible string for the ADC controller present on Ingenic JZ4770 SoC. Signed-off-by: Artur Rojek Reviewed-by: Rob Herring --- Changes: v2: no change Documentation/devicetree/bindings/iio/adc/ingenic,adc.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree

[PATCH v2 2/3] dt-bindings: iio/adc: Add AUX2 channel idx for JZ4770 SoC ADC

2019-07-27 Thread Artur Rojek
Introduce support for AUX2 channel found in ADC hardware present on Ingenic JZ4770 SoC. Signed-off-by: Artur Rojek Reviewed-by: Rob Herring --- Changes: v2: no change include/dt-bindings/iio/adc/ingenic,adc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/dt-bindings/iio/adc

[PATCH v2] IIO: Ingenic JZ47xx: Set clock divider on probe

2019-07-04 Thread Artur Rojek
make it easier to add support for other JZ47xx SoCs later. Fixes: 1a78daea107d ("iio: adc: probe should set clock divider") Signed-off-by: Maarten ter Huurne Signed-off-by: Artur Rojek --- Changes: v2: Add the fixes tag. drivers/iio/adc/ingenic-adc.c | 54 +++

[PATCH 2/4] dt-bindings: iio/adc: Add AUX2 channel idx for JZ4770 SoC ADC

2019-06-23 Thread Artur Rojek
Introduce support for AUX2 channel found in ADC hardware present on Ingenic JZ4770 SoC. Signed-off-by: Artur Rojek --- include/dt-bindings/iio/adc/ingenic,adc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/dt-bindings/iio/adc/ingenic,adc.h b/include/dt-bindings/iio/adc/ingenic

[PATCH 1/4] dt-bindings: iio/adc: Add a compatible string for JZ4770 SoC ADC

2019-06-23 Thread Artur Rojek
Add a compatible string for the ADC controller present on Ingenic JZ4770 SoC. Signed-off-by: Artur Rojek --- Documentation/devicetree/bindings/iio/adc/ingenic,adc.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iio/adc/ingenic,adc.txt b/Documentation

[PATCH 4/4] IIO: Ingenic JZ47xx: Add support for JZ4770 SoC ADC.

2019-06-23 Thread Artur Rojek
Add support for the ADC hardware present on Ingenic JZ4770 SoC. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil --- drivers/iio/adc/ingenic-adc.c | 134 +++--- 1 file changed, 123 insertions(+), 11 deletions(-) diff --git a/drivers/iio/adc/ingenic-adc.c b

[PATCH 3/4] IIO: Ingenic JZ47xx: Set clock divider on probe

2019-06-23 Thread Artur Rojek
make it easier to add support for other JZ47xx SoCs later. Signed-off-by: Maarten ter Huurne Signed-off-by: Artur Rojek --- drivers/iio/adc/ingenic-adc.c | 54 +++ 1 file changed, 54 insertions(+) diff --git a/drivers/iio/adc/ingenic-adc.c b/drivers/iio/adc/in

[PATCH v3] power: supply: add Ingenic JZ47xx battery driver.

2019-04-18 Thread Artur Rojek
Add a driver for battery present on Ingenic JZ47xx SoCs. Signed-off-by: Artur Rojek Reviewed-by: Jonathan Cameron --- Changes: v2: - rework the return logic in ingenic_battery_get_property, - make index offsets point forward in ingenic_battery_set_scale, - fix spacing around scale_raw

[PATCH v3 1/2] dt-bindings: power: supply: Add charge-status-gpios property

2019-04-14 Thread Artur Rojek
Add documentation for the "charge-status-gpios" property. Update the "gpios" property with a valid example. Signed-off-by: Artur Rojek Reviewed-by: Rob Herring --- Changes: v2: - add a better description for the "status-gpios" property, - add valid exampl

[PATCH v3 2/2] power: supply: gpio-charger: Add support for charger status.

2019-04-14 Thread Artur Rojek
Introduce optional support of POWER_SUPPLY_PROP_STATUS for chargers which provide charging status GPIO. Signed-off-by: Artur Rojek --- Changes: v2: no change v3: rename "status_irq" and "status" fields to "charge_status_irq" and "charge_status"

[PATCH v2 1/4] iio: inkern: API for reading available iio channel attribute values

2019-03-23 Thread Artur Rojek
Extend the inkern API with a function for reading available attribute values of iio channels. Signed-off-by: Artur Rojek --- Changes: v2: no change drivers/iio/inkern.c | 20 include/linux/iio/consumer.h | 14 ++ 2 files changed, 34 insertions

[PATCH v2 2/4] iio: inkern: Convert iio_read_avail_channel_raw into a wrapper

2019-03-23 Thread Artur Rojek
Convert "iio_read_avail_channel_raw" over to a wrapper around "iio_read_avail_channel_attribute". With the introduction of "iio_read_avail_channel_attribute", the necessity of having a separate call to read raw channel values became redundant. Signed-off-by: Artur

[PATCH v2 4/4] power: supply: add Ingenic JZ47xx battery driver.

2019-03-23 Thread Artur Rojek
Add a driver for battery present on Ingenic JZ47xx SoCs. Signed-off-by: Artur Rojek --- Changes: v2: - rework the return logic in ingenic_battery_get_property, - make index offsets point forward in ingenic_battery_set_scale, - fix spacing around scale_raw[best_idx + 1] drivers/power

[PATCH v2 3/4] dt-bindings: power: supply: Add docs for Ingenic JZ47xx SoCs battery.

2019-03-23 Thread Artur Rojek
Add documentation for the ingenic-battery driver, used on JZ47xx SoCs. Signed-off-by: Artur Rojek --- Changes: v2: no change .../bindings/power/supply/ingenic,battery.txt | 31 +++ 1 file changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/power

Re: [PATCH 4/7] dt-bindings: power: supply: Add docs for Ingenic JZ47xx SoCs battery.

2019-02-28 Thread Artur Rojek
Hi Rob, thanks for the review. On 2019-02-28 19:48, Rob Herring wrote: On Sun, Feb 17, 2019 at 03:29:13PM +0100, Artur Rojek wrote: Add documentation for the ingenic-battery driver, used on JZ47xx SoCs. Signed-off-by: Artur Rojek --- .../bindings/power/supply/ingenic,battery.txt | 31

[PATCH v2 2/2] power: supply: gpio-charger: Add support for charger status.

2019-02-26 Thread Artur Rojek
Introduce optional support of POWER_SUPPLY_PROP_STATUS for chargers which provide charging status GPIO. Signed-off-by: Artur Rojek --- Changes: v2: no change drivers/power/supply/gpio-charger.c | 53 +++-- 1 file changed, 42 insertions(+), 11 deletions(-) diff --git

[PATCH v2 1/2] dt-bindings: power: supply: gpio-charger: Add status-gpios property

2019-02-26 Thread Artur Rojek
Add documentation for the "status-gpios" property. Update the "gpios" property with a valid example. Signed-off-by: Artur Rojek --- Changes: v2: - add a better description for the "status-gpios" property, - add valid examples for the "gpios" and &q

Re: [PATCH 1/2] dt-bindings: power: supply: gpio-charger: Add status-gpios property

2019-02-26 Thread Artur Rojek
Hi Rob. Thanks for the review. On 2019-02-25 22:53, Rob Herring wrote: On Tue, Feb 05, 2019 at 08:03:15PM +0100, Artur Rojek wrote: Add documentation for the "status-gpios" property. Signed-off-by: Artur Rojek --- .../devicetree/bindings/power/supply/gpio-charger.txt | 4

Re: [PATCH 5/7] power: supply: add Ingenic JZ47xx battery driver.

2019-02-21 Thread Artur Rojek
On 2019-02-20 12:14, Jonathan Cameron wrote: On Sun, 17 Feb 2019 15:29:14 +0100 Artur Rojek wrote: Add a driver for battery present on Ingenic JZ47xx SoCs. Signed-off-by: Artur Rojek A few things inline. thanks, Jonathan Hi Jonathan. One thing inline. Artur --- drivers/power

Re: [PATCH 5/7] power: supply: add Ingenic JZ47xx battery driver.

2019-02-20 Thread Artur Rojek
On 2019-02-20 12:14, Jonathan Cameron wrote: On Sun, 17 Feb 2019 15:29:14 +0100 Artur Rojek wrote: Add a driver for battery present on Ingenic JZ47xx SoCs. Signed-off-by: Artur Rojek A few things inline. thanks, Jonathan Hi Jonathan, Thanks for the review. --- drivers/power/supply

Re: [PATCH 1/7] iio: inkern: API for reading available iio channel attribute values

2019-02-17 Thread Artur Rojek
Hi, This patchset is supposed to contain 5 patches, not 7. So this patch is actually 1/5. My apologies for the mistake. Artur On 2019-02-17 15:29, Artur Rojek wrote: Extend the inkern API with a function for reading available attribute values of iio channels. Signed-off-by: Artur Rojek

[PATCH 5/7] power: supply: add Ingenic JZ47xx battery driver.

2019-02-17 Thread Artur Rojek
Add a driver for battery present on Ingenic JZ47xx SoCs. Signed-off-by: Artur Rojek --- drivers/power/supply/Kconfig | 11 ++ drivers/power/supply/Makefile | 1 + drivers/power/supply/ingenic-battery.c | 182 + 3 files changed, 194 insertions

[PATCH 2/7] power: supply: core: Add a field to support battery max voltage

2019-02-17 Thread Artur Rojek
Add a field for "voltage_max_design_uv" to present fully charged battery voltage. Signed-off-by: Artur Rojek --- drivers/power/supply/power_supply_core.c | 3 +++ include/linux/power_supply.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/po

[PATCH 4/7] dt-bindings: power: supply: Add docs for Ingenic JZ47xx SoCs battery.

2019-02-17 Thread Artur Rojek
Add documentation for the ingenic-battery driver, used on JZ47xx SoCs. Signed-off-by: Artur Rojek --- .../bindings/power/supply/ingenic,battery.txt | 31 +++ 1 file changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/supply/ingenic,battery.txt

[PATCH 3/7] dt-bindings: power: supply: Add voltage-max-design-microvolt property

2019-02-17 Thread Artur Rojek
Add documentation for the "voltage-max-design-microvolt" property. Signed-off-by: Artur Rojek --- Documentation/devicetree/bindings/power/supply/battery.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/power/supply/battery.txt b/Doc

[PATCH 1/7] iio: inkern: API for reading available iio channel attribute values

2019-02-17 Thread Artur Rojek
Extend the inkern API with a function for reading available attribute values of iio channels. Signed-off-by: Artur Rojek --- drivers/iio/inkern.c | 20 include/linux/iio/consumer.h | 14 ++ 2 files changed, 34 insertions(+) diff --git a/drivers/iio

[PATCH 2/2] power: supply: gpio-charger: Add support for charger status.

2019-02-05 Thread Artur Rojek
Introduce optional support of POWER_SUPPLY_PROP_STATUS for chargers which provide charging status GPIO. Signed-off-by: Artur Rojek --- drivers/power/supply/gpio-charger.c | 53 +++-- 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/drivers/power/supply

[PATCH 1/2] dt-bindings: power: supply: gpio-charger: Add status-gpios property

2019-02-05 Thread Artur Rojek
Add documentation for the "status-gpios" property. Signed-off-by: Artur Rojek --- .../devicetree/bindings/power/supply/gpio-charger.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/power/supply/gpio-charger.txt b/Documentation/

[PATCH v2 2/3] dt-bindings: iio/adc: Add bindings for Ingenic JZ47xx SoCs ADC.

2019-02-03 Thread Artur Rojek
Add device tree bindings for the ADC controller on JZ47xx SoCs, used by the ingenic-adc driver. Signed-off-by: Artur Rojek --- Changes: v2: no change include/dt-bindings/iio/adc/ingenic,adc.h | 10 ++ 1 file changed, 10 insertions(+) create mode 100644 include/dt-bindings/iio/adc

[PATCH v2 3/3] IIO: add Ingenic JZ47xx ADC driver.

2019-02-03 Thread Artur Rojek
Add an IIO driver for the ADC hardware present on Ingenic JZ47xx SoCs. Signed-off-by: Artur Rojek --- Changes: v2: - prefix all platform defines with JZ_ADC_*, - replace spinlock with a mutex, - change devm_add_action to devm_add_action_or_reset, - add a function wrapper for

[PATCH v2 1/3] dt-bindings: iio/adc: Add docs for Ingenic JZ47xx SoCs ADC.

2019-02-03 Thread Artur Rojek
Add documentation for the ADC controller on JZ47xx SoCs, used by the ingenic-adc driver. Signed-off-by: Artur Rojek --- Changes: v2: change a typo ',' into ';' in battery example .../bindings/iio/adc/ingenic,adc.txt | 48 +++ 1 file ch

[PATCH 3/3] IIO: add Ingenic JZ47xx ADC driver.

2019-01-28 Thread Artur Rojek
Add an IIO driver for the ADC hardware present on Ingenic JZ47xx SoCs. Signed-off-by: Artur Rojek --- drivers/iio/adc/Kconfig | 9 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/ingenic-adc.c | 357 ++ 3 files changed, 367 insertions(+) create

[PATCH 1/3] dt-bindings: iio/adc: Add docs for Ingenic JZ47xx SoCs ADC.

2019-01-28 Thread Artur Rojek
Add documentation for the ADC controller on JZ47xx SoCs, used by the ingenic-adc driver. Signed-off-by: Artur Rojek --- .../bindings/iio/adc/ingenic,adc.txt | 48 +++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/ingenic

[PATCH 2/3] dt-bindings: iio/adc: Add bindings for Ingenic JZ47xx SoCs ADC.

2019-01-28 Thread Artur Rojek
Add device tree bindings for the ADC controller on JZ47xx SoCs, used by the ingenic-adc driver. Signed-off-by: Artur Rojek --- include/dt-bindings/iio/adc/ingenic,adc.h | 10 ++ 1 file changed, 10 insertions(+) create mode 100644 include/dt-bindings/iio/adc/ingenic,adc.h diff --git a