Re: [PATCH 5/7] ARM: dts: am335x: Add the charger interrupt

2016-10-27 Thread Milo Kim

On 10/22/2016 05:47 AM, Robert Nelson wrote:

+#include 

^ this hasn't been posted nor pushed to mainline yet.. ;)



Oops! I've created this file but not captured not only in my git tree 
but also in my head! Thanks for your review.


Best regards,
Milo


Re: [PATCH 5/7] ARM: dts: am335x: Add the charger interrupt

2016-10-27 Thread Milo Kim

On 10/22/2016 05:47 AM, Robert Nelson wrote:

+#include 

^ this hasn't been posted nor pushed to mainline yet.. ;)



Oops! I've created this file but not captured not only in my git tree 
but also in my head! Thanks for your review.


Best regards,
Milo


Re: [PATCH 5/7] ARM: dts: am335x: Add the charger interrupt

2016-10-21 Thread Robert Nelson
On Fri, Oct 21, 2016 at 3:47 PM, Robert Nelson  wrote:
> On Fri, Oct 21, 2016 at 9:01 AM, Milo Kim  wrote:
>> This enables the charger driver gets corresponding IRQ number by using
>> platform_get_irq_byname() helper.
>>
>> Signed-off-by: Milo Kim 
>> ---
>>  arch/arm/boot/dts/am335x-bone-common.dtsi | 8 
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi 
>> b/arch/arm/boot/dts/am335x-bone-common.dtsi
>> index 25303d9..cec9d91 100644
>> --- a/arch/arm/boot/dts/am335x-bone-common.dtsi
>> +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
>> @@ -6,6 +6,8 @@
>>   * published by the Free Software Foundation.
>>   */
>>
>> +#include 
>
> ^ this hasn't been posted nor pushed to mainline yet.. ;)

So, with this patchset + Keerthy's [RESEND PATCH v8 0/5] mfd:
tps65218: Clean ups:

https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1250918.html

and this patch, as systemd is looking for "tps65217_pwr_but"..

https://github.com/systemd/systemd/blob/master/src/login/70-power-switch.rules#L13

Shutdown is working on my BBB/BBG/BBGW/BBBW's...

diff --git a/drivers/input/misc/tps65218-pwrbutton.c
b/drivers/input/misc/tps65218-pwrbutton.c
index cc74a41..f7e5492 100644
--- a/drivers/input/misc/tps65218-pwrbutton.c
+++ b/drivers/input/misc/tps65218-pwrbutton.c
@@ -36,7 +36,7 @@ struct tps6521x_data {
 static const struct tps6521x_data tps65217_data = {
  .reg_status = TPS65217_REG_STATUS,
  .pb_mask = TPS65217_STATUS_PB,
- .name = "tps65217_pwrbutton",
+ .name = "tps65217_pwr_but",
 };

 static const struct tps6521x_data tps65218_data = {
diff --git a/include/dt-bindings/mfd/tps65217.h
b/include/dt-bindings/mfd/tps65217.h
new file mode 100644
index 000..26b2ba8
--- /dev/null
+++ b/include/dt-bindings/mfd/tps65217.h
@@ -0,0 +1,9 @@
+#ifndef __DT_BINDINGS_TPS65217_H
+#define __DT_BINDINGS_TPS65217_H
+
+#define TPS65217_IRQ_USB 0
+#define TPS65217_IRQ_AC 1
+#define TPS65217_IRQ_PB 2
+#define TPS65217_NUM_IRQ 3
+
+#endif /* __DT_BINDINGS_TPS65217_H */

Regards,

-- 
Robert Nelson
https://rcn-ee.com/


Re: [PATCH 5/7] ARM: dts: am335x: Add the charger interrupt

2016-10-21 Thread Robert Nelson
On Fri, Oct 21, 2016 at 3:47 PM, Robert Nelson  wrote:
> On Fri, Oct 21, 2016 at 9:01 AM, Milo Kim  wrote:
>> This enables the charger driver gets corresponding IRQ number by using
>> platform_get_irq_byname() helper.
>>
>> Signed-off-by: Milo Kim 
>> ---
>>  arch/arm/boot/dts/am335x-bone-common.dtsi | 8 
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi 
>> b/arch/arm/boot/dts/am335x-bone-common.dtsi
>> index 25303d9..cec9d91 100644
>> --- a/arch/arm/boot/dts/am335x-bone-common.dtsi
>> +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
>> @@ -6,6 +6,8 @@
>>   * published by the Free Software Foundation.
>>   */
>>
>> +#include 
>
> ^ this hasn't been posted nor pushed to mainline yet.. ;)

So, with this patchset + Keerthy's [RESEND PATCH v8 0/5] mfd:
tps65218: Clean ups:

https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1250918.html

and this patch, as systemd is looking for "tps65217_pwr_but"..

https://github.com/systemd/systemd/blob/master/src/login/70-power-switch.rules#L13

Shutdown is working on my BBB/BBG/BBGW/BBBW's...

diff --git a/drivers/input/misc/tps65218-pwrbutton.c
b/drivers/input/misc/tps65218-pwrbutton.c
index cc74a41..f7e5492 100644
--- a/drivers/input/misc/tps65218-pwrbutton.c
+++ b/drivers/input/misc/tps65218-pwrbutton.c
@@ -36,7 +36,7 @@ struct tps6521x_data {
 static const struct tps6521x_data tps65217_data = {
  .reg_status = TPS65217_REG_STATUS,
  .pb_mask = TPS65217_STATUS_PB,
- .name = "tps65217_pwrbutton",
+ .name = "tps65217_pwr_but",
 };

 static const struct tps6521x_data tps65218_data = {
diff --git a/include/dt-bindings/mfd/tps65217.h
b/include/dt-bindings/mfd/tps65217.h
new file mode 100644
index 000..26b2ba8
--- /dev/null
+++ b/include/dt-bindings/mfd/tps65217.h
@@ -0,0 +1,9 @@
+#ifndef __DT_BINDINGS_TPS65217_H
+#define __DT_BINDINGS_TPS65217_H
+
+#define TPS65217_IRQ_USB 0
+#define TPS65217_IRQ_AC 1
+#define TPS65217_IRQ_PB 2
+#define TPS65217_NUM_IRQ 3
+
+#endif /* __DT_BINDINGS_TPS65217_H */

Regards,

-- 
Robert Nelson
https://rcn-ee.com/


Re: [PATCH 5/7] ARM: dts: am335x: Add the charger interrupt

2016-10-21 Thread Robert Nelson
On Fri, Oct 21, 2016 at 9:01 AM, Milo Kim  wrote:
> This enables the charger driver gets corresponding IRQ number by using
> platform_get_irq_byname() helper.
>
> Signed-off-by: Milo Kim 
> ---
>  arch/arm/boot/dts/am335x-bone-common.dtsi | 8 
>  1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi 
> b/arch/arm/boot/dts/am335x-bone-common.dtsi
> index 25303d9..cec9d91 100644
> --- a/arch/arm/boot/dts/am335x-bone-common.dtsi
> +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
> @@ -6,6 +6,8 @@
>   * published by the Free Software Foundation.
>   */
>
> +#include 

^ this hasn't been posted nor pushed to mainline yet.. ;)

> +
>  / {
> cpus {
> cpu@0 {
> @@ -316,6 +318,12 @@
>
> ti,pmic-shutdown-controller;
>
> +   charger {
> +   interrupts = , ;
> +   interrupts-names = "AC", "USB";
> +   status = "okay";
> +   };
> +
> regulators {
> dcdc1_reg: regulator@0 {
> regulator-name = "vdds_dpr";
> --
> 2.9.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Robert Nelson
https://rcn-ee.com/


Re: [PATCH 5/7] ARM: dts: am335x: Add the charger interrupt

2016-10-21 Thread Robert Nelson
On Fri, Oct 21, 2016 at 9:01 AM, Milo Kim  wrote:
> This enables the charger driver gets corresponding IRQ number by using
> platform_get_irq_byname() helper.
>
> Signed-off-by: Milo Kim 
> ---
>  arch/arm/boot/dts/am335x-bone-common.dtsi | 8 
>  1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi 
> b/arch/arm/boot/dts/am335x-bone-common.dtsi
> index 25303d9..cec9d91 100644
> --- a/arch/arm/boot/dts/am335x-bone-common.dtsi
> +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
> @@ -6,6 +6,8 @@
>   * published by the Free Software Foundation.
>   */
>
> +#include 

^ this hasn't been posted nor pushed to mainline yet.. ;)

> +
>  / {
> cpus {
> cpu@0 {
> @@ -316,6 +318,12 @@
>
> ti,pmic-shutdown-controller;
>
> +   charger {
> +   interrupts = , ;
> +   interrupts-names = "AC", "USB";
> +   status = "okay";
> +   };
> +
> regulators {
> dcdc1_reg: regulator@0 {
> regulator-name = "vdds_dpr";
> --
> 2.9.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Robert Nelson
https://rcn-ee.com/


[PATCH 5/7] ARM: dts: am335x: Add the charger interrupt

2016-10-21 Thread Milo Kim
This enables the charger driver gets corresponding IRQ number by using
platform_get_irq_byname() helper.

Signed-off-by: Milo Kim 
---
 arch/arm/boot/dts/am335x-bone-common.dtsi | 8 
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi 
b/arch/arm/boot/dts/am335x-bone-common.dtsi
index 25303d9..cec9d91 100644
--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
@@ -6,6 +6,8 @@
  * published by the Free Software Foundation.
  */
 
+#include 
+
 / {
cpus {
cpu@0 {
@@ -316,6 +318,12 @@
 
ti,pmic-shutdown-controller;
 
+   charger {
+   interrupts = , ;
+   interrupts-names = "AC", "USB";
+   status = "okay";
+   };
+
regulators {
dcdc1_reg: regulator@0 {
regulator-name = "vdds_dpr";
-- 
2.9.3



[PATCH 5/7] ARM: dts: am335x: Add the charger interrupt

2016-10-21 Thread Milo Kim
This enables the charger driver gets corresponding IRQ number by using
platform_get_irq_byname() helper.

Signed-off-by: Milo Kim 
---
 arch/arm/boot/dts/am335x-bone-common.dtsi | 8 
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi 
b/arch/arm/boot/dts/am335x-bone-common.dtsi
index 25303d9..cec9d91 100644
--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
@@ -6,6 +6,8 @@
  * published by the Free Software Foundation.
  */
 
+#include 
+
 / {
cpus {
cpu@0 {
@@ -316,6 +318,12 @@
 
ti,pmic-shutdown-controller;
 
+   charger {
+   interrupts = , ;
+   interrupts-names = "AC", "USB";
+   status = "okay";
+   };
+
regulators {
dcdc1_reg: regulator@0 {
regulator-name = "vdds_dpr";
-- 
2.9.3