diff mbox

[09/15] ARM: dts: at91: sama5d2_xplained: Add charger node of pmic.

Message ID 1507565377-1545-10-git-send-email-claudiu.beznea@microchip.com (mailing list archive)
State New, archived
Headers show

Commit Message

Claudiu Beznea Oct. 9, 2017, 4:09 p.m. UTC
Add charger device node as a sub-device node of act8945a mfd, move
the charger's properties to this node, and use the "interrupts"
property to replace "active-semi,irq_gpios" to denote the act8945a
charger's irq.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
[claudiu.beznea@microchip.com: replace numbers with pin macros]
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 arch/arm/boot/dts/at91-sama5d2_xplained.dts | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

Comments

Wenyou.Yang@microchip.com Oct. 10, 2017, 12:39 a.m. UTC | #1
Hi Claudiu,


On 2017/10/10 0:09, Claudiu Beznea wrote:
> Add charger device node as a sub-device node of act8945a mfd, move
> the charger's properties to this node, and use the "interrupts"
> property to replace "active-semi,irq_gpios" to denote the act8945a
> charger's irq.
>
> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> [claudiu.beznea@microchip.com: replace numbers with pin macros]
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
This patch has already applied on at91-dt branch.
https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git/commit/?h=at91-dt&id=4b6ad41f267b8ddabf5dd1b02a318bc74f0b95e9

> ---
>   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 c7e9ccf2bc87..848ca1b025be 100644
> --- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
> +++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
> @@ -160,14 +160,6 @@
>   					compatible = "active-semi,act8945a";
>   					reg = <0x5b>;
>   					active-semi,vsel-high;
> -					active-semi,chglev-gpios = <&pioA PIN_PA12 GPIO_ACTIVE_HIGH>;
> -					active-semi,lbo-gpios = <&pioA PIN_PC8 GPIO_ACTIVE_LOW>;
> -					active-semi,irq_gpios = <&pioA PIN_PB13 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 {
> @@ -220,6 +212,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 = <PIN_PB13 GPIO_ACTIVE_LOW>;
> +
> +						active-semi,chglev-gpios = <&pioA PIN_PA12 GPIO_ACTIVE_HIGH>;
> +						active-semi,lbo-gpios = <&pioA PIN_PC8 GPIO_ACTIVE_LOW>;
> +						active-semi,input-voltage-threshold-microvolt = <6600>;
> +						active-semi,precondition-timeout = <40>;
> +						active-semi,total-timeout = <3>;
> +						status = "okay";
> +					};
>   				};
>   			};
>   

Best Regards,
Wenyou Yang
Claudiu Beznea Oct. 10, 2017, 10:09 a.m. UTC | #2
Hi Wenyou,

On 10.10.2017 03:39, Yang, Wenyou wrote:
> Hi Claudiu,
> 
> 
> On 2017/10/10 0:09, Claudiu Beznea wrote:
>> Add charger device node as a sub-device node of act8945a mfd, move
>> the charger's properties to this node, and use the "interrupts"
>> property to replace "active-semi,irq_gpios" to denote the act8945a
>> charger's irq.
>>
>> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
>> [claudiu.beznea@microchip.com: replace numbers with pin macros]
>> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> This patch has already applied on at91-dt branch.
> https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git/commit/?h=at91-dt&id=4b6ad41f267b8ddabf5dd1b02a318bc74f0b95e9
> 
Thanks, I will remove it from v2.

>> ---
>>   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 c7e9ccf2bc87..848ca1b025be 100644
>> --- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
>> +++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
>> @@ -160,14 +160,6 @@
>>                       compatible = "active-semi,act8945a";
>>                       reg = <0x5b>;
>>                       active-semi,vsel-high;
>> -                    active-semi,chglev-gpios = <&pioA PIN_PA12 GPIO_ACTIVE_HIGH>;
>> -                    active-semi,lbo-gpios = <&pioA PIN_PC8 GPIO_ACTIVE_LOW>;
>> -                    active-semi,irq_gpios = <&pioA PIN_PB13 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 {
>> @@ -220,6 +212,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 = <PIN_PB13 GPIO_ACTIVE_LOW>;
>> +
>> +                        active-semi,chglev-gpios = <&pioA PIN_PA12 GPIO_ACTIVE_HIGH>;
>> +                        active-semi,lbo-gpios = <&pioA PIN_PC8 GPIO_ACTIVE_LOW>;
>> +                        active-semi,input-voltage-threshold-microvolt = <6600>;
>> +                        active-semi,precondition-timeout = <40>;
>> +                        active-semi,total-timeout = <3>;
>> +                        status = "okay";
>> +                    };
>>                   };
>>               };
>>   
> 
> Best Regards,
> Wenyou Yang
diff mbox

Patch

diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
index c7e9ccf2bc87..848ca1b025be 100644
--- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
@@ -160,14 +160,6 @@ 
 					compatible = "active-semi,act8945a";
 					reg = <0x5b>;
 					active-semi,vsel-high;
-					active-semi,chglev-gpios = <&pioA PIN_PA12 GPIO_ACTIVE_HIGH>;
-					active-semi,lbo-gpios = <&pioA PIN_PC8 GPIO_ACTIVE_LOW>;
-					active-semi,irq_gpios = <&pioA PIN_PB13 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 {
@@ -220,6 +212,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 = <PIN_PB13 GPIO_ACTIVE_LOW>;
+
+						active-semi,chglev-gpios = <&pioA PIN_PA12 GPIO_ACTIVE_HIGH>;
+						active-semi,lbo-gpios = <&pioA PIN_PC8 GPIO_ACTIVE_LOW>;
+						active-semi,input-voltage-threshold-microvolt = <6600>;
+						active-semi,precondition-timeout = <40>;
+						active-semi,total-timeout = <3>;
+						status = "okay";
+					};
 				};
 			};