OSDN Git Service

i2c: iproc: Add full name of devicetree node to adapter name
authorLori Hikichi <lori.hikichi@broadcom.com>
Thu, 8 Aug 2019 03:37:53 +0000 (09:07 +0530)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 30 Aug 2019 12:59:20 +0000 (14:59 +0200)
commit539005ffc6260fcb3bb4171138be5f66a41185a9
tree678605a8bbe71a3b6c9186c641dfa2712fec266f
parent0183eb8bb59d45f26ec4fc73aaa416067fe6c0be
i2c: iproc: Add full name of devicetree node to adapter name

Add the full name of the devicetree node to the adapter name.
Without this change, all adapters have the same name making it difficult
to distinguish between multiple instances.
The most obvious way to see this is to use the utility i2c_detect.
e.g. "i2c-detect -l"

Before
i2c-1 i2c Broadcom iProc I2C adapter I2C adapter
i2c-0 i2c Broadcom iProc I2C adapter I2C adapter

After
i2c-1 i2c Broadcom iProc (i2c@e0000) I2C adapter
i2c-0 i2c Broadcom iProc (i2c@b0000) I2C adapter

Now it is easy to figure out which adapter maps to a which DT node.

Signed-off-by: Lori Hikichi <lori.hikichi@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-bcm-iproc.c