Re: [PATCH 00/10] Regulator ena_gpiod fixups

From: Mark Brown
Date: Thu Nov 29 2018 - 14:01:49 EST


On Thu, Nov 29, 2018 at 07:38:20PM +0100, Bartosz Golaszewski wrote:

> I'm wondering if instead of using the non-devm variants of
> gpiod_get_*() routines, we shouldn't provide helpers in the regulator
> framework that would be named accordingly, for example:
> regulator_gpiod_get_optional() etc. even if all they do is call the
> relevant gpiolib function. Those helpers could then be documented as
> passing the control over GPIO lines over to the regulator subsystem.

> The reason for that is that most driver developers will automatically
> use devm functions whenever available and having a single non-devm
> function without any comment used in a driver normally using devres
> looks like a bug. Expect people sending "fixes" in a couple months.

I predict that people would then immediately start demanding devm_
variants of that function...

Attachment: signature.asc
Description: PGP signature