From: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
To: b-liu@ti.com
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, tony@atomide.com,
Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Subject: [PATCH] usb: musb: remove extra check in musb_gadget_vbus_draw
Date: Mon, 14 Nov 2022 10:59:47 +0200 [thread overview]
Message-ID: <1668416387-24984-1-git-send-email-ivo.g.dimitrov.75@gmail.com> (raw)
The check for musb->xceiv->set_power duplicates the check done in
usb_phy_set_power(). Moreover, not calling usb_phy_set_power() results in
current USB config max current not being propagated through usb_charger FW
Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
---
drivers/usb/musb/musb_gadget.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 6704a62..ba20272d 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1628,8 +1628,6 @@ static int musb_gadget_vbus_draw(struct usb_gadget *gadget, unsigned mA)
{
struct musb *musb = gadget_to_musb(gadget);
- if (!musb->xceiv->set_power)
- return -EOPNOTSUPP;
return usb_phy_set_power(musb->xceiv, mA);
}
--
1.9.1
next reply other threads:[~2022-11-14 9:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 8:59 Ivaylo Dimitrov [this message]
2022-11-22 16:11 ` Greg KH
2022-11-23 7:12 ` Tony Lindgren
2022-11-25 18:21 ` [PATCH v2] " Ivaylo Dimitrov
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=1668416387-24984-1-git-send-email-ivo.g.dimitrov.75@gmail.com \
--to=ivo.g.dimitrov.75@gmail.com \
--cc=b-liu@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=tony@atomide.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
all inboxes | Powered by JetHome®