mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Prashant Malani <pmalani@chromium.org>
To: linux-kernel@vger.kernel.org
Cc: Prashant Malani <pmalani@chromium.org>,
	Benson Leung <bleung@chromium.org>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Guenter Roeck <groeck@chromium.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>
Subject: [PATCH 1/5] platform/chrome: cros_usbpd_notify: Rename cros_ec_pd_command()
Date: Wed, 29 Sep 2021 19:23:48 -0700	[thread overview]
Message-ID: <20210930022403.3358070-2-pmalani@chromium.org> (raw)
In-Reply-To: <20210930022403.3358070-1-pmalani@chromium.org>

Rename cros_ec_pd_command()_to cros_ec_command() since it can be used
for sending any host command, and not just PD related ones.

This patch does not introduce any functional changes.

Signed-off-by: Prashant Malani <pmalani@chromium.org>
---
 drivers/platform/chrome/cros_usbpd_notify.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/drivers/platform/chrome/cros_usbpd_notify.c b/drivers/platform/chrome/cros_usbpd_notify.c
index 48a6617aa12f..e718055f4313 100644
--- a/drivers/platform/chrome/cros_usbpd_notify.c
+++ b/drivers/platform/chrome/cros_usbpd_notify.c
@@ -54,7 +54,7 @@ void cros_usbpd_unregister_notify(struct notifier_block *nb)
 EXPORT_SYMBOL_GPL(cros_usbpd_unregister_notify);
 
 /**
- * cros_ec_pd_command - Send a command to the EC.
+ * cros_ec_command - Send a command to the EC.
  *
  * @ec_dev: EC device
  * @command: EC command
@@ -65,12 +65,12 @@ EXPORT_SYMBOL_GPL(cros_usbpd_unregister_notify);
  *
  * Return: >= 0 on success, negative error number on failure.
  */
-static int cros_ec_pd_command(struct cros_ec_device *ec_dev,
-			      int command,
-			      uint8_t *outdata,
-			      int outsize,
-			      uint8_t *indata,
-			      int insize)
+static int cros_ec_command(struct cros_ec_device *ec_dev,
+			   int command,
+			   uint8_t *outdata,
+			   int outsize,
+			   uint8_t *indata,
+			   int insize)
 {
 	struct cros_ec_command *msg;
 	int ret;
@@ -115,10 +115,8 @@ static void cros_usbpd_get_event_and_notify(struct device  *dev,
 	}
 
 	/* Check for PD host events on EC. */
-	ret = cros_ec_pd_command(ec_dev, EC_CMD_PD_HOST_EVENT_STATUS,
-				 NULL, 0,
-				 (uint8_t *)&host_event_status,
-				 sizeof(host_event_status));
+	ret = cros_ec_command(ec_dev, EC_CMD_PD_HOST_EVENT_STATUS,
+			      NULL, 0, (uint8_t *)&host_event_status, sizeof(host_event_status));
 	if (ret < 0) {
 		dev_warn(dev, "Can't get host event status (err: %d)\n", ret);
 		goto send_notify;
-- 
2.33.0.685.g46640cef36-goog


  reply	other threads:[~2021-09-30  2:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30  2:23 [PATCH 0/5] platform/chrome: Make cros_ec_pd_command() reusable Prashant Malani
2021-09-30  2:23 ` Prashant Malani [this message]
2021-09-30  2:23 ` [PATCH 2/5] platform/chrome: cros_usbpd_notify: Move ec_command() Prashant Malani
2021-09-30  2:23 ` [PATCH 3/5] platform/chrome: cros_ec_proto: Make data pointers void Prashant Malani
2021-09-30  2:23 ` [PATCH 4/5] platform/chrome: cros_ec_proto: Add version for ec_command Prashant Malani
2021-09-30  2:23 ` [PATCH 5/5] platform/chrome: cros_ec_typec: Use cros_ec_command() Prashant Malani
2021-09-30  7:25 ` [PATCH 0/5] platform/chrome: Make cros_ec_pd_command() reusable Enric Balletbo i Serra

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=20210930022403.3358070-2-pmalani@chromium.org \
    --to=pmalani@chromium.org \
    --cc=bleung@chromium.org \
    --cc=enric.balletbo@collabora.com \
    --cc=groeck@chromium.org \
    --cc=gustavoars@kernel.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®