Re: [PATCH] phy: sun4i-usb: explicitly include gpio/consumer.h

From: Chen-Yu Tsai
Date: Thu Jul 16 2020 - 02:55:07 EST


On Thu, Jul 16, 2020 at 2:24 PM Vinod Koul <vkoul@xxxxxxxxxx> wrote:
>
> Driver uses GPIO functions but doesn't include the header explcitly. Add
> that to fix build errors when GPIOLIB is disabled.
>
> drivers/phy/allwinner/phy-sun4i-usb.c:367:11: error: implicit
> declaration of function âgpiod_get_value_cansleepâ; did you mean
> âgpio_get_value_cansleepâ? [-Werror=implicit-function-declaration]
> drivers/phy/allwinner/phy-sun4i-usb.c:707:22: error: implicit
> declaration of function âdevm_gpiod_get_optionalâ; did you mean
> âdevm_clk_get_optionalâ? [-Werror=implicit-function-declaration]
> drivers/phy/allwinner/phy-sun4i-usb.c:708:11: error: âGPIOD_INâ
> undeclared (first use in this function); did you mean âGPIOF_INâ?
> drivers/phy/allwinner/phy-sun4i-usb.c:815:21: error: implicit
> declaration of function âgpiod_to_irqâ; did you mean âgpio_to_irqâ?
> [-Werror=implicit-function-declaration]
>
> Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>

Maybe add

Fixes: ba4bdc9e1dc0 ("PHY: sunxi: Add driver for sunxi usb phy") ?

Though it probably doesn't apply cleanly on the oldest stable
kernel due to the extcon-provider header.

Either way,

Acked-by: Chen-Yu Tsai <wens@xxxxxxxx>