Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-19 Thread Jarkko Nikula
On 01/17/2014 05:57 PM, Mark Brown wrote: On Fri, Jan 17, 2014 at 09:37:56AM +0200, Jarkko Nikula wrote: Sidenote: actually this modalias/module loading issue is different and not related to stable ACPI i2c/spi slave device names. Oh, I'd been under the impression that it was the rewrite that

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-17 Thread Mark Brown
On Fri, Jan 17, 2014 at 09:37:56AM +0200, Jarkko Nikula wrote: On 01/16/2014 09:46 PM, Mark Brown wrote: This is needed for ACPI because we rewrite the device names to give us stable names. With OF for I2C and SPI nothing bus specific is done that affects this stuff so the default behaviour

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-16 Thread Zhang Rui
On Wed, 2014-01-15 at 17:08 +0200, Mika Westerberg wrote: On Tue, Jan 14, 2014 at 04:46:37PM +0800, Zhang Rui wrote: diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 3a94b79..2f4aea2 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -677,7 +677,13

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-16 Thread Wolfram Sang
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index d74c0b3..c4c5588 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -104,6 +104,11 @@ static int i2c_device_match(struct device *dev, struct device_driver *drv) static int i2c_device_uevent(struct device

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-16 Thread Mark Brown
On Tue, Jan 14, 2014 at 04:46:37PM +0800, Zhang Rui wrote: ACPI enumerated devices has ACPI style _HID and _CID strings, all of these strings can be used for both driver loading and matching. Currently, in Platform, I2C and SPI bus, the ACPI style driver matching is supported by invoking

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-16 Thread Zhang Rui
On Thu, 2014-01-16 at 12:28 +, Mark Brown wrote: On Tue, Jan 14, 2014 at 04:46:37PM +0800, Zhang Rui wrote: ACPI enumerated devices has ACPI style _HID and _CID strings, all of these strings can be used for both driver loading and matching. Currently, in Platform, I2C and SPI bus,

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-16 Thread Zhang Rui
On Thu, 2014-01-16 at 13:27 +0100, Wolfram Sang wrote: diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index d74c0b3..c4c5588 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -104,6 +104,11 @@ static int i2c_device_match(struct device *dev, struct

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-16 Thread Wolfram Sang
On Thu, Jan 16, 2014 at 12:28:19PM +, Mark Brown wrote: On Tue, Jan 14, 2014 at 04:46:37PM +0800, Zhang Rui wrote: ACPI enumerated devices has ACPI style _HID and _CID strings, all of these strings can be used for both driver loading and matching. Currently, in Platform, I2C and SPI

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-16 Thread Mark Brown
On Thu, Jan 16, 2014 at 09:05:09PM +0800, Zhang Rui wrote: On Thu, 2014-01-16 at 13:27 +0100, Wolfram Sang wrote: I wonder why we don't have/need that with CONFIG_OF? Because probably nobody is using modules with i2c devices there? This seems a gap to me but I'm not 100% sure. I saw Grant

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-16 Thread Rafael J. Wysocki
On Thursday, January 16, 2014 04:04:35 PM Zhang Rui wrote: On Wed, 2014-01-15 at 17:08 +0200, Mika Westerberg wrote: On Tue, Jan 14, 2014 at 04:46:37PM +0800, Zhang Rui wrote: diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 3a94b79..2f4aea2 100644 ---

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-16 Thread Zhang Rui
On Fri, 2014-01-17 at 02:28 +0100, Rafael J. Wysocki wrote: On Thursday, January 16, 2014 04:04:35 PM Zhang Rui wrote: On Wed, 2014-01-15 at 17:08 +0200, Mika Westerberg wrote: On Tue, Jan 14, 2014 at 04:46:37PM +0800, Zhang Rui wrote: diff --git a/drivers/base/platform.c

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-16 Thread Jarkko Nikula
On 01/16/2014 09:46 PM, Mark Brown wrote: On Thu, Jan 16, 2014 at 09:05:09PM +0800, Zhang Rui wrote: On Thu, 2014-01-16 at 13:27 +0100, Wolfram Sang wrote: This seems a gap to me but I'm not 100% sure. I saw Grant Likely introduced the OF style MODALIAS to platform bus, and OF style

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-15 Thread Mika Westerberg
On Tue, Jan 14, 2014 at 04:46:37PM +0800, Zhang Rui wrote: diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 3a94b79..2f4aea2 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -677,7 +677,13 @@ static ssize_t modalias_show(struct device *dev, struct

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-14 Thread Zhang Rui
On Mon, 2014-01-13 at 17:35 +, Mark Brown wrote: On Mon, Jan 13, 2014 at 09:48:31PM +0800, Zhang Rui wrote: ACPI enumerated devices has ACPI style _HID and _CID strings, all of these strings can be used for both driver loading and matching. But currently, in Platform, I2C and SPI bus,

[PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-14 Thread Zhang Rui
ACPI enumerated devices has ACPI style _HID and _CID strings, all of these strings can be used for both driver loading and matching. Currently, in Platform, I2C and SPI bus, the ACPI style driver matching is supported by invoking acpi_driver_match_device() in bus .match() callback. But, the

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-14 Thread Mark Brown
On Tue, Jan 14, 2014 at 04:00:17PM +0800, Zhang Rui wrote: On Mon, 2014-01-13 at 17:35 +, Mark Brown wrote: On Mon, Jan 13, 2014 at 09:48:31PM +0800, Zhang Rui wrote: ACPI enumerated devices has ACPI style _HID and _CID strings, all of these strings can be used for both driver loading

[PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-13 Thread Zhang Rui
ACPI enumerated devices has ACPI style _HID and _CID strings, all of these strings can be used for both driver loading and matching. But currently, in Platform, I2C and SPI bus, only the ACPI style driver matching is supported by invoking acpi_driver_match_device() in bus .match() callback. This

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-13 Thread Mark Brown
On Mon, Jan 13, 2014 at 09:48:31PM +0800, Zhang Rui wrote: ACPI enumerated devices has ACPI style _HID and _CID strings, all of these strings can be used for both driver loading and matching. But currently, in Platform, I2C and SPI bus, only the ACPI style driver matching is supported by