linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-wireless@vger.kernel.org,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Wolfram Sang <wsa@the-dreams.de>, Takashi Iwai <tiwai@suse.de>,
	linux-mmc@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Chris Ball <chris@printf.net>,
	dri-devel@lists.freedesktop.org,
	Liam Girdwood <lgirdwood@gmail.com>,
	Peter Ujfalusi <peter.ujfalusi@ti.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Pavel Machek <pavel@ucw.cz>, Jiri Slaby <jslaby@suse.cz>,
	gnurou@gmail.com, Florian Fainelli <f.fainelli@gmail.com>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Alexander Shiyan <shc_work@mail.ru>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	Jingoo Han <jg1.han@samsung.com>,
	Paul Handrigan <Paul.Handrigan@cirrus.com>,
	linux-iio@vger.kernel.org, linux-omap@vger.kernel.org,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Hans Verkuil <hans.verkuil@ci>
Subject: Re: [PATCH] gpio: extend gpiod_get*() with flags parameter
Date: Fri, 25 Jul 2014 07:52:50 +0100	[thread overview]
Message-ID: <20140725065250.GF7063@lee--X1> (raw)
In-Reply-To: <20140724161052.GA15615@kroah.com>

On Thu, 24 Jul 2014, Greg Kroah-Hartman wrote:

> On Fri, Jul 25, 2014 at 12:04:58AM +0900, Alexandre Courbot wrote:
> > The huge majority of GPIOs have their direction and initial value set
> > right after being obtained by one of the gpiod_get() functions. The
> > integer GPIO API had gpio_request_one() that took a convenience flags
> > parameter allowing to specify an direction and value applied to the
> > returned GPIO. This feature greatly simplifies client code and ensures
> > errors are always handled properly.
> > 
> > A similar feature has been requested for the gpiod API. Since GPIOs need
> > a direction to be used anyway, we prefer to extend the existing
> > functions instead of introducing new functions that would raise the
> > number of gpiod getters to 16 (!).
> > 
> > The drawback of this approach is that all gpiod clients need to be
> > updated, but there aren't that many and the moment and this results in
> > smaller (and hopefully safer) code.
> > 
> > Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> > ---
> > This change will be difficult to apply without breaking things, but
> > let's try to do it right. Hopefully the benefit will outweight the
> > disturbance.
> > 
> > This is a patch against -next to list and update all current gpiod
> > consumers. Updates are trivial at first sight, but it would be nice to
> > get as many acks as possible from the respective subsystem maintainers.
> > 
> > I'm not sure how this could be applied harmlessly though - maybe through
> > a dedicated branch for -next? Problem is that a lot of new code is not
> > yet merged into mainline, and conflicts are very likely to occur. Linus,
> > do you have any suggestion as to how this can be done without blood being
> > spilled?
> 
> Do this in 3 steps, not all at once.
> 
> Make a new function that takes the new argument, get that merged
> 
> Submit patches that convert drivers over to use the new function.
> 
> Once all of those are merged, remove the old function.
> 
> That way there are no "flag days" needed, and everyone is happy you
> don't send out emails with 40+ people in the To: and Cc: lines :)

+99999

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2014-07-25  6:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-24 15:04 [PATCH] gpio: extend gpiod_get*() with flags parameter Alexandre Courbot
2014-07-24 16:10 ` Arnd Bergmann
2014-07-25  1:32   ` Alexandre Courbot
2014-07-24 16:10 ` Greg Kroah-Hartman
2014-07-25  6:52   ` Lee Jones [this message]
2014-07-24 16:23 ` Laurent Pinchart
2014-07-25  1:36   ` Alexandre Courbot

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=20140725065250.GF7063@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=Paul.Handrigan@cirrus.com \
    --cc=chris@printf.net \
    --cc=dbaryshkov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=f.fainelli@gmail.com \
    --cc=gnurou@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hans.verkuil@ci \
    --cc=jg1.han@samsung.com \
    --cc=jslaby@suse.cz \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=peter.ujfalusi@ti.com \
    --cc=sameo@linux.intel.com \
    --cc=shc_work@mail.ru \
    --cc=thierry.reding@gmail.com \
    --cc=tiwai@suse.de \
    --cc=tomi.valkeinen@ti.com \
    --cc=ulf.hansson@linaro.org \
    --cc=wsa@the-dreams.de \
    /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).