public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: "Peter Chen (CIX)" <peter.chen@kernel.org>
To: Xu Yang <xu.yang_2@nxp.com>
Cc: gregkh@linuxfoundation.org, shawnguo@kernel.org,
	s.hauer@pengutronix.d, kernel@pengutronix.de, festevam@gmail.com,
	jun.li@nxp.com, linux-usb@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/3] usb: chipidea: imx: add imx_usbmisc_pullup() hook
Date: Wed, 18 Jun 2025 18:36:12 +0800	[thread overview]
Message-ID: <20250618103612.GC34284@nchen-desktop> (raw)
In-Reply-To: <20250614125645.207732-3-xu.yang_2@nxp.com>

On 25-06-14 20:56:44, Xu Yang wrote:
> It's used to do other pullup related operations if needs.
> 
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>

Acked-by: Peter Chen <peter.chen@kernel.org>

Peter
> ---
>  drivers/usb/chipidea/ci_hdrc_imx.h |  1 +
>  drivers/usb/chipidea/usbmisc_imx.c | 18 ++++++++++++++++++
>  2 files changed, 19 insertions(+)
> 
> diff --git a/drivers/usb/chipidea/ci_hdrc_imx.h b/drivers/usb/chipidea/ci_hdrc_imx.h
> index 88b8da79d518..cb95c84d0322 100644
> --- a/drivers/usb/chipidea/ci_hdrc_imx.h
> +++ b/drivers/usb/chipidea/ci_hdrc_imx.h
> @@ -37,5 +37,6 @@ int imx_usbmisc_hsic_set_connect(struct imx_usbmisc_data *data);
>  int imx_usbmisc_charger_detection(struct imx_usbmisc_data *data, bool connect);
>  int imx_usbmisc_suspend(struct imx_usbmisc_data *data, bool wakeup);
>  int imx_usbmisc_resume(struct imx_usbmisc_data *data, bool wakeup);
> +int imx_usbmisc_pullup(struct imx_usbmisc_data *data, bool on);
>  
>  #endif /* __DRIVER_USB_CHIPIDEA_CI_HDRC_IMX_H */
> diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c
> index 118b9a68496b..9db67d6d0ec4 100644
> --- a/drivers/usb/chipidea/usbmisc_imx.c
> +++ b/drivers/usb/chipidea/usbmisc_imx.c
> @@ -170,6 +170,9 @@ struct usbmisc_ops {
>  	int (*charger_detection)(struct imx_usbmisc_data *data);
>  	/* It's called when system resume from usb power lost */
>  	int (*power_lost_check)(struct imx_usbmisc_data *data);
> +	/* It's called when device controller changed pullup status */
> +	void (*pullup)(struct imx_usbmisc_data *data, bool on);
> +	/* It's called during suspend/resume to save power */
>  	void (*vbus_comparator_on)(struct imx_usbmisc_data *data, bool on);
>  };
>  
> @@ -1225,6 +1228,21 @@ int imx_usbmisc_charger_detection(struct imx_usbmisc_data *data, bool connect)
>  }
>  EXPORT_SYMBOL_GPL(imx_usbmisc_charger_detection);
>  
> +int imx_usbmisc_pullup(struct imx_usbmisc_data *data, bool on)
> +{
> +	struct imx_usbmisc *usbmisc;
> +
> +	if (!data)
> +		return 0;
> +
> +	usbmisc = dev_get_drvdata(data->dev);
> +	if (usbmisc->ops->pullup)
> +		usbmisc->ops->pullup(data, on);
> +
> +	return 0;
> +}
> +EXPORT_SYMBOL_GPL(imx_usbmisc_pullup);
> +
>  int imx_usbmisc_suspend(struct imx_usbmisc_data *data, bool wakeup)
>  {
>  	struct imx_usbmisc *usbmisc;
> -- 
> 2.34.1
> 

-- 

Best regards,
Peter


  reply	other threads:[~2025-06-18 12:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-14 12:56 [PATCH 0/3] implement workaround for ERR051725 Xu Yang
2025-06-14 12:56 ` [PATCH 1/3] usb: chipidea: udc: add CI_HDRC_CONTROLLER_PULLUP_EVENT event Xu Yang
2025-06-18 10:35   ` Peter Chen (CIX)
2025-06-14 12:56 ` [PATCH 2/3] usb: chipidea: imx: add imx_usbmisc_pullup() hook Xu Yang
2025-06-18 10:36   ` Peter Chen (CIX) [this message]
2025-06-14 12:56 ` [PATCH 3/3] usb: chipidea: imx: implement workaround for ERR051725 Xu Yang
2025-06-18 10:40   ` Peter Chen (CIX)
2025-06-17  8:19 ` [PATCH 0/3] " Peter Chen (CIX)
2025-06-18  6:06   ` Xu Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250618103612.GC34284@nchen-desktop \
    --to=peter.chen@kernel.org \
    --cc=festevam@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=imx@lists.linux.dev \
    --cc=jun.li@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=s.hauer@pengutronix.d \
    --cc=shawnguo@kernel.org \
    --cc=xu.yang_2@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox