]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: fsi: Create busses for all ports
authorOliver O'Halloran <oohall@gmail.com>
Thu, 6 Jun 2019 11:52:20 +0000 (21:52 +1000)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 7 Jun 2019 22:18:31 +0000 (00:18 +0200)
commit734cd56ec6f93a6e1101b26d4292f9218a7e2657
tree4ecf4227fb5f66a748b6639d8de22d33abd029d4
parent3a3d77c8dcc6cb51215655c51c5008486ff295bb
i2c: fsi: Create busses for all ports

Currently we only create an I2C bus for the ports listed in the
device-tree for that master. There's no real reason for this since
we can discover the number of ports the master supports by looking
at the port_max field of the status register.

This patch re-works the bus add logic so that we always create buses
for each port, unless the bus is marked as unavailable in the DT. This
is useful since it ensures that all the buses provided by the CFAM I2C
master are accessible to debug tools.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-fsi.c