Skip to contentSkip to conversation

platform/chrome: cros_ec_spi: Always add of_match_table

PATCH In review Evan Green 3 participants 3 messages May 9, 2019 – May 15, 2019

Subsystems (2)
lore
Share & tools
lore

Evan Green

author
#0 lore raw

PATCH 1/1 platform/chrome: cros_ec_spi: Always add of_match_table

The Chrome OS EC driver attaches to devices using the of_match_table even when ACPI is the underlying firmware. It does this using the magic PRP0001 ACPI HID, which tells ACPI to go find an OF compatible string under the hood and match on that.

The cros_ec_spi driver needs to provide the of_match_table regardless of whether CONFIG_OF is enabled or not, since the table is used by ACPI for PRP0001 devices.

---

 drivers/platform/chrome/cros_ec_spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/chrome/cros_ec_spi.c +1 -1
index ffc38f9d4829..3df315fce60b 100644
@@ -709,7 +709,7 @@ MODULE_DEVICE_TABLE(spi, cros_ec_spi_id);
 static struct spi_driver cros_ec_driver_spi = {
 	.driver	= {
 		.name	= "cros-ec-spi",
-		.of_match_table = of_match_ptr(cros_ec_spi_of_match),
+		.of_match_table = cros_ec_spi_of_match,
 		.pm	= &cros_ec_spi_pm_ops,
 	},
 	.probe		= cros_ec_spi_probe,
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw

Hi Evan,

Quoted 10 lines · Evan Green

The Chrome OS EC driver attaches to devices using the of_match_table even when ACPI is the underlying firmware. It does this using the magic PRP0001 ACPI HID, which tells ACPI to go find an OF compatible string under the hood and match on that.

The cros_ec_spi driver needs to provide the of_match_table regardless of whether CONFIG_OF is enabled or not, since the table is used by ACPI for PRP0001 devices.

Looks good to me.

I'll leave this to Enric to merge to our for-next.

Thanks,
Benson

Signature · 7 lines
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
[email protected]
Chromium OS Project
[email protected]
#2 lore raw

Hi,

Quoted 14 lines · Benson Leung

Hi Evan,

Quoted 10 lines · Evan Green

The Chrome OS EC driver attaches to devices using the of_match_table even when ACPI is the underlying firmware. It does this using the magic PRP0001 ACPI HID, which tells ACPI to go find an OF compatible string under the hood and match on that.

The cros_ec_spi driver needs to provide the of_match_table regardless of whether CONFIG_OF is enabled or not, since the table is used by ACPI for PRP0001 devices.

Quoted 8 lines

Looks good to me.

I'll leave this to Enric to merge to our for-next.

Thanks,
Benson

The patch is queued to the for-next branch with the Benson rb tag for the autobuilders to play with, if all goes well I'll add the patch for 5.3 when current merge window closes.

Thanks,
Enric