Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1474226 > unrolled thread

[PATCH v9 0/4] power: act8945a_charger: Improvements

Started byWenyou Yang <wenyou.yang@atmel.com>
First post2016-09-01 11:40 +0200
Last post2016-09-01 16:00 +0200
Articles 7 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v9 0/4] power: act8945a_charger: Improvements Wenyou Yang <wenyou.yang@atmel.com> - 2016-09-01 11:40 +0200
    [PATCH v9 4/4] ARM: at91/dt: sama5d2_xplained: Add act8945a-charger node. Wenyou Yang <wenyou.yang@atmel.com> - 2016-09-01 11:40 +0200
    [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example Wenyou Yang <wenyou.yang@atmel.com> - 2016-09-01 11:40 +0200
      Re: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example Lee Jones <lee.jones@linaro.org> - 2016-09-01 13:30 +0200
        Re: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example Sebastian Reichel <sre@kernel.org> - 2016-09-01 14:50 +0200
          RE: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example <Wenyou.Yang@microchip.com> - 2016-09-01 15:00 +0200
            Re: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example Lee Jones <lee.jones@linaro.org> - 2016-09-01 16:00 +0200

#1474226 — [PATCH v9 0/4] power: act8945a_charger: Improvements

FromWenyou Yang <wenyou.yang@atmel.com>
Date2016-09-01 11:40 +0200
Subject[PATCH v9 0/4] power: act8945a_charger: Improvements
Message-ID<scwDv-8ch-7@gated-at.bofh.it>
This patch series is to improve the implementation of act8945a-charger
driver, such as regard the act8945-charger as a sub-device, improve
the way to check the status, fix the power supply type property,
add the status change update, and add more properties: capacity level
property and max current property.

Changes in v9:
 - For "lbo-gpios", use devm_gpiod_get_optional(), instead of
   devm_gpiod_get(), for simpler and more reasonable.
 - Remove unnecessary GPIOLIB dependency.
 - For "chglev-gpios", use devm_gpiod_get_optional(), instead of
   devm_gpiod_get(), for simper and more reasonable.
 - Not include seven patches which have been queued or applied.

Changes in v8:
 - As the act8945a_charger is regarded as a sub-device, all
   properties can be achieved from its own device node,
   use devm_gpiod_get() properly as well to get "lbo-gpios".
 - Add missing return -EPROBE_DEFER  for "lbo-gpios".
 - As the act8945a_charger is regarded as a sub-device, all
   properties can be achieved from its own device node,
   use devm_gpiod_get() properly as well to get "chglev-gpios".
 - Add missing return -EPROBE_DEFER  for "chglev-gpios".
 - Add 4 new patches: 1/11, 2/11, 9/11, and 11/11.

Changes in v7:
 - For "lbo-gpios", use gpiod_get() to fix devm_gpiod_get() wrong use
   with parent device as *dev argument.
 - Add the handle -EPROBE_DEFER returned from gpiod_get "lbo-gpios".
 - Use dev_info() to print log if the lbo irq request failed.
 - Remove unneeded semicolon.
 - Add depends on GPIOLIB for use gpiod.
 - For "chglev-gpios", use gpiod_get() to fix devm_gpiod_get() wrong use
   with parent device as *dev argument.
 - Add the handle -EPROBE_DEFER returned from gpiod_get "chglev-gpio".
 - Remove unneeded semicolon.

Changes in v6:
 - For "lbo-gpios", use gpiod API instead of old gpio API to handle.
 - For "chglev-gpios", use gpiod API instead of old gpio API to handle.

Changes in v4:
 - Change devname of devm_request_irq() from "lbo-detect" to
   "act8945a, lbo-detect".
 - Fix wrong gpio assignment for chglev_pin.

Wenyou Yang (4):
  power: act8945a_charger: Add capacity level property
  power: act8945a_charger: Add max current property
  doc: bindings: mfd: act8945a: Update the example
  ARM: at91/dt: sama5d2_xplained: Add act8945a-charger node.

 Documentation/devicetree/bindings/mfd/act8945a.txt |  22 ++-
 arch/arm/boot/dts/at91-sama5d2_xplained.dts        |  23 ++-
 drivers/power/supply/act8945a_charger.c            | 166 +++++++++++++++++++--
 3 files changed, 187 insertions(+), 24 deletions(-)

-- 
2.7.4

[toc] | [next] | [standalone]


#1474227 — [PATCH v9 4/4] ARM: at91/dt: sama5d2_xplained: Add act8945a-charger node.

FromWenyou Yang <wenyou.yang@atmel.com>
Date2016-09-01 11:40 +0200
Subject[PATCH v9 4/4] ARM: at91/dt: sama5d2_xplained: Add act8945a-charger node.
Message-ID<scwDw-8ch-35@gated-at.bofh.it>
In reply to#1474226
Add act8945a-charger as a sub-device node.
Use the "interrupts" property, instead of the "active-semi,irq_gpios"
to denote the act8945a chager's irq.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---

Changes in v9:
 - Not include seven patches which have been queued or applied.

Changes in v8:
 - Add 4 new patches: 1/11, 2/11, 9/11, and 11/11.

Changes in v7: None
Changes in v6: None
Changes in v4: None

 arch/arm/boot/dts/at91-sama5d2_xplained.dts | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
index 0b9a59d..87eff10 100644
--- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
@@ -162,14 +162,6 @@
 					compatible = "active-semi,act8945a";
 					reg = <0x5b>;
 					active-semi,vsel-high;
-					active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
-					active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
-					active-semi,irq_gpios = <&pioA 45 GPIO_ACTIVE_LOW>;
-					active-semi,input-voltage-threshold-microvolt = <6600>;
-					active-semi,precondition-timeout = <40>;
-					active-semi,total-timeout = <3>;
-					pinctrl-names = "default";
-					pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
 					status = "okay";
 
 					regulators {
@@ -222,6 +214,21 @@
 							regulator-always-on;
 						};
 					};
+
+					charger {
+						compatible = "active-semi,act8945a-charger";
+						pinctrl-names = "default";
+						pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
+						interrupt-parent = <&pioA>;
+						interrupts = <45 GPIO_ACTIVE_LOW>;
+
+						active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
+						active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
+						active-semi,input-voltage-threshold-microvolt = <6600>;
+						active-semi,precondition-timeout = <40>;
+						active-semi,total-timeout = <3>;
+						status = "okay";
+					};
 				};
 			};
 
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1474229 — [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example

FromWenyou Yang <wenyou.yang@atmel.com>
Date2016-09-01 11:40 +0200
Subject[PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
Message-ID<scwDw-8ch-45@gated-at.bofh.it>
In reply to#1474226
Since the act8945a-charger is regarded as a sub-device and it using
"interrupts" property, update the examples section.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---

Changes in v9: None
Changes in v8: None
Changes in v7: None
Changes in v6: None
Changes in v4: None

 Documentation/devicetree/bindings/mfd/act8945a.txt | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/act8945a.txt b/Documentation/devicetree/bindings/mfd/act8945a.txt
index f712830..462819a 100644
--- a/Documentation/devicetree/bindings/mfd/act8945a.txt
+++ b/Documentation/devicetree/bindings/mfd/act8945a.txt
@@ -14,13 +14,6 @@ Example:
 		reg = <0x5b>;
 		status = "okay";
 
-		pinctrl-names = "default";
-		pinctrl-0 = <&pinctrl_charger_chglev>;
-		active-semi,chglev-gpio = <&pioA 12 GPIO_ACTIVE_HIGH>;
-		active-semi,input-voltage-threshold-microvolt = <6600>;
-		active-semi,precondition-timeout = <40>;
-		active-semi,total-timeout = <3>;
-
 		active-semi,vsel-high;
 
 		regulators {
@@ -73,4 +66,19 @@ Example:
 				regulator-always-on;
 			};
 		};
+
+		charger {
+			compatible = "active-semi,act8945a-charger";
+			pinctrl-names = "default";
+			pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
+			interrupt-parent = <&pioA>;
+			interrupts = <45 GPIO_ACTIVE_LOW>;
+
+			active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
+			active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
+			active-semi,input-voltage-threshold-microvolt = <6600>;
+			active-semi,precondition-timeout = <40>;
+			active-semi,total-timeout = <3>;
+			status = "okay";
+		};
 	};
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1474315 — Re: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example

FromLee Jones <lee.jones@linaro.org>
Date2016-09-01 13:30 +0200
SubjectRe: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
Message-ID<scylZ-1an-39@gated-at.bofh.it>
In reply to#1474229
On Thu, 01 Sep 2016, Wenyou Yang wrote:

> Since the act8945a-charger is regarded as a sub-device and it using
> "interrupts" property, update the examples section.
> 
> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> ---
> 
> Changes in v9: None
> Changes in v8: None
> Changes in v7: None
> Changes in v6: None
> Changes in v4: None
> 
>  Documentation/devicetree/bindings/mfd/act8945a.txt | 22 +++++++++++++++-------
>  1 file changed, 15 insertions(+), 7 deletions(-)

This is a functional change.  I'll require a DT Ack.

> diff --git a/Documentation/devicetree/bindings/mfd/act8945a.txt b/Documentation/devicetree/bindings/mfd/act8945a.txt
> index f712830..462819a 100644
> --- a/Documentation/devicetree/bindings/mfd/act8945a.txt
> +++ b/Documentation/devicetree/bindings/mfd/act8945a.txt
> @@ -14,13 +14,6 @@ Example:
>  		reg = <0x5b>;
>  		status = "okay";
>  
> -		pinctrl-names = "default";
> -		pinctrl-0 = <&pinctrl_charger_chglev>;
> -		active-semi,chglev-gpio = <&pioA 12 GPIO_ACTIVE_HIGH>;
> -		active-semi,input-voltage-threshold-microvolt = <6600>;
> -		active-semi,precondition-timeout = <40>;
> -		active-semi,total-timeout = <3>;
> -
>  		active-semi,vsel-high;
>  
>  		regulators {
> @@ -73,4 +66,19 @@ Example:
>  				regulator-always-on;
>  			};
>  		};
> +
> +		charger {
> +			compatible = "active-semi,act8945a-charger";
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
> +			interrupt-parent = <&pioA>;
> +			interrupts = <45 GPIO_ACTIVE_LOW>;
> +
> +			active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
> +			active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
> +			active-semi,input-voltage-threshold-microvolt = <6600>;
> +			active-semi,precondition-timeout = <40>;
> +			active-semi,total-timeout = <3>;
> +			status = "okay";
> +		};
>  	};

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

[toc] | [prev] | [next] | [standalone]


#1474379 — Re: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example

FromSebastian Reichel <sre@kernel.org>
Date2016-09-01 14:50 +0200
SubjectRe: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
Message-ID<sczBo-1Vn-17@gated-at.bofh.it>
In reply to#1474315

[Multipart message — attachments visible in raw view] — view raw

Hi Lee,

On Thu, Sep 01, 2016 at 12:22:51PM +0100, Lee Jones wrote:
> On Thu, 01 Sep 2016, Wenyou Yang wrote:
> 
> > Since the act8945a-charger is regarded as a sub-device and it using
> > "interrupts" property, update the examples section.
> > 
> > Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> > ---
> > 
> > Changes in v9: None
> > Changes in v8: None
> > Changes in v7: None
> > Changes in v6: None
> > Changes in v4: None
> > 
> >  Documentation/devicetree/bindings/mfd/act8945a.txt | 22 +++++++++++++++-------
> >  1 file changed, 15 insertions(+), 7 deletions(-)
> 
> This is a functional change.  I'll require a DT Ack.

Wenyou Yang forgot to take over Rob's Acked-By from the previous
version: https://patchwork.kernel.org/patch/9298871/

-- Sebastian

[toc] | [prev] | [next] | [standalone]


#1474386 — RE: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example

From<Wenyou.Yang@microchip.com>
Date2016-09-01 15:00 +0200
SubjectRE: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
Message-ID<sczL4-21n-3@gated-at.bofh.it>
In reply to#1474379

> -----Original Message-----
> From: Sebastian Reichel [mailto:sre@kernel.org]
> Sent: 2016年9月1日 20:48
> To: Lee Jones <lee.jones@linaro.org>
> Cc: Wenyou Yang - A41535 <Wenyou.Yang@microchip.com>; Dmitry Eremin-
> Solenikov <dbaryshkov@gmail.com>; David Woodhouse
> <dwmw2@infradead.org>; Rob Herring <robh+dt@kernel.org>; Pawel Moll
> <pawel.moll@arm.com>; Mark Rutland <mark.rutland@arm.com>; Ian Campbell
> <ijc+devicetree@hellion.org.uk>; Kumar Gala <galak@codeaurora.org>; Nicolas
> Ferre <nicolas.ferre@atmel.com>; Alexandre Belloni <alexandre.belloni@free-
> electrons.com>; linux-kernel@vger.kernel.org; Wenyou Yang - A41535
> <Wenyou.Yang@microchip.com>; devicetree@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-pm@vger.kernel.org
> Subject: Re: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
> 
> Hi Lee,
> 
> On Thu, Sep 01, 2016 at 12:22:51PM +0100, Lee Jones wrote:
> > On Thu, 01 Sep 2016, Wenyou Yang wrote:
> >
> > > Since the act8945a-charger is regarded as a sub-device and it using
> > > "interrupts" property, update the examples section.
> > >
> > > Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> > > ---
> > >
> > > Changes in v9: None
> > > Changes in v8: None
> > > Changes in v7: None
> > > Changes in v6: None
> > > Changes in v4: None
> > >
> > >  Documentation/devicetree/bindings/mfd/act8945a.txt | 22
> > > +++++++++++++++-------
> > >  1 file changed, 15 insertions(+), 7 deletions(-)
> >
> > This is a functional change.  I'll require a DT Ack.
> 
> Wenyou Yang forgot to take over Rob's Acked-By from the previous
> version: https://patchwork.kernel.org/patch/9298871/

Yes, sorry. I forgot.


Best Regards,
Wenyou Yang

[toc] | [prev] | [next] | [standalone]


#1474414 — Re: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example

FromLee Jones <lee.jones@linaro.org>
Date2016-09-01 16:00 +0200
SubjectRe: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
Message-ID<scAH7-2zZ-23@gated-at.bofh.it>
In reply to#1474386
On Thu, 01 Sep 2016, Wenyou.Yang@microchip.com wrote:

> 
> 
> > -----Original Message-----
> > From: Sebastian Reichel [mailto:sre@kernel.org]
> > Sent: 2016年9月1日 20:48
> > To: Lee Jones <lee.jones@linaro.org>
> > Cc: Wenyou Yang - A41535 <Wenyou.Yang@microchip.com>; Dmitry Eremin-
> > Solenikov <dbaryshkov@gmail.com>; David Woodhouse
> > <dwmw2@infradead.org>; Rob Herring <robh+dt@kernel.org>; Pawel Moll
> > <pawel.moll@arm.com>; Mark Rutland <mark.rutland@arm.com>; Ian Campbell
> > <ijc+devicetree@hellion.org.uk>; Kumar Gala <galak@codeaurora.org>; Nicolas
> > Ferre <nicolas.ferre@atmel.com>; Alexandre Belloni <alexandre.belloni@free-
> > electrons.com>; linux-kernel@vger.kernel.org; Wenyou Yang - A41535
> > <Wenyou.Yang@microchip.com>; devicetree@vger.kernel.org; linux-arm-
> > kernel@lists.infradead.org; linux-pm@vger.kernel.org
> > Subject: Re: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
> > 
> > Hi Lee,
> > 
> > On Thu, Sep 01, 2016 at 12:22:51PM +0100, Lee Jones wrote:
> > > On Thu, 01 Sep 2016, Wenyou Yang wrote:
> > >
> > > > Since the act8945a-charger is regarded as a sub-device and it using
> > > > "interrupts" property, update the examples section.
> > > >
> > > > Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> > > > ---
> > > >
> > > > Changes in v9: None
> > > > Changes in v8: None
> > > > Changes in v7: None
> > > > Changes in v6: None
> > > > Changes in v4: None
> > > >
> > > >  Documentation/devicetree/bindings/mfd/act8945a.txt | 22
> > > > +++++++++++++++-------
> > > >  1 file changed, 15 insertions(+), 7 deletions(-)
> > >
> > > This is a functional change.  I'll require a DT Ack.
> > 
> > Wenyou Yang forgot to take over Rob's Acked-By from the previous
> > version: https://patchwork.kernel.org/patch/9298871/
> 
> Yes, sorry. I forgot.

Very well.

Applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web