From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: lucas_tsai@richtek.com
Cc: badhri@google.com, cy_huang@richtek.com,
gregkh@linuxfoundation.org, kevin_hung@richtek.com,
linux-usb@vger.kernel.org, ren_chen@richtek.com
Subject: Re: [PATCH 3/3] usb: typec: tcpci_rt1711h: add low power mode support
Date: Fri, 5 Jun 2026 16:03:38 +0300 [thread overview]
Message-ID: <aiLJKjtKMmjxdyyI@kuha> (raw)
In-Reply-To: <20260603031827.3692374-1-lucas_tsai@richtek.com>
On Wed, Jun 03, 2026 at 11:18:27AM +0800, lucas_tsai@richtek.com wrote:
> On Mon, Jun 01, 2026 at 04:36:02PM +0300, Heikki Krogerus wrote:
> > Hi,
> >
> > I'm sorry to keep you waiting.
> >
> > On Mon, May 18, 2026 at 05:15:14PM +0800, cy_huang@richtek.com wrote:
> > > From: Lucas Tsai <lucas_tsai@richtek.com>
> > >
> > > Add low power mode support,
> > > add the op to enter and exit low power mode,
> > > this mode reduce RT1711H/RT1715 VDD Iq to 1 of 10,
> >
> > What is VDD Iq?
> >
>
> VDD pin is RT1715's power input,
> and Iq is the quiescent current,
> so the low power mode reduces the baseline power used by RT1715.
Got it, thanks. Please add that explanation to the commit message.
> > > while disabling VBUS detection and PD BMC
> > > but keeping CC detection and not affecting DRP toggling.
> > >
> > > Signed-off-by: Lucas Tsai <lucas_tsai@richtek.com>
> > > ---
> > > drivers/usb/typec/tcpm/tcpci_rt1711h.c | 14 ++++++++++++++
> > > 1 file changed, 14 insertions(+)
> > >
> > > diff --git a/drivers/usb/typec/tcpm/tcpci_rt1711h.c b/drivers/usb/typec/tcpm/tcpci_rt1711h.c
> > > index 4b3e4e22a82e..48d6a6823ab9 100644
> > > --- a/drivers/usb/typec/tcpm/tcpci_rt1711h.c
> > > +++ b/drivers/usb/typec/tcpm/tcpci_rt1711h.c
> > > @@ -20,6 +20,7 @@
> > >
> > > #define RT1711H_PHYCTRL1 0x80
> > > #define RT1711H_PHYCTRL2 0x81
> > > +#define RT1711H_BMCCTRL 0x90
> > >
> > > #define RT1711H_RTCTRL4 0x93
> > > /* rx threshold of rd/rp: 1b0 for level 0.4V/0.7V, 1b1 for 0.35V/0.75V */
> > > @@ -254,6 +255,18 @@ static int rt1711h_start_drp_toggling(struct tcpci *tcpci,
> > > return 0;
> > > }
> > >
> > > +static void rt1711h_set_low_power_mode(struct tcpci *tcpci,
> > > + struct tcpci_data *tdata, bool enable)
> > > +{
> > > + int ret;
> > > + struct rt1711h_chip *chip = tdata_to_rt1711h(tdata);
> > > +
> > > + ret = rt1711h_write8(chip, RT1711H_BMCCTRL, enable ? 0x08 : 0x07);
> > > + if (ret < 0)
> > > + dev_err(chip->dev, "%s lpm fail(%d)\n",
> > > + enable ? "enter" : "exit", ret);
> > > +}
> >
> > Why couldn't this just be done in the PM suspend and resume
> > callbacks for this driver?
>
> Entering low power mode or not relates directly to the status of USB-C port:
> enter low power mode when USB-C port attached nothing (unattached),
> and exit low power mode when attached with cable or device.
>
> In the other word, it is possible to have system suspended and USB-C
> port attached at the same time, so it is not suitable to bind the flow
> of low power mode to the PM suspend and resume.
You don't have to do that in the system suspend callback, but you
still should do this in the runtime suspend callback, no?
This is not a major thing, but mctp.c is a bit bloated, I want to make
sure that adding this kind of callbacks is really necessary.
Badhri, do you have time to check this series?
thanks,
--
heikki
next prev parent reply other threads:[~2026-06-05 13:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 9:15 [PATCH 0/3] add low power mode support for typec ic cy_huang
2026-05-18 9:15 ` [PATCH 1/3] usb: typec: tcpm: add low power mode support cy_huang
2026-06-06 16:37 ` Badhri Jagan Sridharan
2026-05-18 9:15 ` [PATCH 2/3] usb: typec: tcpci: " cy_huang
2026-05-18 9:15 ` [PATCH 3/3] usb: typec: tcpci_rt1711h: " cy_huang
2026-06-01 13:36 ` Heikki Krogerus
2026-06-03 3:18 ` lucas_tsai
2026-06-05 13:03 ` Heikki Krogerus [this message]
2026-06-06 16:20 ` Badhri Jagan Sridharan
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=aiLJKjtKMmjxdyyI@kuha \
--to=heikki.krogerus@linux.intel.com \
--cc=badhri@google.com \
--cc=cy_huang@richtek.com \
--cc=gregkh@linuxfoundation.org \
--cc=kevin_hung@richtek.com \
--cc=linux-usb@vger.kernel.org \
--cc=lucas_tsai@richtek.com \
--cc=ren_chen@richtek.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