driver: gpio: mcp23xxx: Refactor to generic.
Refactor the mcp230xx driver to generically also support SPI IO expanders, renaming it to mcp23xxx in the process. Signed-off-by: Peter Johanson <peter@peterjohanson.com>
This commit is contained in:
parent
8251a65575
commit
a5ad94f20f
14 changed files with 677 additions and 403 deletions
|
@ -72,6 +72,15 @@
|
|||
nint-gpios = <&test_gpio 0 0>;
|
||||
};
|
||||
|
||||
test_i2c_mcp230xx: mcp230xx@0 {
|
||||
compatible = "microchip,mcp230xx";
|
||||
label = "MCP230XX";
|
||||
reg = <0x0>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
ngpios = <16>;
|
||||
};
|
||||
|
||||
test_i2c_fxl6408: fxl6408@43 {
|
||||
status = "okay";
|
||||
compatible = "fcs,fxl6408";
|
||||
|
@ -160,7 +169,7 @@
|
|||
clock-frequency = <2000000>;
|
||||
|
||||
/* one entry for every devices at spi.dtsi */
|
||||
cs-gpios = <&test_gpio 0 0>;
|
||||
cs-gpios = <&test_gpio 0 0 &test_gpio 0 0>;
|
||||
|
||||
test_spi_mcp23s17: mcp23s17@0 {
|
||||
compatible = "microchip,mcp23s17";
|
||||
|
@ -171,6 +180,16 @@
|
|||
#gpio-cells = <2>;
|
||||
ngpios = <16>;
|
||||
};
|
||||
|
||||
test_spi_mcp23sxx: mcp23sxx@0 {
|
||||
compatible = "microchip,mcp23sxx";
|
||||
label = "GPIO_E1";
|
||||
spi-max-frequency = <0>;
|
||||
reg = <0x0>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
ngpios = <16>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue