RE: [PATCH 07/29] usb: dwc2: gadget: add device tree property to enable dma

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

 



Hi,

> -----Original Message-----
> From: Sergei Shtylyov [mailto:sergei.shtylyov@xxxxxxxxxxxxxxxxxx]
> Sent: Friday, December 19, 2014 1:41 PM
> To: Kaukab, Yousaf; linux-usb@xxxxxxxxxxxxxxx; balbi@xxxxxx
> Cc: Herrero, Gregory; paulz@xxxxxxxxxxxx
> Subject: Re: [PATCH 07/29] usb: dwc2: gadget: add device tree property to
> enable dma
> 
> On 12/18/2014 9:53 PM, Mian Yousaf Kaukab wrote:
> 
> > From: Gregory Herrero <gregory.herrero@xxxxxxxxx>
> 
> > * Add an of specific function to parse device node properties.
> > * Enable dma usage only if device tree property 'g_use_dma' is present.
> 
>     Hyphen is preferred to underscore in the device tree prop names.
> 
> > Signed-off-by: Gregory Herrero <gregory.herrero@xxxxxxxxx>
> 
> [...]
> > diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> > index 58699c3..eb58305 100644
> > --- a/drivers/usb/dwc2/gadget.c
> > +++ b/drivers/usb/dwc2/gadget.c
> [...]
> > @@ -3402,6 +3402,24 @@ static void s3c_hsotg_delete_debug(struct
> dwc2_hsotg *hsotg)
> >   	debugfs_remove(hsotg->debug_root);
> >   }
> >
> > +#ifdef CONFIG_OF
> > +static int s3c_hsotg_of_probe(struct dwc2_hsotg *hsotg) {
> > +	struct device_node *np = hsotg->dev->of_node;
> > +
> > +	/* Enable dma if requested in device tree */
> > +	if (of_find_property(np, "g_use_dma", NULL))
> 
>     Use of_propery_read_bool() please.
> 
> > +		hsotg->g_using_dma = true;
> > +
> > +	return 0;
> 
>     The function always returns 0, why not make it *void* for now?
> 
> [...]
> > @@ -3421,6 +3439,10 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg,
> int irq)
> >   	/* Set default UTMI width */
> >   	hsotg->phyif = GUSBCFG_PHYIF16;
> >
> > +	ret = s3c_hsotg_of_probe(hsotg);
> > +	if (ret)
> > +		return ret;
> 
>      Dead code as s3c_hsotg_of_probe() always returns 0.
> 
> [...]
> 
> WBR, Sergei

I will fix all of them.

Thanks,
Yousaf

----------------------------------------------------------------------
Intel Sweden AB
Registered Office: Knarrarnasgatan 15, 164 40 Kista, Stockholm, Sweden
Registration Number: 556189-6027

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux