mbox series

[0/2] dwc3-qcom: Prepare the ground for pm8150b tcpm

Message ID 20210629144449.2550737-1-bryan.odonoghue@linaro.org
Headers show
Series dwc3-qcom: Prepare the ground for pm8150b tcpm | expand

Message

Bryan O'Donoghue June 29, 2021, 2:44 p.m. UTC
These two patches from Wesley prepare the ground for addition of a full
typec port manager upstream.

We took a bunch of these patches into the RB5 development tree, which I
have subsequently split into a USB/TCPM specific staging branch for
upstream.

https://git.linaro.org/people/bryan.odonoghue/kernel.git/log/?h=usb-next-5.13.rcx-rb5-tcpm

Some of the original patches from Wesley for basic type-c have landed
upstream and some have not. The type-c patches are subsumed into a pm8150b
tcpm driver but, these two specific patches have not changed and are still
required.

I'd like to resubmit them here with my Tested-by and Signed-off-by appended.

https://patchwork.kernel.org/project/linux-arm-msm/cover/20201009082843.28503-1-wcheng@codeaurora.org/

Wesley Cheng (2):
  usb: dwc3: dwc3-qcom: Find USB connector and register role switch
  usb: dwc3: dwc3-qcom: Fix typo in the dwc3 vbus override API

 drivers/usb/dwc3/dwc3-qcom.c | 126 +++++++++++++++++++++++++++++++++--
 1 file changed, 120 insertions(+), 6 deletions(-)

-- 
2.30.1

Comments

Bjorn Andersson June 29, 2021, 3:51 p.m. UTC | #1
On Tue 29 Jun 09:44 CDT 2021, Bryan O'Donoghue wrote:

> From: Wesley Cheng <wcheng@codeaurora.org>
> 
> There was an extra character in the dwc3_qcom_vbus_override_enable()
> function.  Removed the extra character.
> 
> Signed-off-by: Wesley Cheng <wcheng@codeaurora.org>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

But I think you should have sent the two patches in opposite order,
because this could have been merged, but now it depends on patch 1.

Regards,
Bjorn

> ---
>  drivers/usb/dwc3/dwc3-qcom.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> index 4491704503ab..541e2626294a 100644
> --- a/drivers/usb/dwc3/dwc3-qcom.c
> +++ b/drivers/usb/dwc3/dwc3-qcom.c
> @@ -120,7 +120,7 @@ static inline void dwc3_qcom_clrbits(void __iomem *base, u32 offset, u32 val)
>  	readl(base + offset);
>  }
>  
> -static void dwc3_qcom_vbus_overrride_enable(struct dwc3_qcom *qcom, bool enable)
> +static void dwc3_qcom_vbus_override_enable(struct dwc3_qcom *qcom, bool enable)
>  {
>  	if (enable) {
>  		dwc3_qcom_setbits(qcom->qscratch_base, QSCRATCH_SS_PHY_CTRL,
> @@ -141,7 +141,7 @@ static int dwc3_qcom_vbus_notifier(struct notifier_block *nb,
>  	struct dwc3_qcom *qcom = container_of(nb, struct dwc3_qcom, vbus_nb);
>  
>  	/* enable vbus override for device mode */
> -	dwc3_qcom_vbus_overrride_enable(qcom, event);
> +	dwc3_qcom_vbus_override_enable(qcom, event);
>  	qcom->mode = event ? USB_DR_MODE_PERIPHERAL : USB_DR_MODE_HOST;
>  
>  	return NOTIFY_DONE;
> @@ -153,7 +153,7 @@ static int dwc3_qcom_host_notifier(struct notifier_block *nb,
>  	struct dwc3_qcom *qcom = container_of(nb, struct dwc3_qcom, host_nb);
>  
>  	/* disable vbus override in host mode */
> -	dwc3_qcom_vbus_overrride_enable(qcom, !event);
> +	dwc3_qcom_vbus_override_enable(qcom, !event);
>  	qcom->mode = event ? USB_DR_MODE_HOST : USB_DR_MODE_PERIPHERAL;
>  
>  	return NOTIFY_DONE;
> @@ -329,7 +329,7 @@ static int dwc3_qcom_usb_role_switch_set(struct usb_role_switch *sw,
>  
>  	qcom->mode = (role == USB_ROLE_HOST) ? USB_DR_MODE_HOST :
>  					       USB_DR_MODE_PERIPHERAL;
> -	dwc3_qcom_vbus_overrride_enable(qcom, enable);
> +	dwc3_qcom_vbus_override_enable(qcom, enable);
>  	return 0;
>  }
>  
> @@ -917,7 +917,7 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
>  
>  	/* enable vbus override for device mode */
>  	if (qcom->mode == USB_DR_MODE_PERIPHERAL)
> -		dwc3_qcom_vbus_overrride_enable(qcom, true);
> +		dwc3_qcom_vbus_override_enable(qcom, true);
>  
>  	if (dwc3_qcom_find_usb_connector(pdev)) {
>  		ret = dwc3_qcom_setup_role_switch(qcom);
> -- 
> 2.30.1
>