From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 5/5] usb: typec: ucsi: glink: set orientation aware if supported
Date: Mon, 15 Apr 2024 10:08:15 +0300 [thread overview]
Message-ID: <ZhzSX0z7Ofl0I93+@kuha.fi.intel.com> (raw)
In-Reply-To: <20240411-ucsi-orient-aware-v2-5-d4b1cb22a33f@linaro.org>
On Thu, Apr 11, 2024 at 07:49:57AM +0300, Dmitry Baryshkov wrote:
> If the PMIC-GLINK device has orientation GPIOs declared, then it will
> report connection orientation. In this case set the flag to mark
> registered ports as orientation-aware.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/ucsi/ucsi_glink.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/usb/typec/ucsi/ucsi_glink.c b/drivers/usb/typec/ucsi/ucsi_glink.c
> index d279e2cf9bba..f7546bb488c3 100644
> --- a/drivers/usb/typec/ucsi/ucsi_glink.c
> +++ b/drivers/usb/typec/ucsi/ucsi_glink.c
> @@ -186,6 +186,17 @@ static int pmic_glink_ucsi_sync_write(struct ucsi *__ucsi, unsigned int offset,
> return ret;
> }
>
> +static void pmic_glink_ucsi_update_connector(struct ucsi_connector *con)
> +{
> + struct pmic_glink_ucsi *ucsi = ucsi_get_drvdata(con->ucsi);
> + int i;
> +
> + for (i = 0; i < PMIC_GLINK_MAX_PORTS; i++) {
> + if (ucsi->port_orientation[i])
> + con->typec_cap.orientation_aware = true;
> + }
> +}
> +
> static void pmic_glink_ucsi_connector_status(struct ucsi_connector *con)
> {
> struct pmic_glink_ucsi *ucsi = ucsi_get_drvdata(con->ucsi);
> @@ -208,6 +219,7 @@ static const struct ucsi_operations pmic_glink_ucsi_ops = {
> .read = pmic_glink_ucsi_read,
> .sync_write = pmic_glink_ucsi_sync_write,
> .async_write = pmic_glink_ucsi_async_write,
> + .update_connector = pmic_glink_ucsi_update_connector,
> .connector_status = pmic_glink_ucsi_connector_status,
> };
>
>
> --
> 2.39.2
--
heikki
prev parent reply other threads:[~2024-04-15 7:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-11 4:49 [PATCH v2 0/5] usb: typec: ucsi: glink: rework orientation handling Dmitry Baryshkov
2024-04-11 4:49 ` [PATCH v2 1/5] usb: typec: ucsi: add callback for connector status updates Dmitry Baryshkov
2024-04-15 6:57 ` Heikki Krogerus
2024-04-11 4:49 ` [PATCH v2 2/5] usb: typec: ucsi: glink: move GPIO reading into connector_status callback Dmitry Baryshkov
2024-04-15 6:58 ` Heikki Krogerus
2024-04-11 4:49 ` [PATCH v2 3/5] usb: typec: ucsi: glink: use typec_set_orientation Dmitry Baryshkov
2024-04-15 6:59 ` Heikki Krogerus
2024-04-11 4:49 ` [PATCH v2 4/5] usb: typec: ucsi: add update_connector callback Dmitry Baryshkov
2024-04-15 7:03 ` Heikki Krogerus
2024-04-11 4:49 ` [PATCH v2 5/5] usb: typec: ucsi: glink: set orientation aware if supported Dmitry Baryshkov
2024-04-15 7:08 ` Heikki Krogerus [this message]
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=ZhzSX0z7Ofl0I93+@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=neil.armstrong@linaro.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