Re: [PATCH] gpio: syscon: do not use raw "set" callback in syscon_gpio_dir_out

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 22, 2017 at 12:23 PM, Vladimir Murzin
<vladimir.murzin@xxxxxxx> wrote:

> I tried to use gpio-syscon to fit into my case which is very
> similar to those pseudo-GPIOs in drivers/mfd/vexpress-sysreg.c

I do not like what that driver is doing and it should not be
taken as inspiration.

I have several times slammed down on people trying to shoehorn
things that are not GPIO into the GPIO subsystem just out of
convenience.

The question to ask is always: is this bit/line/pin really
"general purpose input/output"?

Not "how can I quickly code up something that makes this
thing work?"

See for example drivers/leds/leds-syscon.c
That was my response to someone trying to first use
syscon-gpio on a register and then gpio-leds on top of
that, hilarious layers of indirection!

If the use case is MMC card detect, we need card detection
using syscon directly in the MMC subsystem, not hacks
like what the Vexpress MFD driver is doing.

I have the Versatile Express in my office and one day I will
fix up this thing.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux