From: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
To: Mark Brown <broonie@kernel.org>
Cc: "robh+dt@kernel.org" <robh+dt@kernel.org>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
Hamish Martin <Hamish.Martin@alliedtelesis.co.nz>,
"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"tthayer@opensource.altera.com" <tthayer@opensource.altera.com>
Subject: Re: [PATCH 0/3] spi: SPI bus multiplexer
Date: Sun, 28 Apr 2019 22:28:16 +0000 [thread overview]
Message-ID: <d91ab2261a1f4069bc48e090bd4ec702@svr-chch-ex1.atlnz.lc> (raw)
In-Reply-To: 20190412082913.GA6909@sirena.org.uk
On 12/04/19 8:29 PM, Mark Brown wrote:
> On Fri, Apr 12, 2019 at 05:02:10PM +1200, Chris Packham wrote:
>
>> Unfortunately recent changes have stopped my hacks from working. I've
>> tried adapting cs-gpios to work with my particular hardware but I came
>> to the realisation that the current cs-gpios support assumes a 1:1
>> mapping of gpio to SPI device whereas my hardware used the state of the
>> gpio selecting the device i.e. a 1:2 mapping.
>
>> This is my attempt to implement a driver to deal with this. One nice
>> property is that it is pretty much self contained. The only change to
>> the core SPI infrastructure is exposing a function I needed to lookup
>> the spi_controller instance.
>
> Why not implement the device that demuxes the GPIOs you're using for
> chip select as a GPIO controller? Presumably it might get used for
> things other than chip selects.
>
Hmm a gpio-gpio driver. Interesting.
One other problem that I encounter is the interaction between cs-gpio
and SPI_MASTER_GPIO_SS. Having cs-gpio automatically sets SPI_CS_HIGH
which has the undesired side-effect that now my real chip select is
inverted. I actually wonder if this change breaks commit 8eee6b9dd30d
("spi: Add Flag to Enable Slave Select with GPIO Chip Select.") since
now there is an extra inversion on the CS enable.
next prev parent reply other threads:[~2019-04-28 22:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-12 5:02 [PATCH 0/3] spi: SPI bus multiplexer Chris Packham
2019-04-12 5:02 ` [PATCH 1/3] dt-bindings: spi: Add spi-mux-gpio Chris Packham
2019-04-29 21:37 ` Rob Herring
2020-01-13 3:43 ` Chris Packham
2019-04-12 5:02 ` [PATCH 2/3] spi: Make of_find_spi_controller_by_node visible Chris Packham
2019-04-12 5:02 ` [PATCH 3/3] spi: Add SPI bus gpio multiplexer Chris Packham
2019-04-12 8:29 ` [PATCH 0/3] spi: SPI bus multiplexer Mark Brown
2019-04-28 22:28 ` Chris Packham [this message]
2019-05-02 2:45 ` Mark Brown
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=d91ab2261a1f4069bc48e090bd4ec702@svr-chch-ex1.atlnz.lc \
--to=chris.packham@alliedtelesis.co.nz \
--cc=Hamish.Martin@alliedtelesis.co.nz \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=tthayer@opensource.altera.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;
as well as URLs for NNTP newsgroup(s).