From 891414179e43d1256d5f34334d5fd16b8ce47ae7 Mon Sep 17 00:00:00 2001 From: Fugang Duan Date: Fri, 28 Jul 2017 11:22:31 +0800 Subject: [PATCH] MLK-16095-01 i2c: mux: pca954x: add i2c bus switch PCA9646 chip support Add i2c bus switch PCA9646 chip support, which 2-wire bus switch and buffered 4-channel. Signed-off-by: Fugang Duan --- Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt | 3 ++- drivers/i2c/muxes/i2c-mux-pca954x.c | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt b/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt index cf53d5fba20a..4f64e145cb2b 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt @@ -4,7 +4,8 @@ Required Properties: - compatible: Must contain one of the following. "nxp,pca9540", "nxp,pca9542", "nxp,pca9543", "nxp,pca9544", - "nxp,pca9545", "nxp,pca9546", "nxp,pca9547", "nxp,pca9548" + "nxp,pca9545", "nxp,pca9546", "nxp,pca9547", "nxp,pca9548", + "nxp,pca9646" - reg: The I2C address of the device. diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c index 9c4ac26c014e..6b052391b0ab 100644 --- a/drivers/i2c/muxes/i2c-mux-pca954x.c +++ b/drivers/i2c/muxes/i2c-mux-pca954x.c @@ -57,6 +57,7 @@ enum pca_type { pca_9546, pca_9547, pca_9548, + pca_9646, }; struct chip_desc { @@ -105,6 +106,10 @@ static const struct chip_desc chips[] = { .nchans = 8, .muxtype = pca954x_isswi, }, + [pca_9646] = { + .nchans = 4, + .muxtype = pca954x_isswi, + }, }; static const struct i2c_device_id pca954x_id[] = { @@ -116,6 +121,7 @@ static const struct i2c_device_id pca954x_id[] = { { "pca9546", pca_9545 }, { "pca9547", pca_9547 }, { "pca9548", pca_9548 }, + { "pca9646", pca_9646 }, { } }; MODULE_DEVICE_TABLE(i2c, pca954x_id); @@ -130,6 +136,7 @@ static const struct of_device_id pca954x_of_match[] = { { .compatible = "nxp,pca9546", .data = &chips[pca_9546] }, { .compatible = "nxp,pca9547", .data = &chips[pca_9547] }, { .compatible = "nxp,pca9548", .data = &chips[pca_9548] }, + { .compatible = "nxp,pca9646", .data = &chips[pca_9646] }, {} }; #endif -- 2.17.1