Re: [PATCH 0/4] Qualcomm Shared Memory State Machines

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

 



On Thu, Aug 27, 2015 at 7:37 PM, Bjorn Andersson
<bjorn.andersson@xxxxxxxxxxxxxx> wrote:

Let's discuss this a bit, looping in Mark Brown.

> As some of these states on some platforms are passed as physical signals
> instead, the two drivers are modelled as gpio- and interrupt-controllers -
> providing a nice abstraction both in device tree sense and Linux implementation
> sense.

I have unfortunately repeatedly encountered an argument of the type
"GPIO has nice infrastructure so let's call X 'a kind of GPIO' so
we can use that nice infrastructure".

I'm not pleased with something that is not really general purpose
input/output being called GPIO. It fits badly with the GPIO subsystem
when we support things like open drain and cross-mappings to
the pin control subsystem that will never be applicable to these
new users. It's more like "special purpose input/output" or
something.

This happened with syscon LEDs for example, and was the reason
I implemented syscon-leds. The original proposal was to say the LEDs
register was "a kind of GPIO" on top of regmap and then use gpio-leds
on top of that. Instead I insisted it was a syscon/regmap and the
LEDs go directly to that, bypassing one layer of abstraction.

I also imagine creating syscon-keys.c for input from arbitrary keys
in a syscon register actually. Just didn't get around to that yet.

I also see some of the stuff GPIO does out-of-the-box being useful,
for example in MFD: some of these are interrupt controllers and
basically duplicate the kind of code I have in gpiolib for
GPIOLIB_IRQCHIP.

So we need to figure out what is really needed.

While sparsely documented: what about regmap (maybe in the
form of syscon) and drivers/base/regmap/regmap-irq.c for the
interrupt handling?

I cannot claim to understand regmap-irq.c, but I just intuitively
think it deserves consideration, such that drivers who need one
of these misc registers can read/write their bits with regmap
accessors and also get IRQs by way of regmap-irq.

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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux