lkml.org 
[lkml]   [2010]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/4] da850-evm: add baseboard UI expander buttons, switches and LEDs
Hi Ben,

On Fri, Nov 19, 2010 at 10:40:50AM -0500, Ben Gardiner wrote:
>
> >> +
> >> +static struct gpio_keys_platform_data user_sw_gpio_key_platform_data = {
> >> +     .buttons = user_sw_gpio_keys,
> >> +     .nbuttons = ARRAY_SIZE(user_sw_gpio_keys),
> >> +     .rep = 0, /* disable auto-repeat */
> >> +     .poll_interval = DA850_SW_POLL_MS,
> >> +};
> >
> > I wonder if we really have create to separate platform data
> > for switches and push buttons. If it is only the debounce period
> > that is different, it can be handled by initializing that field
> > differently.
>
> I see. Good idea; we can declare an array of gpio_keys_platform_data.
>
> Note; it is the polling interval which differs, not the debounce interval.

Another question is why do you want to poll the same device at
different intervals? The processor is already woken up so it makes sense
to do as much as possible instead of going to sleep. In your case
200/700 for every 1400ms interval you wake an extra time to poll
switches so unless polling switches takes very long time it is better to
combine them together (and into one input device, probably).
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-11-19 18:05    [from the cache]
©2003-2011 Jasper Spaans