From: Greg KH <gregkh@linuxfoundation.org>
To: Sergei Shtylyov <sergei.shtylyov@gmail.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Trevor Woerner <twoerner@gmail.com>,
jamesg@zaltys.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: ohci-nxp: add support for stotg04 phy
Date: Thu, 30 Jul 2020 08:43:03 +0200 [thread overview]
Message-ID: <20200730064303.GA3909742@kroah.com> (raw)
In-Reply-To: <b5389371-3d47-f046-4d34-3d329276cb35@gmail.com>
On Wed, Jul 29, 2020 at 09:00:04PM +0300, Sergei Shtylyov wrote:
> Hello!
>
> On 7/29/20 8:49 PM, Alexandre Belloni wrote:
>
> > The STOTG04 phy is used as a drop-in replacement of the ISP1301 but some
> > bits doesn't have exactly the same meaning and this can lead to issues.
> > Detect the phy dynamically and avoid writing to reserved bits.
> >
> > Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> > ---
> >
> > Hi Trevor, this is totally untested but at least it builds ;)
> >
> > drivers/usb/host/ohci-nxp.c | 21 +++++++++++++++------
> > 1 file changed, 15 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c
> > index 85878e8ad331..36ab1501c28f 100644
> > --- a/drivers/usb/host/ohci-nxp.c
> > +++ b/drivers/usb/host/ohci-nxp.c
> > @@ -55,6 +55,15 @@ static struct clk *usb_host_clk;
> >
> > static void isp1301_configure_lpc32xx(void)
> > {
> > + u8 value, atx_is_stotg = 0;
>
> Why the flag is not *bool*?
That's not an issue so much as:
>
> > + s32 vendor, product;
> > +
> > + vendor = i2c_smbus_read_word_data(isp1301_i2c_client, 0x00);
> > + product = i2c_smbus_read_word_data(isp1301_i2c_client, 0x02);
Why are these signed 32bit numbers? Shouldn't they be unsigned?
> > +
> > + if (vendor == 0x0483 && product == 0xa0c4)
No endian flips anywhere?
thanks,
greg k-h
next prev parent reply other threads:[~2020-07-30 6:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-23 21:27 lpc32xx and stotg04 Trevor Woerner
2020-07-29 17:28 ` Alexandre Belloni
2020-07-29 17:49 ` [PATCH] usb: ohci-nxp: add support for stotg04 phy Alexandre Belloni
2020-07-29 18:00 ` Sergei Shtylyov
2020-07-30 6:43 ` Greg KH [this message]
2020-07-30 11:35 ` Alexandre Belloni
2020-07-30 18:51 ` lpc32xx and stotg04 Trevor Woerner
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=20200730064303.GA3909742@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alexandre.belloni@bootlin.com \
--cc=jamesg@zaltys.org \
--cc=linux-usb@vger.kernel.org \
--cc=sergei.shtylyov@gmail.com \
--cc=twoerner@gmail.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;
as well as URLs for NNTP newsgroup(s).