Re: [PATCH 3/5] mmc: slot-gpio: use gpiod_set_active_[low|high]()

From: Linus Walleij
Date: Thu Sep 14 2023 - 04:38:17 EST


On Thu, Sep 14, 2023 at 10:31 AM Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
> On Wed, Sep 13, 2023 at 2:39 PM Bartosz Golaszewski <brgl@xxxxxxxx> wrote:

> > Alternatively we could reimplement the toggle semantics locally in a
> > helper function in order to get rid of it from GPIOLIB.
>
> I don't know about that, the flag is inside gpio_desc so we cannot
> access it (struct is private to gpiolib...)

Actually I think the way the toggle call came about was for this one
MMC usecase.

Then other subsystems have used it without asking the GPIO
maintainers or without implementing the more proper accessors
or patching drivers/gpio/gpiolib-of.c because why not, probably
thinking something like "hey weird that it is just toggle I guess they
are not so smart, but it works, ship it".

Yours,
Linus Walleij