gpio-mcp23s08 DT usage with shared chip select

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

 



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

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



[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