[PATCH 2/2] ARM: mx5/mx53_evk: Remove unneeded gpio_set_value call
Fabio Estevam
festevam at gmail.com
Wed Mar 16 10:19:51 EDT 2011
Hi Uwe,
2011/3/16 Uwe Kleine-König <u.kleine-koenig at pengutronix.de>:
...
> This function is a bit confusing:
>
> /* Bring USB hub out of reset */
> ret = gpio_request(BABBAGE_USB_HUB_RESET, "GPIO1_7");
> if (ret) {
> ...
> return;
> }
> gpio_direction_output(BABBAGE_USB_HUB_RESET, 0);
> /* USB HUB RESET - De-assert USB HUB RESET_N */
> msleep(1);
> gpio_set_value(BABBAGE_USB_HUB_RESET, 0);
> msleep(1);
> gpio_set_value(BABBAGE_USB_HUB_RESET, 1);
>
> IMHO the comments are misleading. I'd suggest:
>
> ret = gpio_request_one(BABBAGE_USB_HUB_RESET,
> GPIOF_DIR_OUT | GPIOF_INIT_LOW, "USB hub reset#");
> if (ret) {
> pr_err("failed to request gpio for USB hub reset#: %d\n", ret);
> return;
> }
> msleep(2);
> gpio_set_value(BABBAGE_USB_HUB_RESET, 1);
>
> Fabio?
Ok, I was not the author of this original code, but will send a new
patch for fixing it.
Thanks for the review.
Regards,
Fabio Estevam
More information about the linux-arm-kernel
mailing list