Re: [PATCH] gpio: export 'debounce' attribute if supported by the gpio chip

2012-12-13 Thread Guenter Roeck
On Mon, Dec 10, 2012 at 11:37:35AM -0800, anish singh wrote: > On Mon, Dec 10, 2012 at 10:48 AM, Guenter Roeck > wrote: > > On Mon, Dec 10, 2012 at 11:04:09AM +0100, Linus Walleij wrote: > >> On Fri, Dec 7, 2012 at 5:49 PM, Alan Cox wrote: > >> > >> >> I could imagine declaring the activity reque

Re: [PATCH] gpio: export 'debounce' attribute if supported by the gpio chip

2012-12-10 Thread anish singh
On Mon, Dec 10, 2012 at 10:48 AM, Guenter Roeck wrote: > On Mon, Dec 10, 2012 at 11:04:09AM +0100, Linus Walleij wrote: >> On Fri, Dec 7, 2012 at 5:49 PM, Alan Cox wrote: >> >> >> I could imagine declaring the activity request buttons to be "input", but >> >> for >> >> presence detects it is a b

Re: [PATCH] gpio: export 'debounce' attribute if supported by the gpio chip

2012-12-10 Thread Guenter Roeck
On Mon, Dec 10, 2012 at 11:04:09AM +0100, Linus Walleij wrote: > On Fri, Dec 7, 2012 at 5:49 PM, Alan Cox wrote: > > >> I could imagine declaring the activity request buttons to be "input", but > >> for > >> presence detects it is a bit far fetched and would add too much complexity. > > > > Andr

Re: [PATCH] gpio: export 'debounce' attribute if supported by the gpio chip

2012-12-10 Thread Linus Walleij
On Sun, Dec 9, 2012 at 6:07 PM, Guenter Roeck wrote: > The gpio pins I am dealing with are provided by an FPGA which is used on > various > boards. While the gpio access registers are always the same, the actual usage > is > board specific. This means I either need to write ugly code, or use th

Re: [PATCH] gpio: export 'debounce' attribute if supported by the gpio chip

2012-12-10 Thread Linus Walleij
On Fri, Dec 7, 2012 at 5:49 PM, Alan Cox wrote: >> I could imagine declaring the activity request buttons to be "input", but for >> presence detects it is a bit far fetched and would add too much complexity. > > Android tries to address this with its switch class driver, but I'm not > sure its ac

Re: [PATCH] gpio: export 'debounce' attribute if supported by the gpio chip

2012-12-09 Thread Grant Likely
On Sun, Dec 9, 2012 at 5:07 PM, Guenter Roeck wrote: > On Sun, Dec 09, 2012 at 11:03:19AM +, Alan Cox wrote: >> On Sun, 09 Dec 2012 01:58:19 -0800 >> anish kumar wrote: >> >> > On Fri, 2012-12-07 at 16:49 +, Alan Cox wrote: >> > > > I could imagine declaring the activity request buttons t

Re: [PATCH] gpio: export 'debounce' attribute if supported by the gpio chip

2012-12-09 Thread Guenter Roeck
On Sun, Dec 09, 2012 at 11:03:19AM +, Alan Cox wrote: > On Sun, 09 Dec 2012 01:58:19 -0800 > anish kumar wrote: > > > On Fri, 2012-12-07 at 16:49 +, Alan Cox wrote: > > > > I could imagine declaring the activity request buttons to be "input", > > > > but for > > > > presence detects it i

Re: [PATCH] gpio: export 'debounce' attribute if supported by the gpio chip

2012-12-09 Thread Alan Cox
On Sun, 09 Dec 2012 01:58:19 -0800 anish kumar wrote: > On Fri, 2012-12-07 at 16:49 +, Alan Cox wrote: > > > I could imagine declaring the activity request buttons to be "input", but > > > for > > > presence detects it is a bit far fetched and would add too much > > > complexity. > > > > A

Re: [PATCH] gpio: export 'debounce' attribute if supported by the gpio chip

2012-12-09 Thread anish kumar
On Fri, 2012-12-07 at 16:49 +, Alan Cox wrote: > > I could imagine declaring the activity request buttons to be "input", but > > for > > presence detects it is a bit far fetched and would add too much complexity. > > Android tries to address this with its switch class driver, but I'm not > su

Re: [PATCH] gpio: export 'debounce' attribute if supported by the gpio chip

2012-12-07 Thread Alan Cox
> I could imagine declaring the activity request buttons to be "input", but for > presence detects it is a bit far fetched and would add too much complexity. Android tries to address this with its switch class driver, but I'm not sure its actually got anything over making them input devices. Alan

Re: [PATCH] gpio: export 'debounce' attribute if supported by the gpio chip

2012-12-07 Thread Guenter Roeck
On Fri, Dec 07, 2012 at 06:59:55AM -0800, Guenter Roeck wrote: > On Fri, Dec 07, 2012 at 09:07:28AM +0100, Linus Walleij wrote: > > On Thu, Dec 6, 2012 at 7:32 AM, Guenter Roeck wrote: > > > > > Create a 'debounce' attribute if debounce is supported by the gpio > > > chip and a gpio pin is export

Re: [PATCH] gpio: export 'debounce' attribute if supported by the gpio chip

2012-12-07 Thread Guenter Roeck
On Fri, Dec 07, 2012 at 09:07:28AM +0100, Linus Walleij wrote: > On Thu, Dec 6, 2012 at 7:32 AM, Guenter Roeck wrote: > > > Create a 'debounce' attribute if debounce is supported by the gpio > > chip and a gpio pin is exported. > > > > Signed-off-by: Guenter Roeck > > Can you describe the useca

Re: [PATCH] gpio: export 'debounce' attribute if supported by the gpio chip

2012-12-07 Thread Linus Walleij
On Thu, Dec 6, 2012 at 7:32 AM, Guenter Roeck wrote: > Create a 'debounce' attribute if debounce is supported by the gpio > chip and a gpio pin is exported. > > Signed-off-by: Guenter Roeck Can you describe the usecase for this? I have this problem when working as a back-up GPIO maintainer tha