diff mbox series

[1/3] usb: chipidea: imx: change hsic power regulator as optional

Message ID 20191011054129.20502-1-peter.chen@nxp.com (mailing list archive)
State Mainlined
Commit 7d5ec335f94e74e885ca2f6c97a3479fe9fe3b15
Headers show
Series [1/3] usb: chipidea: imx: change hsic power regulator as optional | expand

Commit Message

Peter Chen Oct. 11, 2019, 5:42 a.m. UTC
Not every platform needs this regulator.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/usb/chipidea/ci_hdrc_imx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

André Draszik Oct. 18, 2019, 3:13 p.m. UTC | #1
Peter,

Thank you for this series, I was out so I will test it early next week
and report.


Cheers,
Andre'


On Fri, 2019-10-11 at 05:42 +0000, Peter Chen wrote:
> Not every platform needs this regulator.
> 
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
>  drivers/usb/chipidea/ci_hdrc_imx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
> index 16700170bc34..25a38ed27aa8 100644
> --- a/drivers/usb/chipidea/ci_hdrc_imx.c
> +++ b/drivers/usb/chipidea/ci_hdrc_imx.c
> @@ -359,7 +359,8 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
>  			return PTR_ERR(data->pinctrl_hsic_active);
>  		}
>  
> -		data->hsic_pad_regulator = devm_regulator_get(dev, "hsic");
> +		data->hsic_pad_regulator =
> +				devm_regulator_get_optional(dev, "hsic");
>  		if (PTR_ERR(data->hsic_pad_regulator) == -EPROBE_DEFER) {
>  			return -EPROBE_DEFER;
>  		} else if (PTR_ERR(data->hsic_pad_regulator) == -ENODEV) {
diff mbox series

Patch

diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
index 16700170bc34..25a38ed27aa8 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -359,7 +359,8 @@  static int ci_hdrc_imx_probe(struct platform_device *pdev)
 			return PTR_ERR(data->pinctrl_hsic_active);
 		}
 
-		data->hsic_pad_regulator = devm_regulator_get(dev, "hsic");
+		data->hsic_pad_regulator =
+				devm_regulator_get_optional(dev, "hsic");
 		if (PTR_ERR(data->hsic_pad_regulator) == -EPROBE_DEFER) {
 			return -EPROBE_DEFER;
 		} else if (PTR_ERR(data->hsic_pad_regulator) == -ENODEV) {