From: "Jan Kundrát" <jan.kundrat@cesnet.cz>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: linux-gpio@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>,
Phil Reid <preid@electromag.com.au>,
Sebastian Reichel <sebastian.reichel@collabora.co.uk>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
devicetree@vger.kernel.org
Subject: Re: [PATCH v2 3/4] pinctrl: mcp23s08: work around GPIO line naming
Date: Fri, 08 Mar 2019 13:51:10 +0100 [thread overview]
Message-ID: <4b2df0d7-76ba-4a39-87fa-e5e6baaecc70@cesnet.cz> (raw)
In-Reply-To: <20190307223515.653197dc@windsurf>
On čtvrtek 7. března 2019 22:35:15 CET, Thomas Petazzoni wrote:
> Hello Jan,
>
> On Thu, 7 Mar 2019 14:31:02 +0100
> Jan Kundrát <jan.kundrat@cesnet.cz> wrote:
>
>> +Line naming
>> +===========
>> +
>> +Because several gpio_chip instances are hidden below a single device tree
>
> Mentioning a Linux specific data structure (gpio_chip here) in a Device
> Tree binding documentation does not seem like a good idea. Bindings are
> supposed to be OS-agnostic.
Hi Thomas, that's a fair comment. On the other hand, this driver's DT
bindings are already quite Linux specific with their
"microchip,spi-present-mask" workaround. The way I understand this, Linux
does not support multiple child devices "within" one SPI slave. If there
was proper support for this, this patch would be superfluous.
I, too, would love to see this driver changed so that the bindings look,
e.g., like this:
gpio_spi_chips: gpio@1 {
compatible = "microchip,mcp23s17-multiple";
gpio-bank@1 {
compatible = "microchip,mcp23s17";
reg = <1>;
interrupt-parent = <&gpio1>;
interrupts = <22 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
microchip,irq-mirror;
drive-open-drain;
spi-max-frequency = <10000000>;
gpio-line-names =
"foo",
//...
;
random_pin {
gpio-hog;
gpios = <6 GPIO_ACTIVE_HIGH>;
input;
line-name = "this hogs just one pin";
};
};
gpio-bank@2 {
compatible = "microchip,mcp23s17";
reg = <2>;
interrupt-parent = <&gpio1>;
interrupts = <22 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
microchip,irq-mirror;
drive-open-drain;
spi-max-frequency = <10000000>;
gpio-line-names =
"bar",
//...
;
};
However, I am not volunteering to do this work -- that's quite out of my
league and available time.
With kind regards,
Jan
prev parent reply other threads:[~2019-03-08 12:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1551966076.git.jan.kundrat@cesnet.cz>
[not found] ` <517dcdda21ea0b0df884bc6adcba1dadb78b66b1.1551966077.git.jan.kundrat@cesnet.cz>
2019-03-08 12:35 ` [PATCH v2 3/4] pinctrl: mcp23s08: work around GPIO line naming Jan Kundrát
[not found] ` <20190307223515.653197dc@windsurf>
2019-03-08 12:51 ` Jan Kundrát [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4b2df0d7-76ba-4a39-87fa-e5e6baaecc70@cesnet.cz \
--to=jan.kundrat@cesnet.cz \
--cc=devicetree@vger.kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=preid@electromag.com.au \
--cc=sebastian.reichel@collabora.co.uk \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox