Re: [PATCH V2 2/2] Input: misc: introduce palmas-pwrbutton

2014-09-12 Thread Dmitry Torokhov
On Thu, Sep 11, 2014 at 07:01:19AM -0500, Nishanth Menon wrote: Hi Dimtry, On 14:13-20140910, Dmitry Torokhov wrote: On Thu, Aug 21, 2014 at 02:01:43PM -0500, Nishanth Menon wrote: On 08/21/2014 01:03 PM, Dmitry Torokhov wrote: I believe I have taken care of other concerns on v2,

[PATCH V2 2/2] Input: misc: introduce palmas-pwrbutton

2014-08-21 Thread Nishanth Menon
Many palmas family of PMICs have support for interrupt based power button. This allows the device to notify the processor of external push button events over the shared palmas interrupt. However, this event is generated only during a press operation. Software is supposed to poll(sigh!) for

Re: [PATCH V2 2/2] Input: misc: introduce palmas-pwrbutton

2014-08-21 Thread Murphy, Dan
On 08/21/2014 11:04 AM, Menon, Nishanth wrote: Many palmas family of PMICs have support for interrupt based power button. This allows the device to notify the processor of external push button events over the shared palmas interrupt. However, this event is generated only during a press

Re: [PATCH V2 2/2] Input: misc: introduce palmas-pwrbutton

2014-08-21 Thread Dmitry Torokhov
Hi Nishanth, On Thu, Aug 21, 2014 at 11:02:15AM -0500, Nishanth Menon wrote: + + ret = input_register_device(input_dev); + if (ret) { + free_irq(irq, pwron); You can not use free_irq with devm-managed resources. As I mentioned, since you need manual unwinding, I'd rather

Re: [PATCH V2 2/2] Input: misc: introduce palmas-pwrbutton

2014-08-21 Thread Nishanth Menon
On Thu, Aug 21, 2014 at 12:05 PM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: You can not use free_irq with devm-managed resources. As I mentioned, since you need manual unwinding, I'd rather you not use managed resources in the driver at all. ok. will drop all devm_ ops in the next

Re: [PATCH V2 2/2] Input: misc: introduce palmas-pwrbutton

2014-08-21 Thread Nishanth Menon
On 08/21/2014 11:59 AM, Murphy, Dan wrote: Thanks for the review. [..] +#include linux/init.h +#include linux/input.h +#include linux/interrupt.h +#include linux/kernel.h +#include linux/mfd/palmas.h +#include linux/module.h +#include linux/of.h +#include linux/platform_device.h +#include

Re: [PATCH V2 2/2] Input: misc: introduce palmas-pwrbutton

2014-08-21 Thread Nishanth Menon
On 08/21/2014 11:59 AM, Murphy, Dan wrote: [...] Ooops.. missed answering one addition statement: +of_property_read_u32(np, ti,palmas-long-press-seconds, val); Probably should check the return to make sure the value exists and that is is within an expected range. It is an optional

Re: [PATCH V2 2/2] Input: misc: introduce palmas-pwrbutton

2014-08-21 Thread Murphy, Dan
On 08/21/2014 12:19 PM, Menon, Nishanth wrote: On 08/21/2014 11:59 AM, Murphy, Dan wrote: [...] Ooops.. missed answering one addition statement: + of_property_read_u32(np, ti,palmas-long-press-seconds, val); Probably should check the return to make sure the value exists and that is is

Re: [PATCH V2 2/2] Input: misc: introduce palmas-pwrbutton

2014-08-21 Thread Nishanth Menon
On 12:32-20140821, Murphy, Dan wrote: On 08/21/2014 12:19 PM, Menon, Nishanth wrote: On 08/21/2014 11:59 AM, Murphy, Dan wrote: [...] Ooops.. missed answering one addition statement: + of_property_read_u32(np, ti,palmas-long-press-seconds, val); Probably should check the return to

Re: [PATCH V2 2/2] Input: misc: introduce palmas-pwrbutton

2014-08-21 Thread Dmitry Torokhov
On Thu, Aug 21, 2014 at 12:37:15PM -0500, Nishanth Menon wrote: On 12:32-20140821, Murphy, Dan wrote: On 08/21/2014 12:19 PM, Menon, Nishanth wrote: On 08/21/2014 11:59 AM, Murphy, Dan wrote: [...] Ooops.. missed answering one addition statement: + of_property_read_u32(np,

Re: [PATCH V2 2/2] Input: misc: introduce palmas-pwrbutton

2014-08-21 Thread Nishanth Menon
On 08/21/2014 01:03 PM, Dmitry Torokhov wrote: I believe I have taken care of other concerns on v2, but..Arrgh.. I did not reply to this comment.. BTW, I do not think you need to use of_node_get/put here, it's not going anywhere. It has been mentioned as a good practice to ensure we use