From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <1500885221.2391.50.camel@pengutronix.de> Subject: Re: [PATCH 000/102] Convert drivers to explicit reset API From: Philipp Zabel Date: Mon, 24 Jul 2017 10:33:41 +0200 In-Reply-To: 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> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit To: Linus Walleij Cc: Dmitry Torokhov , 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 , Ohad Ben-Cohen , "linux-pm@vger.kernel.org" , Thomas Gleixner , Vincent Abriou , Bin Liu , Greg Kroah-Hartman , USB list , linux-wireless , Ralf Baechle , linux-spi , "linux-crypto@vger.kernel.org" , Tejun Heo , "alsa-devel@alsa-project.org" , "linux-doc@vger.kernel.org" , David Airlie , nouveau@lists.freedesktop.org, Philippe Cornu , Kalle Valo , Laxman Dewangan , Corentin Labbe , Linux I2C , LINUXWATCHDOG , Boris Brezillon , Lars-Peter Clausen , Emilio =?ISO-8859-1?Q?L=F3pez?= , Daniel Lezcano , Jon Hunter , "open list:ARM/Rockchip SoC..." , MyungJoo Ham , Ben Skeggs , Yisen Zhuang , "linux-media@vger.kernel.org" , Richard Zhu , Alexandre Torgue , Mathias Nyman , "linux-arm-msm@vger.kernel.org" , Joachim Eastwood , "linux-gpio@vger.kernel.org" , "linux-mips@linux-mips.org" , Bjorn Helgaas , Giuseppe Cavallaro , "linux-arm-kernel@lists.infradead.org" , Patrice Chotard , Stanimir Varbanov , Kyungmin Park , Maxime Coquelin , Hartmut Knaack , Jonathan Cameron , Ulf Hansson , "linux-iio@vger.kernel.org" , Linux PCI , Shawn Lin , "linux-tegra@vger.kernel.org" , "linux-mtd@lists.infradead.org" , Benjamin Gaignard , Florian Fainelli , Jonathan Corbet , Xinwei Kong , ath10k@lists.infradead.org, Kishon Vijay Abraham I , Chen-Yu Tsai , "linux-input@vger.kernel.org" , "linux-pwm@vger.kernel.org" , Chen Feng , Mark Brown , Dan Williams , Felipe Balbi , Salil Mehta , linux-mmc , Liam Girdwood , Thierry Reding , Cyrille Pitchen , Srinivas Kandagatla , Maxime Ripard , Brian Norris , "David S. Miller" , linux-remoteproc@vger.kernel.org, Bjorn Andersson , "linux-ide@vger.kernel.org" , Lee Jones , "devel@driverdev.osuosl.org" , Yannick Fertre , Ryder Lee , Herbert Xu , Richard Weinberger , Jaehoon Chung , Marek Vasut , linux-serial , Zhang Rui , Alan Tull , John Youn , Eduardo Valentin , dmaengine@vger.kernel.org, "moderated list:ARM/Mediatek SoC support" , Matthias Brugger , Mark Yao , Moritz Fischer , Vivien Didelot , netdev , Peter De Schrijver , Stephen Boyd , Adrian Hunter , Vinod Koul , Rongrong Zou , linux-fpga@vger.kernel.org, David Woodhouse , Lucas Stach List-ID: On Sun, 2017-07-23 at 20:41 +0200, Linus Walleij wrote: > 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. 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philipp Zabel Subject: Re: [PATCH 000/102] Convert drivers to explicit reset API Date: Mon, 24 Jul 2017 10:33:41 +0200 Message-ID: <1500885221.2391.50.camel@pengutronix.de> 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" Content-Transfer-Encoding: 7bit Cc: Dmitry Torokhov , 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 Sun, 2017-07-23 at 20:41 +0200, Linus Walleij wrote: > 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. 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philipp Zabel Subject: Re: [PATCH 000/102] Convert drivers to explicit reset API Date: Mon, 24 Jul 2017 10:33:41 +0200 Message-ID: <1500885221.2391.50.camel@pengutronix.de> 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" Content-Transfer-Encoding: 7bit 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: To: Linus Walleij Cc: Dmitry Torokhov , 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
  • List-Id: linux-tegra@vger.kernel.org On Sun, 2017-07-23 at 20:41 +0200, Linus Walleij wrote: > 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. 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dZYrY-0002Mx-LT for ath10k@lists.infradead.org; Mon, 24 Jul 2017 08:37:14 +0000 Message-ID: <1500885221.2391.50.camel@pengutronix.de> Subject: Re: [PATCH 000/102] Convert drivers to explicit reset API From: Philipp Zabel Date: Mon, 24 Jul 2017 10:33:41 +0200 In-Reply-To: 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 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ath10k" Errors-To: ath10k-bounces+kvalo=adurom.com@lists.infradead.org To: Linus Walleij Cc: Andrew Lunn , Prashant Gaikwad , Heiko Stuebner , Peter Chen , DRI , Marc Dietrich , Rakesh Iyer , Peter Meerwald-Stadler , linux-clk , Wolfram Sang , Xinliang Liu , Chanwoo Choi , Alan Stern , Jiri Slaby , Shawn Lin , Guenter Roeck , Ohad Ben-Cohen , "linux-pm@vger.kernel.org" , Thomas Gleixner , Vincent Abriou , Bin Liu , Greg Kroah-Hartman , USB list , linux-wireless , lkml , Ralf Baechle , linux-spi , "linux-crypto@vger.kernel.org" , Tejun Heo , "alsa-devel@alsa-project.org" , "linux-doc@vger.kernel.org" , David Airlie , nouveau@lists.freedesktop.org, Philippe Cornu , Wim Van Sebroeck , Laxman Dewangan , Corentin Labbe , Linux I2C , Alexandre Torgue , Boris Brezillon , Lars-Peter Clausen , Emilio =?ISO-8859-1?Q?L=F3pez?= , Daniel Lezcano , Jon Hunter , "open list:ARM/Rockchip SoC..." , MyungJoo Ham , Ben Skeggs , Yisen Zhuang , "linux-media@vger.kernel.org" , Richard Zhu , LINUXWATCHDOG , Mathias Nyman , "linux-arm-msm@vger.kernel.org" , Joachim Eastwood , "linux-gpio@vger.kernel.org" , "linux-mips@linux-mips.org" , Bjorn Helgaas , Giuseppe Cavallaro , "linux-arm-kernel@lists.infradead.org" , Thomas Petazzoni , Patrice Chotard , Stanimir Varbanov , Kyungmin Park , Maxime Coquelin , Hartmut Knaack , Jonathan Cameron , Ulf Hansson , "linux-iio@vger.kernel.org" , Linux PCI , Michael Turquette , Matthias Brugger , "linux-mtd@lists.infradead.org" , Benjamin Gaignard , Florian Fainelli , Jonathan Corbet , Chen-Yu Tsai , ath10k@lists.infradead.org, Kishon Vijay Abraham I , Xinwei Kong , "linux-input@vger.kernel.org" , "linux-pwm@vger.kernel.org" , Chen Feng , Mark Brown , Dan Williams , Felipe Balbi , Salil Mehta , Dmitry Torokhov , linux-mmc , Kalle Valo , Thierry Reding , Cyrille Pitchen , Srinivas Kandagatla , Maxime Ripard , Brian Norris , "David S. Miller" , Liam Girdwood , linux-remoteproc@vger.kernel.org, Bjorn Andersson , "linux-ide@vger.kernel.org" , Lee Jones , "devel@driverdev.osuosl.org" , Yannick Fertre , Ryder Lee , Herbert Xu , Richard Weinberger , Jaehoon Chung , Marek Vasut , linux-serial , Zhang Rui , Alan Tull , John Youn , Eduardo Valentin , Rongrong Zou , "moderated list:ARM/Mediatek SoC support" , "linux-tegra@vger.kernel.org" , Mark Yao , Moritz Fischer , Vivien Didelot , netdev , Peter De Schrijver , Stephen Boyd , Adrian Hunter , Vinod Koul , dmaengine@vger.kernel.org, linux-fpga@vger.kernel.org, David Woodhouse , Lucas Stach On Sun, 2017-07-23 at 20:41 +0200, Linus Walleij wrote: > 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. 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 _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k