diff mbox

[4/5] mfd: tps65217: Add power button as subdevice

Message ID 1459789865-3704-6-git-send-email-m.niestroj@grinn-global.com (mailing list archive)
State New, archived
Headers show

Commit Message

Marcin Niestroj April 4, 2016, 5:11 p.m. UTC
Add tps65217 power buttor subdevice with assigned IRQ resources.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
---
 drivers/mfd/tps65217.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Lee Jones April 11, 2016, 9:44 a.m. UTC | #1
On Mon, 04 Apr 2016, Marcin Niestroj wrote:

> Add tps65217 power buttor subdevice with assigned IRQ resources.
> 
> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
> ---
>  drivers/mfd/tps65217.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Applied, thanks.

> diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
> index a20980f..fd3b5d8 100644
> --- a/drivers/mfd/tps65217.c
> +++ b/drivers/mfd/tps65217.c
> @@ -38,6 +38,10 @@ static struct resource charger_resources[] = {
>  	DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_USB, "USB"),
>  };
>  
> +static struct resource pb_resources[] = {
> +	DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_PB, "PB"),
> +};
> +
>  struct tps65217_irq {
>  	int mask;
>  	int interrupt;
> @@ -122,6 +126,12 @@ static struct mfd_cell tps65217s[] = {
>  		.resources = charger_resources,
>  		.of_compatible = "ti,tps65217-charger",
>  	},
> +	{
> +		.name = "tps65217-pwrbutton",
> +		.num_resources = ARRAY_SIZE(pb_resources),
> +		.resources = pb_resources,
> +		.of_compatible = "ti,tps65217-pwrbutton",
> +	},
>  };
>  
>  static irqreturn_t tps65217_irq_thread(int irq, void *data)
Grygorii Strashko April 11, 2016, 10:27 a.m. UTC | #2
On 04/11/2016 12:44 PM, Lee Jones wrote:
> On Mon, 04 Apr 2016, Marcin Niestroj wrote:
>
>> Add tps65217 power buttor subdevice with assigned IRQ resources.
>>
>> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
>> ---
>>   drivers/mfd/tps65217.c | 10 ++++++++++
>>   1 file changed, 10 insertions(+)
>
> Applied, thanks.

Seems there is dependency from patch 1 :(

>
>> diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
>> index a20980f..fd3b5d8 100644
>> --- a/drivers/mfd/tps65217.c
>> +++ b/drivers/mfd/tps65217.c
>> @@ -38,6 +38,10 @@ static struct resource charger_resources[] = {
>>   	DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_USB, "USB"),
>>   };
>>
>> +static struct resource pb_resources[] = {
>> +	DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_PB, "PB"),
>> +};
>> +
>>   struct tps65217_irq {
>>   	int mask;
>>   	int interrupt;
>> @@ -122,6 +126,12 @@ static struct mfd_cell tps65217s[] = {
>>   		.resources = charger_resources,
>>   		.of_compatible = "ti,tps65217-charger",
>>   	},
>> +	{
>> +		.name = "tps65217-pwrbutton",
>> +		.num_resources = ARRAY_SIZE(pb_resources),
>> +		.resources = pb_resources,
>> +		.of_compatible = "ti,tps65217-pwrbutton",
>> +	},
>>   };
>>
>>   static irqreturn_t tps65217_irq_thread(int irq, void *data)
>
Lee Jones April 11, 2016, 10:37 a.m. UTC | #3
On Mon, 11 Apr 2016, Grygorii Strashko wrote:

> On 04/11/2016 12:44 PM, Lee Jones wrote:
> >On Mon, 04 Apr 2016, Marcin Niestroj wrote:
> >
> >>Add tps65217 power buttor subdevice with assigned IRQ resources.
> >>
> >>Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
> >>---
> >>  drivers/mfd/tps65217.c | 10 ++++++++++
> >>  1 file changed, 10 insertions(+)
> >
> >Applied, thanks.
> 
> Seems there is dependency from patch 1 :(

What is the dependency?

> >>diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
> >>index a20980f..fd3b5d8 100644
> >>--- a/drivers/mfd/tps65217.c
> >>+++ b/drivers/mfd/tps65217.c
> >>@@ -38,6 +38,10 @@ static struct resource charger_resources[] = {
> >>  	DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_USB, "USB"),
> >>  };
> >>
> >>+static struct resource pb_resources[] = {
> >>+	DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_PB, "PB"),
> >>+};
> >>+
> >>  struct tps65217_irq {
> >>  	int mask;
> >>  	int interrupt;
> >>@@ -122,6 +126,12 @@ static struct mfd_cell tps65217s[] = {
> >>  		.resources = charger_resources,
> >>  		.of_compatible = "ti,tps65217-charger",
> >>  	},
> >>+	{
> >>+		.name = "tps65217-pwrbutton",
> >>+		.num_resources = ARRAY_SIZE(pb_resources),
> >>+		.resources = pb_resources,
> >>+		.of_compatible = "ti,tps65217-pwrbutton",
> >>+	},
> >>  };
> >>
> >>  static irqreturn_t tps65217_irq_thread(int irq, void *data)
> >
> 
>
Grygorii Strashko April 11, 2016, 11:05 a.m. UTC | #4
On 04/11/2016 01:37 PM, Lee Jones wrote:
> On Mon, 11 Apr 2016, Grygorii Strashko wrote:
>
>> On 04/11/2016 12:44 PM, Lee Jones wrote:
>>> On Mon, 04 Apr 2016, Marcin Niestroj wrote:
>>>
>>>> Add tps65217 power buttor subdevice with assigned IRQ resources.
>>>>
>>>> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
>>>> ---
>>>>   drivers/mfd/tps65217.c | 10 ++++++++++
>>>>   1 file changed, 10 insertions(+)
>>>
>>> Applied, thanks.
>>
>> Seems there is dependency from patch 1 :(
>
> What is the dependency?

TPS65217_IRQ_PB definition added in patch 1.

>
>>>> diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
>>>> index a20980f..fd3b5d8 100644
>>>> --- a/drivers/mfd/tps65217.c
>>>> +++ b/drivers/mfd/tps65217.c
>>>> @@ -38,6 +38,10 @@ static struct resource charger_resources[] = {
>>>>   	DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_USB, "USB"),
>>>>   };
>>>>
>>>> +static struct resource pb_resources[] = {
>>>> +	DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_PB, "PB"),
>>>> +};
>>>> +
>>>>   struct tps65217_irq {
>>>>   	int mask;
>>>>   	int interrupt;
>>>> @@ -122,6 +126,12 @@ static struct mfd_cell tps65217s[] = {
>>>>   		.resources = charger_resources,
>>>>   		.of_compatible = "ti,tps65217-charger",
>>>>   	},
>>>> +	{
>>>> +		.name = "tps65217-pwrbutton",
>>>> +		.num_resources = ARRAY_SIZE(pb_resources),
>>>> +		.resources = pb_resources,
>>>> +		.of_compatible = "ti,tps65217-pwrbutton",
>>>> +	},
>>>>   };
>>>>
>>>>   static irqreturn_t tps65217_irq_thread(int irq, void *data)
>>>
>>
>>
>
Lee Jones April 11, 2016, 12:35 p.m. UTC | #5
On Mon, 11 Apr 2016, Grygorii Strashko wrote:

> On 04/11/2016 01:37 PM, Lee Jones wrote:
> >On Mon, 11 Apr 2016, Grygorii Strashko wrote:
> >
> >>On 04/11/2016 12:44 PM, Lee Jones wrote:
> >>>On Mon, 04 Apr 2016, Marcin Niestroj wrote:
> >>>
> >>>>Add tps65217 power buttor subdevice with assigned IRQ resources.
> >>>>
> >>>>Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
> >>>>---
> >>>>  drivers/mfd/tps65217.c | 10 ++++++++++
> >>>>  1 file changed, 10 insertions(+)
> >>>
> >>>Applied, thanks.
> >>
> >>Seems there is dependency from patch 1 :(
> >
> >What is the dependency?
> 
> TPS65217_IRQ_PB definition added in patch 1.

Very well.  Unappiled.
> >>>>diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
> >>>>index a20980f..fd3b5d8 100644
> >>>>--- a/drivers/mfd/tps65217.c
> >>>>+++ b/drivers/mfd/tps65217.c
> >>>>@@ -38,6 +38,10 @@ static struct resource charger_resources[] = {
> >>>>  	DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_USB, "USB"),
> >>>>  };
> >>>>
> >>>>+static struct resource pb_resources[] = {
> >>>>+	DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_PB, "PB"),
> >>>>+};
> >>>>+
> >>>>  struct tps65217_irq {
> >>>>  	int mask;
> >>>>  	int interrupt;
> >>>>@@ -122,6 +126,12 @@ static struct mfd_cell tps65217s[] = {
> >>>>  		.resources = charger_resources,
> >>>>  		.of_compatible = "ti,tps65217-charger",
> >>>>  	},
> >>>>+	{
> >>>>+		.name = "tps65217-pwrbutton",
> >>>>+		.num_resources = ARRAY_SIZE(pb_resources),
> >>>>+		.resources = pb_resources,
> >>>>+		.of_compatible = "ti,tps65217-pwrbutton",
> >>>>+	},
> >>>>  };
> >>>>
> >>>>  static irqreturn_t tps65217_irq_thread(int irq, void *data)
> >>>
> >>
> >>
> >
> 
>
diff mbox

Patch

diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
index a20980f..fd3b5d8 100644
--- a/drivers/mfd/tps65217.c
+++ b/drivers/mfd/tps65217.c
@@ -38,6 +38,10 @@  static struct resource charger_resources[] = {
 	DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_USB, "USB"),
 };
 
+static struct resource pb_resources[] = {
+	DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_PB, "PB"),
+};
+
 struct tps65217_irq {
 	int mask;
 	int interrupt;
@@ -122,6 +126,12 @@  static struct mfd_cell tps65217s[] = {
 		.resources = charger_resources,
 		.of_compatible = "ti,tps65217-charger",
 	},
+	{
+		.name = "tps65217-pwrbutton",
+		.num_resources = ARRAY_SIZE(pb_resources),
+		.resources = pb_resources,
+		.of_compatible = "ti,tps65217-pwrbutton",
+	},
 };
 
 static irqreturn_t tps65217_irq_thread(int irq, void *data)