From: Linus Walleij Subject: Re: [PATCH 000/102] Convert drivers to explicit reset API Date: Sun, 23 Jul 2017 20:41:48 +0200 Message-ID: References: <20170719152646.25903-1-p.zabel@pengutronix.de> <20170719211515.46a1196c@windsurf> <1500543415.2354.37.camel@pengutronix.de> <20170720123640.43c2ce01@windsurf> <1500555312.2354.75.camel@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Philipp Zabel , Thomas Petazzoni , lkml , Andrew Lunn , Prashant Gaikwad , Heiko Stuebner , Peter Chen , DRI , Marc Dietrich , Rakesh Iyer , Peter Meerwald-Stadler , linux-clk , Wim Van Sebroeck , Wolfram Sang , Xinliang Liu , Chanwoo Choi , Alan Stern , Jiri Slaby , Michael Turquette , Guenter Roeck Return-path: In-Reply-To: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: List-Id: linux-crypto.vger.kernel.org On Thu, Jul 20, 2017 at 10:46 PM, Dmitry Torokhov wrote: > On Thu, Jul 20, 2017 at 5:55 AM, Philipp Zabel 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. Yours, Linus Walleij