Re: [PATCH] genirq: provide dummy set_irq_wake()

2015-04-15 Thread Gregory CLEMENT
Hi Roger,

On 15/04/2015 10:07, Roger Quadros wrote:
> Hi Gregory,
> 
> On 14/04/15 17:02, Gregory CLEMENT wrote:
>> Hi Roger,
>>
>> On 14/04/2015 12:13, Roger Quadros wrote:
>>> Hi Thomas,
>>>
>>> On 30/03/15 16:15, Roger Quadros wrote:
 Without this system suspend is broken on systems that have
 drivers calling enable/disable_irq_wake() for interrupts based off
 the dummy irq hook.
 (e.g. drivers/gpio/gpio-pcf857x.c)

 http://article.gmane.org/gmane.linux.kernel/1879035

 Signed-off-by: Roger Quadros 
>>>
>>> Any comments on this patch?
>>
>> I read the url you pointed and I wonder why, at then end, did
>> you choose to add a dummy set_irq_wake() instead of using
>> IRQCHIP_SKIP_SET_WAKE ?
> 
> You mean like this?
> 
> diff --git a/kernel/irq/dummychip.c b/kernel/irq/dummychip.c
> index 988dc58..2feb6fe 100644
> --- a/kernel/irq/dummychip.c
> +++ b/kernel/irq/dummychip.c
> @@ -57,5 +57,6 @@ struct irq_chip dummy_irq_chip = {
>   .irq_ack= noop,
>   .irq_mask   = noop,
>   .irq_unmask = noop,
> + .flags  = IRQCHIP_SKIP_SET_WAKE,
>  };
>  EXPORT_SYMBOL_GPL(dummy_irq_chip);


Yes exactly.

> 
> This works as well and is better. I'll post a v2.


Thanks,

Gregory

> 
> cheers,
> -roger
> 
>>>
 ---
  kernel/irq/dummychip.c | 6 ++
  1 file changed, 6 insertions(+)

 diff --git a/kernel/irq/dummychip.c b/kernel/irq/dummychip.c
 index 988dc58..2405d7a 100644
 --- a/kernel/irq/dummychip.c
 +++ b/kernel/irq/dummychip.c
 @@ -32,6 +32,11 @@ static unsigned int noop_ret(struct irq_data *data)
return 0;
  }
  
 +static int noop_int_ret(struct irq_data *data, unsigned int val)
 +{
 +  return 0;
 +}
 +
  /*
   * Generic no controller implementation
   */
 @@ -57,5 +62,6 @@ struct irq_chip dummy_irq_chip = {
.irq_ack= noop,
.irq_mask   = noop,
.irq_unmask = noop,
 +  .irq_set_wake   = noop_int_ret,
  };
  EXPORT_SYMBOL_GPL(dummy_irq_chip);

>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
>>> the body of a message to majord...@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>
>>
> 


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] genirq: provide dummy set_irq_wake()

2015-04-15 Thread Roger Quadros
Hi Gregory,

On 14/04/15 17:02, Gregory CLEMENT wrote:
> Hi Roger,
> 
> On 14/04/2015 12:13, Roger Quadros wrote:
>> Hi Thomas,
>>
>> On 30/03/15 16:15, Roger Quadros wrote:
>>> Without this system suspend is broken on systems that have
>>> drivers calling enable/disable_irq_wake() for interrupts based off
>>> the dummy irq hook.
>>> (e.g. drivers/gpio/gpio-pcf857x.c)
>>>
>>> http://article.gmane.org/gmane.linux.kernel/1879035
>>>
>>> Signed-off-by: Roger Quadros 
>>
>> Any comments on this patch?
> 
> I read the url you pointed and I wonder why, at then end, did
> you choose to add a dummy set_irq_wake() instead of using
> IRQCHIP_SKIP_SET_WAKE ?

You mean like this?

diff --git a/kernel/irq/dummychip.c b/kernel/irq/dummychip.c
index 988dc58..2feb6fe 100644
--- a/kernel/irq/dummychip.c
+++ b/kernel/irq/dummychip.c
@@ -57,5 +57,6 @@ struct irq_chip dummy_irq_chip = {
.irq_ack= noop,
.irq_mask   = noop,
.irq_unmask = noop,
+   .flags  = IRQCHIP_SKIP_SET_WAKE,
 };
 EXPORT_SYMBOL_GPL(dummy_irq_chip);

This works as well and is better. I'll post a v2.

cheers,
-roger

>>
>>> ---
>>>  kernel/irq/dummychip.c | 6 ++
>>>  1 file changed, 6 insertions(+)
>>>
>>> diff --git a/kernel/irq/dummychip.c b/kernel/irq/dummychip.c
>>> index 988dc58..2405d7a 100644
>>> --- a/kernel/irq/dummychip.c
>>> +++ b/kernel/irq/dummychip.c
>>> @@ -32,6 +32,11 @@ static unsigned int noop_ret(struct irq_data *data)
>>> return 0;
>>>  }
>>>  
>>> +static int noop_int_ret(struct irq_data *data, unsigned int val)
>>> +{
>>> +   return 0;
>>> +}
>>> +
>>>  /*
>>>   * Generic no controller implementation
>>>   */
>>> @@ -57,5 +62,6 @@ struct irq_chip dummy_irq_chip = {
>>> .irq_ack= noop,
>>> .irq_mask   = noop,
>>> .irq_unmask = noop,
>>> +   .irq_set_wake   = noop_int_ret,
>>>  };
>>>  EXPORT_SYMBOL_GPL(dummy_irq_chip);
>>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
>> the body of a message to majord...@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] genirq: provide dummy set_irq_wake()

2015-04-14 Thread Gregory CLEMENT
Hi Roger,

On 14/04/2015 12:13, Roger Quadros wrote:
> Hi Thomas,
> 
> On 30/03/15 16:15, Roger Quadros wrote:
>> Without this system suspend is broken on systems that have
>> drivers calling enable/disable_irq_wake() for interrupts based off
>> the dummy irq hook.
>> (e.g. drivers/gpio/gpio-pcf857x.c)
>>
>> http://article.gmane.org/gmane.linux.kernel/1879035
>>
>> Signed-off-by: Roger Quadros 
> 
> Any comments on this patch?

I read the url you pointed and I wonder why, at then end, did
you choose to add a dummy set_irq_wake() instead of using
IRQCHIP_SKIP_SET_WAKE ?

Thanks,

Gregory


> 
> cheers,
> -roger
> 
>> ---
>>  kernel/irq/dummychip.c | 6 ++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/kernel/irq/dummychip.c b/kernel/irq/dummychip.c
>> index 988dc58..2405d7a 100644
>> --- a/kernel/irq/dummychip.c
>> +++ b/kernel/irq/dummychip.c
>> @@ -32,6 +32,11 @@ static unsigned int noop_ret(struct irq_data *data)
>>  return 0;
>>  }
>>  
>> +static int noop_int_ret(struct irq_data *data, unsigned int val)
>> +{
>> +return 0;
>> +}
>> +
>>  /*
>>   * Generic no controller implementation
>>   */
>> @@ -57,5 +62,6 @@ struct irq_chip dummy_irq_chip = {
>>  .irq_ack= noop,
>>  .irq_mask   = noop,
>>  .irq_unmask = noop,
>> +.irq_set_wake   = noop_int_ret,
>>  };
>>  EXPORT_SYMBOL_GPL(dummy_irq_chip);
>>
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] genirq: provide dummy set_irq_wake()

2015-04-14 Thread Roger Quadros
Hi Thomas,

On 30/03/15 16:15, Roger Quadros wrote:
> Without this system suspend is broken on systems that have
> drivers calling enable/disable_irq_wake() for interrupts based off
> the dummy irq hook.
> (e.g. drivers/gpio/gpio-pcf857x.c)
> 
> http://article.gmane.org/gmane.linux.kernel/1879035
> 
> Signed-off-by: Roger Quadros 

Any comments on this patch?

cheers,
-roger

> ---
>  kernel/irq/dummychip.c | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/kernel/irq/dummychip.c b/kernel/irq/dummychip.c
> index 988dc58..2405d7a 100644
> --- a/kernel/irq/dummychip.c
> +++ b/kernel/irq/dummychip.c
> @@ -32,6 +32,11 @@ static unsigned int noop_ret(struct irq_data *data)
>   return 0;
>  }
>  
> +static int noop_int_ret(struct irq_data *data, unsigned int val)
> +{
> + return 0;
> +}
> +
>  /*
>   * Generic no controller implementation
>   */
> @@ -57,5 +62,6 @@ struct irq_chip dummy_irq_chip = {
>   .irq_ack= noop,
>   .irq_mask   = noop,
>   .irq_unmask = noop,
> + .irq_set_wake   = noop_int_ret,
>  };
>  EXPORT_SYMBOL_GPL(dummy_irq_chip);
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] genirq: provide dummy set_irq_wake()

2015-03-30 Thread Felipe Balbi
On Mon, Mar 30, 2015 at 01:06:24PM -0500, Felipe Balbi wrote:
> On Mon, Mar 30, 2015 at 04:15:45PM +0300, Roger Quadros wrote:
> > Without this system suspend is broken on systems that have
> > drivers calling enable/disable_irq_wake() for interrupts based off
> > the dummy irq hook.
> > (e.g. drivers/gpio/gpio-pcf857x.c)
> > 
> > http://article.gmane.org/gmane.linux.kernel/1879035
> > 
> > Signed-off-by: Roger Quadros 
> > ---
> >  kernel/irq/dummychip.c | 6 ++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/kernel/irq/dummychip.c b/kernel/irq/dummychip.c
> > index 988dc58..2405d7a 100644
> > --- a/kernel/irq/dummychip.c
> > +++ b/kernel/irq/dummychip.c
> > @@ -32,6 +32,11 @@ static unsigned int noop_ret(struct irq_data *data)
> > return 0;
> >  }
> >  
> > +static int noop_int_ret(struct irq_data *data, unsigned int val)
> > +{
> > +   return 0;
> > +}
> > +
> 
> isn't this the same as noop_ret ?

oh no, unsigned versus signed.

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH] genirq: provide dummy set_irq_wake()

2015-03-30 Thread Felipe Balbi
On Mon, Mar 30, 2015 at 04:15:45PM +0300, Roger Quadros wrote:
> Without this system suspend is broken on systems that have
> drivers calling enable/disable_irq_wake() for interrupts based off
> the dummy irq hook.
> (e.g. drivers/gpio/gpio-pcf857x.c)
> 
> http://article.gmane.org/gmane.linux.kernel/1879035
> 
> Signed-off-by: Roger Quadros 
> ---
>  kernel/irq/dummychip.c | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/kernel/irq/dummychip.c b/kernel/irq/dummychip.c
> index 988dc58..2405d7a 100644
> --- a/kernel/irq/dummychip.c
> +++ b/kernel/irq/dummychip.c
> @@ -32,6 +32,11 @@ static unsigned int noop_ret(struct irq_data *data)
>   return 0;
>  }
>  
> +static int noop_int_ret(struct irq_data *data, unsigned int val)
> +{
> + return 0;
> +}
> +

isn't this the same as noop_ret ?

-- 
balbi


signature.asc
Description: Digital signature


[PATCH] genirq: provide dummy set_irq_wake()

2015-03-30 Thread Roger Quadros
Without this system suspend is broken on systems that have
drivers calling enable/disable_irq_wake() for interrupts based off
the dummy irq hook.
(e.g. drivers/gpio/gpio-pcf857x.c)

http://article.gmane.org/gmane.linux.kernel/1879035

Signed-off-by: Roger Quadros 
---
 kernel/irq/dummychip.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/kernel/irq/dummychip.c b/kernel/irq/dummychip.c
index 988dc58..2405d7a 100644
--- a/kernel/irq/dummychip.c
+++ b/kernel/irq/dummychip.c
@@ -32,6 +32,11 @@ static unsigned int noop_ret(struct irq_data *data)
return 0;
 }
 
+static int noop_int_ret(struct irq_data *data, unsigned int val)
+{
+   return 0;
+}
+
 /*
  * Generic no controller implementation
  */
@@ -57,5 +62,6 @@ struct irq_chip dummy_irq_chip = {
.irq_ack= noop,
.irq_mask   = noop,
.irq_unmask = noop,
+   .irq_set_wake   = noop_int_ret,
 };
 EXPORT_SYMBOL_GPL(dummy_irq_chip);
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html