From: Chanwoo Choi <cw00.choi@samsung.com>
To: Hans de Goede <hdegoede@redhat.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/8] extcon: axp288: Make a couple of messages dev_info instead of dev_dbg
Date: Mon, 19 Dec 2016 15:31:30 +0900 [thread overview]
Message-ID: <58577EC2.4020807@samsung.com> (raw)
In-Reply-To: <20161219001313.13402-5-hdegoede@redhat.com>
Hi Hans,
I prefer to use the dev_dbg on the fly instead of dev_info.
If you want to check the change state, you can use the udev monitor tool
because extcon send the uevent when changing the state of connector.
Regards,
Chanwoo Choi
On 2016년 12월 19일 09:13, Hans de Goede wrote:
> These messages are helpful for the user to check if their charger is
> correctly detected, so make them dev_dbg instead of dev_info.
>
> Also add a new message to indicate when the vbus is disconnected /
> no cable is detected.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> drivers/extcon/extcon-axp288.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c
> index ded0bd9..fc636f6 100644
> --- a/drivers/extcon/extcon-axp288.c
> +++ b/drivers/extcon/extcon-axp288.c
> @@ -167,8 +167,10 @@ static int axp288_handle_chrg_det_event(struct axp288_extcon_info *info)
> }
>
> vbus_attach = (pwr_stat & PS_STAT_VBUS_PRESENT);
> - if (!vbus_attach)
> + if (!vbus_attach) {
> + dev_info(info->dev, "vbus/cable disconnected\n");
> goto no_vbus;
> + }
>
> /* Check charger detection completion status */
> ret = regmap_read(info->regmap, AXP288_BC_GLOBAL_REG, &cfg);
> @@ -187,15 +189,15 @@ static int axp288_handle_chrg_det_event(struct axp288_extcon_info *info)
>
> switch (chrg_type) {
> case DET_STAT_SDP:
> - dev_dbg(info->dev, "sdp cable is connected\n");
> + dev_info(info->dev, "sdp cable is connected\n");
> cable = EXTCON_CHG_USB_SDP;
> break;
> case DET_STAT_CDP:
> - dev_dbg(info->dev, "cdp cable is connected\n");
> + dev_info(info->dev, "cdp cable is connected\n");
> cable = EXTCON_CHG_USB_CDP;
> break;
> case DET_STAT_DCP:
> - dev_dbg(info->dev, "dcp cable is connected\n");
> + dev_info(info->dev, "dcp cable is connected\n");
> cable = EXTCON_CHG_USB_DCP;
> break;
> default:
>
next prev parent reply other threads:[~2016-12-19 6:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20161219001318epcas5p1884657998ce4dd35c8ef8094fe00904f@epcas5p1.samsung.com>
2016-12-19 0:13 ` [PATCH 1/8] extcon: axp288: Remove dependency on non-existing platform_data Hans de Goede
2016-12-19 0:13 ` [PATCH 2/8] extcon: axp288: Remove usb_phy notification code Hans de Goede
2016-12-19 6:54 ` Chanwoo Choi
2016-12-19 0:13 ` [PATCH 3/8] extcon: axp288: Simplify axp288_handle_chrg_det_event Hans de Goede
2016-12-19 6:10 ` Chanwoo Choi
2016-12-19 0:13 ` [PATCH 4/8] extcon: axp288: Fix possibly reporting 2 cables in state true Hans de Goede
2016-12-19 6:27 ` Chanwoo Choi
2016-12-19 0:13 ` [PATCH 5/8] extcon: axp288: Make a couple of messages dev_info instead of dev_dbg Hans de Goede
2016-12-19 6:31 ` Chanwoo Choi [this message]
2016-12-19 0:13 ` [PATCH 6/8] extcon: axp288: Use vbus-valid instead of -present to determine cable presence Hans de Goede
2016-12-19 6:36 ` Chanwoo Choi
2016-12-19 0:13 ` [PATCH 7/8] extcon: axp288: Remove unnecessary irq?_en register writes Hans de Goede
2016-12-19 6:51 ` Chanwoo Choi
2016-12-19 0:13 ` [PATCH 8/8] extcon: axp288: Fix the module not auto-loading Hans de Goede
2016-12-19 6:51 ` Chanwoo Choi
2016-12-19 6:10 ` [PATCH 1/8] extcon: axp288: Remove dependency on non-existing platform_data Chanwoo Choi
2016-12-19 6:58 ` Chanwoo Choi
2016-12-19 8:18 ` Hans de Goede
2016-12-19 8:22 ` Chanwoo Choi
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=58577EC2.4020807@samsung.com \
--to=cw00.choi@samsung.com \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.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