[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101119170232.GB6236@core.coreip.homeip.net>
Date: Fri, 19 Nov 2010 09:02:32 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Ben Gardiner <bengardiner@...ometrics.ca>
Cc: "Nori, Sekhar" <nsekhar@...com>,
Kevin Hilman <khilman@...prootsystems.com>,
"davinci-linux-open-source@...ux.davincidsp.com"
<davinci-linux-open-source@...ux.davincidsp.com>,
"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
"Govindarajan, Sriramakrishnan" <srk@...com>,
Paul Mundt <lethal@...ux-sh.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Alexander Clouter <alex@...riz.org.uk>,
Chris Cordahi <christophercordahi@...ometrics.ca>
Subject: Re: [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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists