Re: [PATCH 2/2 v2] usb: ohci-omap: Convert to use GPIO descriptors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 17, 2020 at 03:49:19PM +0200, Linus Walleij wrote:
> On Thu, Jul 16, 2020 at 5:41 PM Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> > On Thu, Jul 16, 2020 at 02:34:33PM +0200, Linus Walleij wrote:
> > > The OMAP1 OHCI driver is using the legacy GPIO API to grab some
> > > random GPIO lines. One is from the TPS65010 chip and used for
> > > power, another one is for overcurrent and while the driver picks
> > > this line it doesn't watch it at all.
> >
> > If the driver doesn't use this GPIO, why keep the code to grab it?
> 
> I think it gives a hint to someone who later tries to debug
> problems with the hardware that they should maybe go and
> complete this overcurrent feature.

Okay, but in that case a nice comment would better serve the purpose.

> Keeping with the paradigm that a patch should be one technological
> step (converting to GPIO descriptors) that should be a
> third patch (retireing dead code). But I can certainly add a
> patch like that if required.

For example, you could insert a patch before this one to remove the 
unused references and replace them with a comment.

> > > Convert the driver and the OMAP1 OSK board file to pass these
> > > two GPIOs as machine descrived GPIO descriptors.
> > -----------------------------^
> 
> Oooups.
> 
> > > Cc: Janusz Krzysztofik <jmkrzyszt@xxxxxxxxx>
> > > Cc: Tony Lindgren <tony@xxxxxxxxxxx>
> > > Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
> > > Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> > > ---
> >
> > Aside from this I don't have any objections.
> 
> Does that qualify as an ACK or do you still want me to remove
> the overcurrent template code?

A little dead code with no explanation doesn't bother me very much, 
although it will seem rather odd to anyone who reads the driver 
carefully.  Mainly I wanted to bring this matter to your attention and 
leave it up to your own taste as to how you should proceed.

If you want to resubmit this patch as is (with just the typo fixed), you 
can add my Acked-by.

Alan Stern



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux