]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
i2c: mpc: Define unique I2C adapter names
authorGuenter Roeck <linux@roeck-us.net>
Wed, 10 Jul 2013 19:03:21 +0000 (12:03 -0700)
committerWolfram Sang <wsa@the-dreams.de>
Wed, 7 Aug 2013 15:30:04 +0000 (17:30 +0200)
commit421476aeed56a8d19c890ae6729e3c43b740da7a
tree0fd92df9b573fde8c930da6301a6eea0a79ac833
parentc66c4cc087eb1f5307f6391e467797227aed758a
i2c: mpc: Define unique I2C adapter names

The I2C adapters on Freescale MPC107/824x/85xx/512x/52xx/83xx/86xx all
have the same name "MPC adapter". Since I2C adapter numbers can change
across reboots and even after loading/unloading an I2C bus master driver,
adapter names have to be used to identify adapters and thus should be
unique and well defined. Since this is not the case with this driver,
it is difficult if not impossible to identify a specific adapter from
user space on affected platforms.

To remedy the problem, use the adapter memory address as part of the
adapter name.

With this patch, adapter names are:
On P2020:
MPC adapter at 0xfff703000
MPC adapter at 0xfff703100

On P5040:
MPC adapter at 0xffe118000
MPC adapter at 0xffe118100
MPC adapter at 0xffe119000
MPC adapter at 0xffe119100

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-mpc.c