chrome-platform.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Mario Limonciello <superm1@gmail.com>
To: Benson Leung <bleung@chromium.org>, Guenter Roeck <groeck@chromium.org>
Cc: Sebastian Reichel <sre@kernel.org>,
	chrome-platform@lists.linux.dev (open list:CHROMEOS EC
	SUBDRIVERS),
	linux-pm@vger.kernel.org (open list:POWER SUPPLY CLASS/SUBSYSTEM
	and DRIVERS), linux-kernel@vger.kernel.org (open list),
	"Dustin L . Howett" <dustin@howett.net>,
	Mario Limonciello <mario.limonciello@amd.com>
Subject: [PATCH] power: supply: cros_usbpd: Don't show messages for no charging ports found
Date: Sat,  6 Apr 2024 14:17:34 -0500	[thread overview]
Message-ID: <20240406191734.137797-1-superm1@gmail.com> (raw)

From: Mario Limonciello <mario.limonciello@amd.com>

Framework 13 and 16 don't use cros_usbpd but do use cros_ec. The following
sequence of messages is totally unnecessary.

[    5.545352] cros-usbpd-charger cros-usbpd-charger.4.auto: No USB PD
charging ports found
[    5.546722] cros-usbpd-charger cros-usbpd-charger.4.auto: Unexpected
number of charge port count
[    5.546730] cros-usbpd-charger cros-usbpd-charger.4.auto: Failing
probe (err:0xffffffb9)
[    5.546735] cros-usbpd-charger cros-usbpd-charger.4.auto: probe with
driver cros-usbpd-charger failed with error -71

Link: https://lore.kernel.org/chrome-platform/20240403004713.130365-1-dustin@howett.net/
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/power/supply/cros_usbpd-charger.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/power/supply/cros_usbpd-charger.c b/drivers/power/supply/cros_usbpd-charger.c
index b6c96376776a..4e69da2cce7b 100644
--- a/drivers/power/supply/cros_usbpd-charger.c
+++ b/drivers/power/supply/cros_usbpd-charger.c
@@ -570,7 +570,8 @@ static int cros_usbpd_charger_probe(struct platform_device *pd)
 		 * This can happen on a system that doesn't support USB PD.
 		 * Log a message, but no need to warn.
 		 */
-		dev_info(dev, "No USB PD charging ports found\n");
+		dev_dbg(dev, "No USB PD charging ports found\n");
+		return -ENODEV;
 	}
 
 	charger->num_charger_ports = cros_usbpd_charger_get_num_ports(charger);
-- 
2.34.1


             reply	other threads:[~2024-04-06 19:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-06 19:17 Mario Limonciello [this message]
2024-04-08  6:29 ` [PATCH] power: supply: cros_usbpd: Don't show messages for no charging ports found 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=20240406191734.137797-1-superm1@gmail.com \
    --to=superm1@gmail.com \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=dustin@howett.net \
    --cc=groeck@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=sre@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).