From: Guenter Roeck <linux@roeck-us.net>
To: Badhri Jagan Sridharan <badhri@google.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Rob Herring <robh+dt@kernel.org>,
Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, Kyle Tso <kyletso@google.com>
Subject: Re: [PATCH v1 3/6] usb: typec: tcpm: update power supply once partner accepts
Date: Mon, 5 Apr 2021 18:57:34 -0700 [thread overview]
Message-ID: <83eeff38-c990-2797-e950-b3466cdd2ff6@roeck-us.net> (raw)
In-Reply-To: <20210406013643.3280369-4-badhri@google.com>
On 4/5/21 6:36 PM, Badhri Jagan Sridharan wrote:
> power_supply_changed needs to be called to notify clients
> after the partner accepts the requested values for the pps
> case.
>
> Fixes: f2a8aa053c176 ("typec: tcpm: Represent source supply through power_supply")
> Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
> ---
> drivers/usb/typec/tcpm/tcpm.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> index d43774cc2ccf..7708b01009cb 100644
> --- a/drivers/usb/typec/tcpm/tcpm.c
> +++ b/drivers/usb/typec/tcpm/tcpm.c
> @@ -2564,6 +2564,7 @@ static void tcpm_pd_ctrl_request(struct tcpm_port *port,
> port->pps_data.max_curr = port->pps_data.req_max_curr;
> port->req_supply_voltage = port->pps_data.req_out_volt;
> port->req_current_limit = port->pps_data.req_op_curr;
> + power_supply_changed(port->psy);
> tcpm_set_state(port, SNK_TRANSITION_SINK, 0);
> break;
> case SOFT_RESET_SEND:
> @@ -3132,7 +3133,6 @@ static unsigned int tcpm_pd_select_pps_apdo(struct tcpm_port *port)
> port->pps_data.req_out_volt));
> port->pps_data.req_op_curr = min(port->pps_data.max_curr,
> port->pps_data.req_op_curr);
> - power_supply_changed(port->psy);
> }
>
> return src_pdo;
> @@ -3557,8 +3557,6 @@ static void tcpm_reset_port(struct tcpm_port *port)
> port->sink_cap_done = false;
> if (port->tcpc->enable_frs)
> port->tcpc->enable_frs(port->tcpc, false);
> -
> - power_supply_changed(port->psy);
The reason for this change is missing in the patch description,
or am I missing something ?
Thanks,
Guenter
> }
>
> static void tcpm_detach(struct tcpm_port *port)
>
next prev parent reply other threads:[~2021-04-06 1:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-06 1:36 [PATCH v1 0/6] Fixes for tcpm-source-psy- and pSnkStby Badhri Jagan Sridharan
2021-04-06 1:36 ` [PATCH v1 1/6] usb: typec: tcpm: Address incorrect values of tcpm psy for fixed supply Badhri Jagan Sridharan
2021-04-06 1:56 ` Guenter Roeck
2021-04-07 16:04 ` Adam Thomson
2021-04-07 20:13 ` Badhri Jagan Sridharan
2021-04-06 1:36 ` [PATCH v1 2/6] usb: typec: tcpm: Address incorrect values of tcpm psy for pps supply Badhri Jagan Sridharan
2021-04-06 14:14 ` Greg Kroah-Hartman
2021-04-07 16:07 ` Adam Thomson
2021-04-07 20:12 ` Badhri Jagan Sridharan
2021-04-06 1:36 ` [PATCH v1 3/6] usb: typec: tcpm: update power supply once partner accepts Badhri Jagan Sridharan
2021-04-06 1:57 ` Guenter Roeck [this message]
2021-04-07 16:08 ` Adam Thomson
2021-04-07 20:11 ` Badhri Jagan Sridharan
2021-04-06 1:36 ` [PATCH v1 4/6] usb: typec: tcpm: Honour pSnkStdby requirement during negotiation Badhri Jagan Sridharan
2021-04-06 1:36 ` [PATCH v1 5/6] usb: typec: tcpm: Allow slow charging loops to comply to pSnkStby Badhri Jagan Sridharan
2021-04-06 1:36 ` [PATCH v1 6/6] Documentation: connector: Add slow-charger-loop definition 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=83eeff38-c990-2797-e950-b3466cdd2ff6@roeck-us.net \
--to=linux@roeck-us.net \
--cc=Adam.Thomson.Opensource@diasemi.com \
--cc=badhri@google.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=kyletso@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=robh+dt@kernel.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).