Re: Multiple SPI MCP23S17s sharing a CS line

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

 



On Thu, Nov 28, 2019 at 5:11 AM Phil Reid <preid@xxxxxxxxxxxxxxxxx> wrote:
> On 27/11/2019 20:36, Linus Walleij wrote:

> > IIUC this needs to be figured out and both the DT bindings
> > and the driver need to be fixed to support this peculiar addressing
> > scheme.
> >
>
> Similar problem has come up before with gpio line props from Jan.
> The above was similar to what was discussed previously a couple of times.
> eg: https://patchwork.ozlabs.org/patch/1052925/
>
> I'd say it's the way to solve the problem.

OK I see.

Actually this comment from Jan:

"Linux  does not support multiple child devices "within" one SPI slave.
If there  was proper support for this, this patch would be superfluous."

This is not a real limitation, we can have children inside SPI devices,
no problem at all. The driver can just parse them with something like
for_each_available_child_of_node(parent, child) from
<linux/of.h>.

It is possible for the driver to create proper subdevices for each
node or just create (I think) the different gpio_chip:s with
a reference to the unique DT node for each chip and then the
.xlate function will figure out the GPIO translation.

Yours,
Linus Walleij



[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