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)
commit095561f476abb09c2495b1e0a45a5ebb50a33b27
tree4ecf4227fb5f66a748b6639d8de22d33abd029d4
parent19b07cb4a187fe5d72519491fc2d11a3a7af1219
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