[RESEND PATCH 1/3] ARM: davinci: da830: Handle vbus with a regulator

Sekhar Nori nsekhar at ti.com
Tue Nov 22 02:35:16 PST 2016


On Monday 21 November 2016 10:23 PM, Axel Haslam wrote:

>  static __init void da830_evm_usb_init(void)
>  {
> @@ -145,23 +123,13 @@ static __init void da830_evm_usb_init(void)
>  		return;
>  	}
>  
> -	ret = gpio_request(ON_BD_USB_DRV, "ON_BD_USB_DRV");
> -	if (ret) {
> -		pr_err("%s: failed to request GPIO for USB 1.1 port power control: %d\n",
> -		       __func__, ret);
> -		return;
> -	}
> -	gpio_direction_output(ON_BD_USB_DRV, 0);
> +	gpiod_add_lookup_table(&usb11_gpios_table);
>  
> -	ret = gpio_request(ON_BD_USB_OVC, "ON_BD_USB_OVC");
> -	if (ret) {
> -		pr_err("%s: failed to request GPIO for USB 1.1 port over-current indicator: %d\n",
> -		       __func__, ret);
> -		return;
> -	}
> -	gpio_direction_input(ON_BD_USB_OVC);
> +	ret = platform_device_register(&da8xx_usb11_regulator);
> +	if (ret)
> +		pr_warn("fail to add ohci regulator\n");

Can you follow the same style as used in other error/warning messages in
this function (adding a function name prefix, printing of error code).

Thanks,
Sekhar



More information about the linux-arm-kernel mailing list