ppc405 + MCP23S17
tiejun.chen
tiejun.chen at windriver.com
Wed Oct 13 14:09:05 EST 2010
WANG YiFei wrote:
> Hi,
>
>
>
> I'm a newbie for linux device driver development.
>
> We have a custom ppc405 board which has MCP23S17
>
> (16-Bit I/O Expander with SPI Interface) on it.
>
> I noticed that current kernel has MCP23S08 driver
>
> support, I'd like to know:
>
> 1. if passing platform data to MCP23S08 driver, can it make
>
> MCP23S17 work?
>
These chips should be same vendor product so I think 16-bit mcp23s17 may be
compatible to 8-bit modes. But you have to check the data sheet to confirm this
and track how to configure that as 8-bit mode. After that it's possible to run
mcp23s17 with mcp23s08.c.
> 2. Generally, I'd like to know how to pass platform data to
>
> a particular device driver. In my mind, platform data should
>
> not be in driver code, right? However, I don't know where is
Firstly you should define this on your dts. Then parse that to register
corresponding of_platform_device or platform_device when you setup your target
on <your target>.c.
When spi_register_driver prober successfully, you can get the platform_data from
associated spi device.
>
> the suitable place to pass platform data to driver.
>
> 3. How to describe this in dts file?
>
You can get more from the file, Documentation/powerpc/dts-bindings/spi-bus.txt.
Or refer to those existed spi nodes on other platform dts.
Tiejun
>
>
> Thanks in advance,
>
> YiFei
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
More information about the Linuxppc-dev
mailing list