i2c: core: Allow empty id_table in ACPI case as well
Subsystems (3)
PATCH 1/1 i2c: core: Allow empty id_table in ACPI case as well
For now empty ID table is not allowed with ACPI and prevents driver to be probed.
Add a check to allow empty ID table.
--- drivers/i2c/i2c-core-base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/i2c/i2c-core-base.c +2 -1
@@ -354,9 +354,10 @@ static int i2c_device_probe(struct device *dev)/* * An I2C ID table is not mandatory, if and only if, a suitable Device -* Tree match table entry is supplied for the probing device. +* Tree or ACPI match table entry is supplied for the probing device. */ if (!driver->id_table && + !acpi_match_device (dev->driver->acpi_match_table, &client->dev) && !i2c_of_match_device (dev->driver->of_match_table, client))return -ENODEV ;
Signature · 1 line
2.11.0
Hi,
Thank you for doing this.
Quoted 7 lines · Andy Shevchenko
For now empty ID table is not allowed with ACPI and prevents driver to be probed.
Add a check to allow empty ID table.
Fixes da10c06a044b ("i2c: Make I2C ID tables non-mandatory for DT'ed devices")Signed-off-by Andy Shevchenko <[email protected]>
Looks good to me:
Regards,
Hans
Quoted 21 lines
--- drivers/i2c/i2c-core-base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/i2c/i2c-core-base.c +2
-1@@ -354,9 +354,10 @@ static int i2c_device_probe(struct device *dev)/* * An I2C ID table is not mandatory, if and only if, a suitable Device -* Tree match table entry is supplied for the probing device. +* Tree or ACPI match table entry is supplied for the probing device. */ if (!driver->id_table && + !acpi_match_device (dev->driver->acpi_match_table, &client->dev) && !i2c_of_match_device (dev->driver->of_match_table, client))return -ENODEV ;
Quoted 7 lines · Andy Shevchenko
For now empty ID table is not allowed with ACPI and prevents driver to be probed.
Add a check to allow empty ID table.
Fixes da10c06a044b ("i2c: Make I2C ID tables non-mandatory for DT'ed devices")Signed-off-by Andy Shevchenko <[email protected]>
Do we need this for 4.13 already?
Quoted 5 lines · Wolfram Sang
Quoted 4 lines · Andy Shevchenko
For now empty ID table is not allowed with ACPI and prevents driver to be
probed.
Quoted 8 lines
Quoted 5 lines
Add a check to allow empty ID table.
Fixes da10c06a044b ("i2c: Make I2C ID tables non-mandatory forDT'ed devices")
Signed-off-by Andy Shevchenko <[email protected]>Do we need this for 4.13 already?
Yes (we have NFC chip which relies on it), even better down to stable kernels which have mentioned commit.
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Wolfram Sang
AppliedQuoted 7 lines · Andy Shevchenko
For now empty ID table is not allowed with ACPI and prevents driver to be probed.
Add a check to allow empty ID table.
Fixes da10c06a044b ("i2c: Make I2C ID tables non-mandatory for DT'ed devices")Signed-off-by Andy Shevchenko <[email protected]>
Applied to for-4.13, thanks!