From: Nathan Williams <ngwilliams@gmail.com>
To: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: gpio-mcp23s08 DT usage with shared chip select
Date: Fri, 01 Jul 2016 12:11:40 +1000 [thread overview]
Message-ID: <1467339100.28816.25.camel@linux> (raw)
Hi,
I'm using gpio-mcp23s08 for two MCP23S17 chips that use the same SPI
chip select (and different addresses).
My device tree contains:
&spi0 {
status = "okay";
bus-num = <0>;
num-cs = <2>;
cs-gpios =
<&portc 2 0>,
<&portc 3 0>;
gpio@1 {
compatible = "microchip,mcp23s17";
gpio-controller;
#gpio-cells = <2>;
microchip,spi-present-mask = <0x03>;
reg = <1>;
spi-max-frequency = <1000000>;
};
};
The driver registers both gpiochips but both are labelled "mcp23s17" and
I can't differentiate between the chips without probing the hardware.
I'd also like to be able to give each GPIO a name with gpio-line-names.
What's the best way to achieve this? Add support to the driver for child
DT nodes for each gpiochip?
Regards,
Nathan
reply other threads:[~2016-07-01 2:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1467339100.28816.25.camel@linux \
--to=ngwilliams@gmail.com \
--cc=linux-gpio@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).