From: Greg KH <gregkh@linuxfoundation.org>
To: steven_syu <steven_syu@asus.com>
Cc: heikki.krogerus@linux.intel.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: typec: clear usb_pd flag if change to typec only mode
Date: Tue, 30 Nov 2021 07:59:20 +0100 [thread overview]
Message-ID: <YaXLyHX1Qm3AHFob@kroah.com> (raw)
In-Reply-To: <1638241033-12467-1-git-send-email-steven_syu@asus.com>
On Tue, Nov 30, 2021 at 10:57:13AM +0800, steven_syu wrote:
> This patch handle power mode change from PD to Type-C only
> and the user space unknown power delivery was turned off
> by typec driver.
I do not understand this sentance, can you please rewrite it a bit?
> Signed-off-by: steven_syu <steven_syu@asus.com>
Please use the name you sign documents with, I doubt you do so with a
"_" in it, right?
> ---
> drivers/usb/typec/class.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
> index aeef453..11e2a98 100644
> --- a/drivers/usb/typec/class.c
> +++ b/drivers/usb/typec/class.c
> @@ -1718,6 +1718,10 @@ void typec_set_pwr_opmode(struct typec_port *port,
> partner->usb_pd = 1;
> sysfs_notify(&partner_dev->kobj, NULL,
> "supports_usb_power_delivery");
> + } else if (opmode != TYPEC_PWR_MODE_PD && partner->usb_pd) {
> + partner->usb_pd = 0;
> + sysfs_notify(&partner_dev->kobj, NULL,
> + "supports_usb_power_delivery");
Are you sure this is correct? You set usb_pd to 0 and then told
userspace it was 1?
confused,
greg k-h
next prev parent reply other threads:[~2021-11-30 6:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-30 2:57 [PATCH] usb: typec: clear usb_pd flag if change to typec only mode steven_syu
2021-11-30 6:59 ` Greg KH [this message]
2021-11-30 10:56 ` Heikki Krogerus
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=YaXLyHX1Qm3AHFob@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=steven_syu@asus.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