linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
To: linux-kernel@vger.kernel.org
Cc: gwendal@chromium.org, jflat@chromium.org, kernel@collabora.com,
	lee.jones@linaro.org, bleung@chromium.org, groeck@chromium.org,
	rajatja@google.com, dtor@chromium.org
Subject: [PATCH 2/2] mfd: cros_ec: Instantiate the CrOS USB PD logger driver
Date: Wed,  3 Apr 2019 15:54:03 +0200	[thread overview]
Message-ID: <20190403135403.9472-2-enric.balletbo@collabora.com> (raw)
In-Reply-To: <20190403135403.9472-1-enric.balletbo@collabora.com>

Add the cros-usbpd-logger driver for logging event data for the USB PD
charger available in the Embedded Controller on ChromeOS systems. The
logging feature is logically separate functionality from charge manager,
hence is instantiated as a different driver.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---
Lee, this is send as separate patch because touches the MFD subsystem,
apart from that the driver won't be instantiated if [1/2] is not
merged, which I think is not a problem, it is safe for both go through
their subsystem separately.

Thanks,
 Enric

 drivers/mfd/cros_ec_dev.c                   | 3 ++-
 drivers/platform/chrome/cros_usbpd_logger.c | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c
index 0638a0d82d97..3e33fa5b8657 100644
--- a/drivers/mfd/cros_ec_dev.c
+++ b/drivers/mfd/cros_ec_dev.c
@@ -612,7 +612,8 @@ static const struct mfd_cell cros_ec_rtc_cells[] = {
 };
 
 static const struct mfd_cell cros_usbpd_charger_cells[] = {
-	{ .name = "cros-usbpd-charger" }
+	{ .name = "cros-usbpd-charger" },
+	{ .name = "cros-usbpd-logger" },
 };
 
 static const struct mfd_cell cros_ec_platform_cells[] = {
diff --git a/drivers/platform/chrome/cros_usbpd_logger.c b/drivers/platform/chrome/cros_usbpd_logger.c
index 2091ad7c2afa..eb27078aae47 100644
--- a/drivers/platform/chrome/cros_usbpd_logger.c
+++ b/drivers/platform/chrome/cros_usbpd_logger.c
@@ -136,10 +136,10 @@ static void cros_usbpd_print_log_entry(struct ec_response_pd_log *r,
 		break;
 	case PD_EVENT_VIDEO_CODEC:
 		minfo = (struct mcdp_info *)r->payload;
-		len += append_str(buf, len, "HDMI info: family:%04x chipid:%04x"
+		len += append_str(buf, len, "HDMI info: family:%04x chipid:%04x ",
 				  MCDP_FAMILY(minfo->family),
 				  MCDP_CHIPID(minfo->chipid));
-		len += append_str(buf, len, " irom:%d.%d.%d fw:%d.%d.%d",
+		len += append_str(buf, len, "irom:%d.%d.%d fw:%d.%d.%d",
 				  minfo->irom.major, minfo->irom.minor,
 				  minfo->irom.build, minfo->fw.major,
 				  minfo->fw.minor, minfo->fw.build);
-- 
2.20.1


  reply	other threads:[~2019-04-03 13:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03 13:54 [PATCH 1/2] platform/chrome: Add CrOS USB PD logging driver Enric Balletbo i Serra
2019-04-03 13:54 ` Enric Balletbo i Serra [this message]
2019-04-03 14:03   ` [PATCH 2/2] mfd: cros_ec: Instantiate the CrOS USB PD logger driver Enric Balletbo i Serra
2019-04-05 19:54 ` [PATCH 1/2] platform/chrome: Add CrOS USB PD logging driver Guenter Roeck
2019-04-05 21:09   ` Enric Balletbo Serra
2019-04-05 21:38     ` Guenter Roeck
2019-04-05 21:43       ` Enric Balletbo 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=20190403135403.9472-2-enric.balletbo@collabora.com \
    --to=enric.balletbo@collabora.com \
    --cc=bleung@chromium.org \
    --cc=dtor@chromium.org \
    --cc=groeck@chromium.org \
    --cc=gwendal@chromium.org \
    --cc=jflat@chromium.org \
    --cc=kernel@collabora.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rajatja@google.com \
    /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).