linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Hasemeyer <markhas@chromium.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Raul Rangel <rrangel@chromium.org>,
	Mark Hasemeyer <markhas@chromium.org>,
	Bhanu Prakash Maiya <bhanumaiya@chromium.org>,
	Benson Leung <bleung@chromium.org>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Guenter Roeck <groeck@chromium.org>,
	chrome-platform@lists.linux.dev
Subject: [PATCH v7 3/3] platform/chrome: cros_ec_uart: Add DT enumeration support
Date: Thu, 17 Nov 2022 11:48:48 -0700	[thread overview]
Message-ID: <20221117114818.v7.3.Ie23c217d69ff25d7354db942613f143bbc8ef891@changeid> (raw)
In-Reply-To: <20221117114818.v7.1.If7926fcbad397bc6990dd725690229bed403948c@changeid>

Existing firmware uses the "PRP0001" _HID and an associated compatible
string to enumerate the cros_ec_uart.

Add DT enumeration support for already shipped firmware.

Signed-off-by: Bhanu Prakash Maiya <bhanumaiya@chromium.org>
Signed-off-by: Mark Hasemeyer <markhas@chromium.org>
---

Changes in v7:
- Move PRP0001 enumeration support to its own commit

 drivers/platform/chrome/cros_ec_uart.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/platform/chrome/cros_ec_uart.c b/drivers/platform/chrome/cros_ec_uart.c
index b5f72f0104985..d44efb78bc881 100644
--- a/drivers/platform/chrome/cros_ec_uart.c
+++ b/drivers/platform/chrome/cros_ec_uart.c
@@ -11,6 +11,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/acpi.h>
+#include <linux/of.h>
 #include <linux/platform_data/cros_ec_commands.h>
 #include <linux/platform_data/cros_ec_proto.h>
 #include <linux/serdev.h>
@@ -392,6 +393,12 @@ static int __maybe_unused cros_ec_uart_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(cros_ec_uart_pm_ops, cros_ec_uart_suspend,
 			 cros_ec_uart_resume);
 
+static const struct of_device_id cros_ec_uart_of_match[] = {
+	{ .compatible = "google,cros-ec-uart" },
+	{}
+};
+MODULE_DEVICE_TABLE(of, cros_ec_uart_of_match);
+
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id cros_ec_uart_acpi_id[] = {
 	{ "GOOG0019", 0 },
@@ -405,6 +412,7 @@ static struct serdev_device_driver cros_ec_uart_driver = {
 	.driver	= {
 		.name	= "cros-ec-uart",
 		.acpi_match_table = ACPI_PTR(cros_ec_uart_acpi_id),
+		.of_match_table = cros_ec_uart_of_match,
 		.pm	= &cros_ec_uart_pm_ops,
 	},
 	.probe		= cros_ec_uart_probe,
-- 
2.38.1.584.g0f3c55d4c2-goog


  parent reply	other threads:[~2022-11-17 18:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17 18:48 [PATCH v7 1/3] platform/chrome: cros_ec_uart: Add cros-ec-uart transport layer Mark Hasemeyer
2022-11-17 18:48 ` [PATCH v7 2/3] dt-bindings: mfd: Add DT compatible string "google,cros_ec_uart" Mark Hasemeyer
2022-11-18  5:44   ` Tzung-Bi Shih
2022-11-18  8:59     ` Lee Jones
2022-11-18  9:19       ` Tzung-Bi Shih
2022-11-18 12:47         ` Krzysztof Kozlowski
2022-11-18 12:42   ` Guenter Roeck
2022-11-18 14:28     ` Lee Jones
2022-11-18 12:49   ` Krzysztof Kozlowski
2022-11-17 18:48 ` Mark Hasemeyer [this message]
2022-11-18  5:44   ` [PATCH v7 3/3] platform/chrome: cros_ec_uart: Add DT enumeration support Tzung-Bi Shih
2022-11-29 18:13     ` Mark Hasemeyer
2022-11-30  7:09       ` Tzung-Bi Shih
2022-11-30 16:52         ` Raul Rangel
2022-12-01  3:07           ` Tzung-Bi Shih
2022-11-18  5:43 ` [PATCH v7 1/3] platform/chrome: cros_ec_uart: Add cros-ec-uart transport layer Tzung-Bi Shih

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221117114818.v7.3.Ie23c217d69ff25d7354db942613f143bbc8ef891@changeid \
    --to=markhas@chromium.org \
    --cc=bhanumaiya@chromium.org \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=enric.balletbo@collabora.com \
    --cc=groeck@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rrangel@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).