Re: [PATCH v2 06/14] iio: accel: bma220: add get regulator check

Andy Shevchenko
2025-09-10T20:29:00Z

On Wed, Sep 10, 2025 at 9:52 PM Petre Rodan <petre.rodan@subdimension.ro> wrote:
> On Wed, Sep 10, 2025 at 06:58:41PM +0100, Jonathan Cameron wrote:
> > On Wed, 10 Sep 2025 10:57:11 +0300
> > Petre Rodan <petre.rodan@subdimension.ro> wrote:
> >
> > I don't follow the 'add get regulator check' of the patch description.
> > This is ensuring they are powered up if necessary. So I'd
> > just go with the vague: "turn power supplies on"
>
> to be honest I added this just because I've seen the devm_regulator_bulk_get_enable() function used all over the place in iio code.
> but looking at the linux/regulator/consumers.h header I was more puzzled.
> just some forward declarations and then static functions doing exactly nothing.
> I'm afraid to ask what that is all about. placeholder for a future API?

You probably see two things in one place:
1/ declaration of the function that is implemented in the C-code
2/ stub for the case when implementation is switched off (usually via
kernel configuration).

I recommend using elixir.bootlin.com to browse the code, or locally
via cscope or similar.

--
With Best Regards,
Andy Shevchenko