i2c: mux: mellanox: add driver
authorVadim Pasternak <vadimp@mellanox.com>
Thu, 10 Nov 2016 21:26:23 +0000 (21:26 +0000)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 17 Nov 2016 22:19:00 +0000 (23:19 +0100)
commitc02b7bf532f7e46f1f9a0e9c3c27ca3f6f134e8d
tree816c6a097f3d839d3b6656a9963b5df59bfb7cf8
parent1e98dcd779705dbf9f9b2a5177674361649931e3
i2c: mux: mellanox: add driver

This driver allows I2C routing controlled through CPLD select registers on
a wide range of Mellanox systems (CPLD Lattice device).
MUX selection is provided by digital and analog HW. Analog part is not
under SW control.
Digital part is under CPLD control (channel selection/de-selection).

Connectivity schema.
.---.             .-------------.
| l |             |             |-- i2cx1 -- i2cx8
| i |-- i2cn --+--| mlxcpld mux |
| n |          |  |             |-- i2cy1 -- i2cy8
| u |          |  '-------------'
| x |          |         |
'---'          '---------'

i2c-mux-mlxpcld does not necessarily require i2c-mlxcpld. It can be used
along with another bus driver, and still control i2c routing through CPLD
mux selection, in case the system is equipped with CPLD capable of mux
selection control.

The Kconfig currently controlling compilation of this code is:
drivers/i2c/muxes/Kconfig:config I2C_MUX_MLXCPLD

Signed-off-by: Michael Shych <michaelsh@mellanox.com>
Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
MAINTAINERS
drivers/i2c/muxes/Kconfig
drivers/i2c/muxes/Makefile
drivers/i2c/muxes/i2c-mux-mlxcpld.c [new file with mode: 0644]
include/linux/i2c/mlxcpld.h [new file with mode: 0644]