Philipp Zabel
2017-Jul-24 08:33 UTC
[Nouveau] [PATCH 000/102] Convert drivers to explicit reset API
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 at gmail.com> wrote: > > On Thu, Jul 20, 2017 at 5:55 AM, Philipp Zabel <p.zabel at 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
Wolfram Sang
2017-Aug-12 11:43 UTC
[Nouveau] [PATCH 000/102] Convert drivers to explicit reset API
> 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.I didn't follow the discussion closely. Shall I still apply the i2c patches? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20170812/bb2b40d1/attachment.sig>
Philipp Zabel
2017-Aug-14 07:36 UTC
[Nouveau] [PATCH 000/102] Convert drivers to explicit reset API
On Sat, 2017-08-12 at 13:43 +0200, Wolfram Sang wrote:> > 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. > > I didn't follow the discussion closely. Shall I still apply the i2c > patches?Yes, please. regards Philipp
Maybe Matching Threads
- [PATCH 000/102] Convert drivers to explicit reset API
- [PATCH 000/102] Convert drivers to explicit reset API
- [PATCH] virtio-mmio: don't break lifecycle of vm_dev
- [PATCH 0/6] gpu: convert to use new I2C API
- [PATCH 000/102] Convert drivers to explicit reset API