* [PATCH] usb: typec: tcpci: Enable bleed discharge when auto discharge is enabled
@ 2020-12-11 7:11 Badhri Jagan Sridharan
2020-12-11 8:34 ` Heikki Krogerus
2020-12-11 15:14 ` Guenter Roeck
0 siblings, 2 replies; 3+ messages in thread
From: Badhri Jagan Sridharan @ 2020-12-11 7:11 UTC (permalink / raw)
To: Guenter Roeck, Heikki Krogerus, Greg Kroah-Hartman
Cc: linux-usb, linux-kernel, Badhri Jagan Sridharan
Auto discharge circuits kick in only when vbus decays and reaches
VBUS_SINK_DISCONNECT_THRESHOLD threshold. Enable bleed discharge to
discharge vbus to VBUS_SINK_DISCONNECT_THRESHOLD upon disconnect.
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
---
drivers/usb/typec/tcpm/tcpci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
index af5524338a63..f676abab044b 100644
--- a/drivers/usb/typec/tcpm/tcpci.c
+++ b/drivers/usb/typec/tcpm/tcpci.c
@@ -725,6 +725,8 @@ struct tcpci *tcpci_register_port(struct device *dev, struct tcpci_data *data)
tcpci->tcpc.enable_auto_vbus_discharge = tcpci_enable_auto_vbus_discharge;
tcpci->tcpc.set_auto_vbus_discharge_threshold =
tcpci_set_auto_vbus_discharge_threshold;
+ regmap_update_bits(tcpci->regmap, TCPC_POWER_CTRL, TCPC_POWER_CTRL_BLEED_DISCHARGE,
+ TCPC_POWER_CTRL_BLEED_DISCHARGE);
}
if (tcpci->data->vbus_vsafe0v)
--
2.29.2.576.ga3fc446d84-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] usb: typec: tcpci: Enable bleed discharge when auto discharge is enabled
2020-12-11 7:11 [PATCH] usb: typec: tcpci: Enable bleed discharge when auto discharge is enabled Badhri Jagan Sridharan
@ 2020-12-11 8:34 ` Heikki Krogerus
2020-12-11 15:14 ` Guenter Roeck
1 sibling, 0 replies; 3+ messages in thread
From: Heikki Krogerus @ 2020-12-11 8:34 UTC (permalink / raw)
To: Badhri Jagan Sridharan
Cc: Guenter Roeck, Greg Kroah-Hartman, linux-usb, linux-kernel
On Thu, Dec 10, 2020 at 11:11:45PM -0800, Badhri Jagan Sridharan wrote:
> Auto discharge circuits kick in only when vbus decays and reaches
> VBUS_SINK_DISCONNECT_THRESHOLD threshold. Enable bleed discharge to
> discharge vbus to VBUS_SINK_DISCONNECT_THRESHOLD upon disconnect.
>
> Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/tcpm/tcpci.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
> index af5524338a63..f676abab044b 100644
> --- a/drivers/usb/typec/tcpm/tcpci.c
> +++ b/drivers/usb/typec/tcpm/tcpci.c
> @@ -725,6 +725,8 @@ struct tcpci *tcpci_register_port(struct device *dev, struct tcpci_data *data)
> tcpci->tcpc.enable_auto_vbus_discharge = tcpci_enable_auto_vbus_discharge;
> tcpci->tcpc.set_auto_vbus_discharge_threshold =
> tcpci_set_auto_vbus_discharge_threshold;
> + regmap_update_bits(tcpci->regmap, TCPC_POWER_CTRL, TCPC_POWER_CTRL_BLEED_DISCHARGE,
> + TCPC_POWER_CTRL_BLEED_DISCHARGE);
> }
>
> if (tcpci->data->vbus_vsafe0v)
> --
> 2.29.2.576.ga3fc446d84-goog
--
heikki
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] usb: typec: tcpci: Enable bleed discharge when auto discharge is enabled
2020-12-11 7:11 [PATCH] usb: typec: tcpci: Enable bleed discharge when auto discharge is enabled Badhri Jagan Sridharan
2020-12-11 8:34 ` Heikki Krogerus
@ 2020-12-11 15:14 ` Guenter Roeck
1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2020-12-11 15:14 UTC (permalink / raw)
To: Badhri Jagan Sridharan, Heikki Krogerus, Greg Kroah-Hartman
Cc: linux-usb, linux-kernel
On 12/10/20 11:11 PM, Badhri Jagan Sridharan wrote:
> Auto discharge circuits kick in only when vbus decays and reaches
> VBUS_SINK_DISCONNECT_THRESHOLD threshold. Enable bleed discharge to
> discharge vbus to VBUS_SINK_DISCONNECT_THRESHOLD upon disconnect.
>
> Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/usb/typec/tcpm/tcpci.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
> index af5524338a63..f676abab044b 100644
> --- a/drivers/usb/typec/tcpm/tcpci.c
> +++ b/drivers/usb/typec/tcpm/tcpci.c
> @@ -725,6 +725,8 @@ struct tcpci *tcpci_register_port(struct device *dev, struct tcpci_data *data)
> tcpci->tcpc.enable_auto_vbus_discharge = tcpci_enable_auto_vbus_discharge;
> tcpci->tcpc.set_auto_vbus_discharge_threshold =
> tcpci_set_auto_vbus_discharge_threshold;
> + regmap_update_bits(tcpci->regmap, TCPC_POWER_CTRL, TCPC_POWER_CTRL_BLEED_DISCHARGE,
> + TCPC_POWER_CTRL_BLEED_DISCHARGE);
> }
>
> if (tcpci->data->vbus_vsafe0v)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-11 16:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-11 7:11 [PATCH] usb: typec: tcpci: Enable bleed discharge when auto discharge is enabled Badhri Jagan Sridharan
2020-12-11 8:34 ` Heikki Krogerus
2020-12-11 15:14 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).