linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	lkml <linux-kernel@vger.kernel.org>, Andrew Lunn <andrew@lunn.ch>,
	Prashant Gaikwad <pgaikwad@nvidia.com>,
	Heiko Stuebner <heiko@sntech.de>, Peter Chen <Peter.Chen@nxp.com>,
	DRI <dri-devel@lists.freedesktop.org>,
	Marc Dietrich <marvin24@gmx.de>, Rakesh Iyer <riyer@nvidia.com>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-clk <linux-clk@vger.kernel.org>,
	Wim Van Sebroeck <wim@iguana.be>,
	Wolfram Sang <wsa@the-dreams.de>,
	Xinliang Liu <z.liuxinliang@hisilicon.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	Jiri Slaby <jslaby@suse.com>,
	Michael Turquette <mturquette@baylibre.com>Guenter Roeck <li>
Subject: Re: [PATCH 000/102] Convert drivers to explicit reset API
Date: Mon, 24 Jul 2017 10:33:41 +0200	[thread overview]
Message-ID: <1500885221.2391.50.camel@pengutronix.de> (raw)
In-Reply-To: <CACRpkdaXOv7mX+b-q1K34CB5w0SWPXCKa21wHaxL7qjf91PJXQ@mail.gmail.com>

On Sun, 2017-07-23 at 20:41 +0200, Linus Walleij wrote:
> On Thu, Jul 20, 2017 at 10:46 PM, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> > On Thu, Jul 20, 2017 at 5:55 AM, Philipp Zabel <p.zabel@pengutronix.de> wrote:
> 
> >>> What about reset_control_get(struct device *, const char *, int flags)
> >>> to replace all those variants ?
> >>
> >> While I like how this looks, unfortunately (devm_)reset_control_get
> >> already exists without the flags, so we can't change to that with a
> >> gentle transition.
> >
> > This was done for gpiod_get() and its flags argument with horrifying
> > #define-ry, which thankfully was completely hidden from users.
> 
> For your reference:
> 
> commit bae48da237fcedd7ad09569025483b988635efb7
> "gpiolib: add gpiod_get() and gpiod_put() functions"
> 
> commit 39b2bbe3d715cf5013b5c48695ccdd25bd3bf120
> "gpio: add flags argument to gpiod_get*() functions"
> 
> commit 0dbc8b7afef6e4fddcfebcbacbeb269a0a3b06d5
> "gpio: move varargs hack outside #ifdef GPIOLIB"
> 
> commit b17d1bf16cc72a374a48d748940f700009d40ff4
> "gpio: make flags mandatory for gpiod_get functions"
> 
> Retrospectively ... was that really a good idea... it was a LOT
> of trouble to add a flag, maybe it had been better to try and
> just slam all users in a single go.
> 
> But it worked.

Thanks for the hint and the references. It seems this turned out okay,
but I wouldn't dare to introduce such macro horror^Wmagic.
I'd rather have all users converted to the _exclusive/_shared function
calls and maybe then replace the internal __reset_control_get with
Thomas' suggestion.

regards
Philipp

  reply	other threads:[~2017-07-24  8:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-19 15:25 [PATCH 000/102] Convert drivers to explicit reset API Philipp Zabel
2017-07-19 15:26 ` [PATCH 066/102] pinctrl: stm32: explicitly request exclusive reset control Philipp Zabel
2017-08-02 11:43   ` Linus Walleij
2017-07-19 15:26 ` [PATCH 067/102] pinctrl: sunxi: " Philipp Zabel
2017-08-02 11:44   ` Linus Walleij
2017-07-19 15:26 ` [PATCH 068/102] pinctrl: tegra: " Philipp Zabel
     [not found]   ` <20170719152646.25903-69-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2017-08-02 11:45     ` Linus Walleij
     [not found] ` <20170719152646.25903-1-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2017-07-19 19:15   ` [PATCH 000/102] Convert drivers to explicit reset API Thomas Petazzoni
2017-07-20  9:36     ` Philipp Zabel
     [not found]       ` <1500543415.2354.37.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2017-07-20 10:36         ` Thomas Petazzoni
2017-07-20 12:55           ` Philipp Zabel
2017-07-20 20:46             ` Dmitry Torokhov
2017-07-23 18:41               ` Linus Walleij
2017-07-24  8:33                 ` Philipp Zabel [this message]
     [not found]                   ` <1500885221.2391.50.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2017-08-12 11:43                     ` Wolfram Sang
2017-08-14  7:36                       ` Philipp Zabel
2017-07-20  6:56   ` Maxime Ripard
2017-07-20  8:11   ` Greg Kroah-Hartman
2017-07-20  9:24     ` Philipp Zabel
2017-07-20 20:36 ` (no subject) Heiko Stuebner

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=1500885221.2391.50.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=Peter.Chen@nxp.com \
    --cc=andrew@lunn.ch \
    --cc=cw00.choi@samsung.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=jslaby@suse.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marvin24@gmx.de \
    --cc=mturquette@baylibre.com \
    --cc=pgaikwad@nvidia.com \
    --cc=pmeerw@pmeerw.net \
    --cc=riyer@nvidia.com \
    --cc=stern@rowland.harvard.edu \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=wim@iguana.be \
    --cc=wsa@the-dreams.de \
    --cc=z.liuxinliang@hisilicon.com \
    /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).