linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] mc13783: add power button support
Date: Fri, 8 Jul 2011 17:25:29 +0200	[thread overview]
Message-ID: <20110708152529.GV29624@pengutronix.de> (raw)
In-Reply-To: <201107081645.00724.philippe.retornaz@epfl.ch>

Hello Philippe,

On Fri, Jul 08, 2011 at 04:45:00PM +0200, Philippe R?tornaz wrote:
> > > +config INPUT_MC13783_ON
> > > +	tristate "MC13783 ON buttons"
> > > +	depends on MFD_MC13783
> > > +	help
> > > +	  Support the ON buttons of MC13783 PMIC as an input device
> > > +	  reporting power button status.
> > > +
> > > +	  To compile this driver as a module, choose M here: the module
> > > +	  will be called mc13783-pwrbutton.
> > 
> > Why not use INPUT_MC13783_PWRBUTTON to match the source file (and so
> > module) name.
> 
> Ok.
> 
> > 
> > > +
> > > +
> > 
> > one empty line should be enough
> 
> Ok.
> 
> > > diff --git a/drivers/input/misc/mc13783-pwrbutton.c
> > > b/drivers/input/misc/mc13783-pwrbutton.c new file mode 100644
> > > index 0000000..6aee01c
> > > --- /dev/null
> > > +++ b/drivers/input/misc/mc13783-pwrbutton.c
> > > @@ -0,0 +1,288 @@
> > > +/**
> > > + * mc13783-pwrbutton.c - MC13783 Power Button Input Driver
> > > + *
> > > + * Copyright (C) 2011 Philippe R?tornaz
> > > + *
> > > + * Based on twl4030-pwrbutton driver by:
> > > + *     Peter De Schrijver <peter.de-schrijver@nokia.com>
> > > + *     Felipe Balbi <felipe.balbi@nokia.com>
> > > + *
> > > + * This file is subject to the terms and conditions of the GNU General
> > > + * Public License. See the file "COPYING" in the main directory of this
> > > + * archive for more details.
> > 
> > This implies GPL v2 only? So you either need to clearify here or you
> > need to adapt the MODULE_LICENSE line below to read
> > 
> > 	MODULE_LICENSE("GPL v2");
> 
> Well, I took exactly the same license than the twl4030-pwrbutton. 
> This driver is: MODULE_LICENSE("GPL"), why should I change it ?
So this driver is wrong, too. According to include/linux/module.h, "GPL"
means "GNU Public License v2 or later" and "GPL v2" means "GNU Public
License v2".

> > > --- a/drivers/mfd/mc13xxx-core.c
> > > +++ b/drivers/mfd/mc13xxx-core.c
> > > 
> > > @@ -778,6 +778,10 @@ err_revision:
> > >  		mc13xxx_add_subdevice_pdata(mc13xxx, "%s-led",
> > >  		
> > >  				pdata->leds, sizeof(*pdata->leds));
> > > 
> > > +	if (pdata->flags & MC13XXX_USE_BUTTON)
> > 
> > Why not use
> > 
> > 	if (pdata->buttons)
> > 
> > to detect if the pwrbutton device should be registered?
> 
> To keep consistancy as the others sub-device are registered the same way 
> (regulator, led). I can do it as you propose for the button but IMHO it's a 
> bit strange to have a MC13XXX_USE_* for all the subdevice except the buttons. 
> So should I change ?
It would be a third patch for your commit count to convert regulator and
led, too ;-)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2011-07-08 15:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-08 14:23 [PATCH v2 0/2] mc13783: add pwr button support Philippe Rétornaz
2011-07-08 14:23 ` [PATCH 1/2] mc13783: add power " Philippe Rétornaz
2011-07-08 14:23   ` [PATCH 2/2] mx31moboard: Add MC13783 " Philippe Rétornaz
2011-07-08 14:30   ` [PATCH 1/2] mc13783: add " Uwe Kleine-König
2011-07-08 14:45     ` Philippe Rétornaz
2011-07-08 15:25       ` Uwe Kleine-König [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-05-31 19:28 [PATCH 0/2] mc13783: add pwr " Philippe Rétornaz
2010-05-31 19:28 ` [PATCH 1/2] mc13783: add power " Philippe Rétornaz
2010-06-02  7:52   ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110708152529.GV29624@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).