Re: [PATCH 2/2] at91/USB: at91sam9g45 series USB host integration

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

 



David Brownell wrote:
> > --- a/arch/arm/mach-at91/at91sam9g45_devices.c
> > +++ b/arch/arm/mach-at91/at91sam9g45_devices.c

> > +	/* Enable VBus control for UHP ports */
> > +	for (i = 0; i < data->ports; i++) {
> > +		if (data->vbus_pin[i])
> > +			at91_set_gpio_output(data->vbus_pin[i], 0);  
> 
> This should gpio_request() and gpio_direction_output().

Hmm...I thought the driver was supposed to call gpio_request(), not the
platform code?

> Don't use AT91-specific GPIO calls except for things that
> the generic calls don't support ... like enabling open-drain
> outputs, the deglitching support, or input pullups.

This call does port configuration, which you convinced me a long time
ago was a fundamentally different thing from GPIO. If the pin really
requires one of those features, this would definitely be the place to
set it up.

Haavard
--
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