LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] platform/chrome: cros_ec_spi: Always add of_match_table
@ 2019-05-09 18:17 Evan Green
  2019-05-10 21:46 ` Benson Leung
  0 siblings, 1 reply; 3+ messages in thread
From: Evan Green @ 2019-05-09 18:17 UTC (permalink / raw)
  To: Benson Leung, Enric Balletbo i Serra
  Cc: Guenter Roeck, Stephen Boyd, Evan Green, linux-kernel

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.

Signed-off-by: Evan Green <evgreen@chromium.org>
---

 drivers/platform/chrome/cros_ec_spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/chrome/cros_ec_spi.c b/drivers/platform/chrome/cros_ec_spi.c
index ffc38f9d4829..3df315fce60b 100644
--- a/drivers/platform/chrome/cros_ec_spi.c
+++ b/drivers/platform/chrome/cros_ec_spi.c
@@ -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,
-- 
2.20.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/chrome: cros_ec_spi: Always add of_match_table
  2019-05-09 18:17 [PATCH] platform/chrome: cros_ec_spi: Always add of_match_table Evan Green
@ 2019-05-10 21:46 ` Benson Leung
  2019-05-15 13:01   ` Enric Balletbo i Serra
  0 siblings, 1 reply; 3+ messages in thread
From: Benson Leung @ 2019-05-10 21:46 UTC (permalink / raw)
  To: Evan Green
  Cc: Benson Leung, Enric Balletbo i Serra, Guenter Roeck,
	Stephen Boyd, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 843 bytes --]

Hi Evan,

On Thu, May 09, 2019 at 11:17:50AM -0700, Evan Green wrote:
> 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.
> 
> Signed-off-by: Evan Green <evgreen@chromium.org>

Looks good to me.
Reviewed-by: Benson Leung <bleung@chromium.org>

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

Thanks,
Benson

-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
bleung@google.com
Chromium OS Project
bleung@chromium.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/chrome: cros_ec_spi: Always add of_match_table
  2019-05-10 21:46 ` Benson Leung
@ 2019-05-15 13:01   ` Enric Balletbo i Serra
  0 siblings, 0 replies; 3+ messages in thread
From: Enric Balletbo i Serra @ 2019-05-15 13:01 UTC (permalink / raw)
  To: Benson Leung, Evan Green
  Cc: Benson Leung, Guenter Roeck, Stephen Boyd, linux-kernel

Hi,

On 10/5/19 23:46, Benson Leung wrote:
> Hi Evan,
> 
> On Thu, May 09, 2019 at 11:17:50AM -0700, Evan Green wrote:
>> 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.
>>
>> Signed-off-by: Evan Green <evgreen@chromium.org>
> 
> Looks good to me.
> Reviewed-by: Benson Leung <bleung@chromium.org>
> 
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-15 13:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-09 18:17 [PATCH] platform/chrome: cros_ec_spi: Always add of_match_table Evan Green
2019-05-10 21:46 ` Benson Leung
2019-05-15 13:01   ` Enric Balletbo i Serra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).