]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: Use stable dev_name for ACPI enumerated I2C slaves
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Thu, 14 Nov 2013 12:03:52 +0000 (14:03 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 14 Nov 2013 22:20:45 +0000 (23:20 +0100)
commitf8d916e98f34ed4bbf900227c295a33cbc023cf4
treea0968bc07accce62249a61820ab12b9dff302dbc
parent7a3a1fd07e3253f907415b512a27380720c18f0e
i2c: Use stable dev_name for ACPI enumerated I2C slaves

Current I2C adapter id - client address "x-00yy" based device naming scheme
is not always stable enough to be used in name based matching, for instance
within ALSA SoC subsystem.

This is problematic in PC kind of platforms where I2C adapter numbers can
change due variable amount of bus controllers, probe order, add-on cards or
just because of BIOS settings.

This patch addresses the problem by using the ACPI device name with
"i2c-" prefix for ACPI enumerated I2C slaves. For them device name
"x-00yz" becomes "i2c-INTABCD:ij" after this patch.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/i2c/i2c-core.c