From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Marek Vasut <marex@denx.de>, Lukasz Majewski <lukma@denx.de>
Cc: Harald Seiler <hws@denx.de>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Michael Trimarchi <michael@amarulasolutions.com>,
u-boot@lists.denx.de
Subject: Re: [PATCH v2] usb: gadget: dwc2_udc_otg: implement pullup()
Date: Wed, 11 Jan 2023 09:13:15 +0100 [thread overview]
Message-ID: <87wn5t7alg.fsf@baylibre.com> (raw)
In-Reply-To: <9f66db6e-8c31-2f69-9ae1-667ca54c7bc4@denx.de>
On Tue, Jan 10, 2023 at 18:23, Marek Vasut <marex@denx.de> wrote:
> On 1/10/23 17:29, Mattijs Korpershoek wrote:
>
> [...]
>
>> diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c
>> index 77988f78ab30..d0a9be49ad9c 100644
>> --- a/drivers/usb/gadget/dwc2_udc_otg.c
>> +++ b/drivers/usb/gadget/dwc2_udc_otg.c
>> @@ -236,6 +236,14 @@ static int udc_enable(struct dwc2_udc *dev)
>> return 0;
>> }
>>
>> +static int dwc2_gadget_pullup(struct usb_gadget *g, int is_on)
>> +{
>> + clrsetbits_le32(®->dctl, SOFT_DISCONNECT,
>> + (!is_on) << SOFT_DISCONNECT_BIT);
>
> Use
>
> is_on ? 0 : SOFT_DISCONNECT
>
> and you get rid of SOFT_DISCONNECT_BIT macro and the extra parenthesis
> around (!is_on) which are not needed.
Will do. thank you for your patience and your good advice !
prev parent reply other threads:[~2023-01-11 8:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-10 16:29 [PATCH v2] usb: gadget: dwc2_udc_otg: implement pullup() Mattijs Korpershoek
2023-01-10 17:23 ` Marek Vasut
2023-01-11 8:13 ` Mattijs Korpershoek [this message]
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=87wn5t7alg.fsf@baylibre.com \
--to=mkorpershoek@baylibre.com \
--cc=dario.binacchi@amarulasolutions.com \
--cc=hws@denx.de \
--cc=lukma@denx.de \
--cc=marex@denx.de \
--cc=michael@amarulasolutions.com \
--cc=u-boot@lists.denx.de \
/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