Re: [PATCH 5/6] mc13783: add power button support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le vendredi 22 juillet 2011 03:07:11, Wanlong Gao a écrit :
> On 07/22/2011 02:04 AM, Philippe Rétornaz wrote:
> > This adds support for the power-on buttons of MC13783 PMIC.
> > This is done using a misc input device.
> > 
> > Signed-off-by: Philippe Rétornaz<philippe.retornaz@xxxxxxx>
> > ---
> > 
> >   drivers/input/misc/Kconfig             |   10 +
> >   drivers/input/misc/Makefile            |    1 +
> >   drivers/input/misc/mc13783-pwrbutton.c |  288
> >   ++++++++++++++++++++++++++++++++ drivers/mfd/mc13xxx-core.c           
> >    |    4 +
> >   include/linux/mfd/mc13783.h            |    1 +
> >   include/linux/mfd/mc13xxx.h            |   17 ++
> >   6 files changed, 321 insertions(+), 0 deletions(-)
> >   create mode 100644 drivers/input/misc/mc13783-pwrbutton.c
> > 
> > diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
> > index 45dc6aa..4272658 100644
> > --- a/drivers/input/misc/Kconfig
> > +++ b/drivers/input/misc/Kconfig
> > @@ -100,6 +100,16 @@ config INPUT_MAX8925_ONKEY
> > 
> >   	  To compile this driver as a module, choose M here: the module
> >   	  will be called max8925_onkey.
> > 
> > +struct mc13783_pwrb {
> > +	struct input_dev *pwr;
> > +	struct mc13xxx *mc13783;
> > +#define MC13783_PWRB_B1_POL_INVERT	(1<<  0)
> > +#define MC13783_PWRB_B2_POL_INVERT	(1<<  1)
> > +#define MC13783_PWRB_B3_POL_INVERT	(1<<  2)
> > +	int flags;
> > +	unsigned short keymap[3];
> 
> It seems like you just use the keymap[0]?

No, keymap[0] is for button 0, keymap[1] if for button 1 and keymap[2] is for 
button 3. The _probe() function wrongly initialized the two last button. I 
will fix this in the next patch.

Thanks for spotting this.

Regards,

Philippe

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux