Re: [PATCHv3 1/2] Input: twl4030-keypad - add device tree support

From: Pavel Machek
Date: Tue Nov 19 2013 - 07:50:43 EST


Hi!

> > > DRIVER CODE DOCUMENTATION
> > > twl4030-keypad linux,input-no-autorepeat linux,keypad-no-autorepeat
> > > omap4-keypad linux,input-no-autorepeat linux,keypad-no-autorepeat
> > > samsung-keypad linux,input-no-autorepeat linux,keypad-no-autorepeat
> > > stmpe-keypad st,no-autorepeat st,no-autorepeat
> > > spear-keyboard autorepeat autorepeat
> > > tca8418-keypad keypad,autorepeat --- not documented ---
> > > gpio-matrix-keypad linux,no-autorepeat linux,no-autorepeat
> > > gpio-keys-polled autorepeat autorepeat
> > > gpio-keys autorepeat --- no documentation ---
> > >
> > > Any suggestions how to continue fixing this mess? I guess first of
> > > all the documentation of omap4-keypad, samsung-keypad and of course
> > > the new twl4030-keypad driver should be fixed.
> > >
> > > Next it would be nice to choose one standard property name for this
> > > and use it for twl4030-keypad. I suggest to use "linux,input-no-autorepeat".
> >
> > I'd suggest just simple "autorepeat", so that we get rid of ugly double-negation.
> The idea was that majority of setups want autorepeat so in the absence
> of the property autorepeat is turned on.

I see... but autorepeat on by default makes sense on devices that are
usually querty keybaords, but does not make sense on devices that are
usually phone keypads or power buttons.

So my proposal is:

1) driver decides if it makes sense to autorepeat by default or not.

2) dts says autorepeat=0 or autorepeat=1

That way, we get dts that get chance to work on other OSes, get rid of
double negations, and get right defaults when autorepeat is not
specified.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/