From: Sergei Shtylyov <sergei.shtylyov@gmail.com>
To: "Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Andy Gross" <agross@kernel.org>,
"Bjorn Andersson" <andersson@kernel.org>,
"Konrad Dybcio" <konrad.dybcio@linaro.org>,
"Hans de Goede" <hdegoede@redhat.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Mark Gross" <markgross@kernel.org>,
"Heikki Krogerus" <heikki.krogerus@linux.intel.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
platform-driver-x86@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH 2/2] usb: typec: tcpm: Parse Accessory Mode information
Date: Tue, 21 Nov 2023 12:24:27 +0300 [thread overview]
Message-ID: <1421f23b-20c5-dbdd-8964-4c4cb37b1a96@gmail.com> (raw)
In-Reply-To: <20231120231757.2309482-3-dmitry.baryshkov@linaro.org>
On 11/21/23 2:11 AM, Dmitry Baryshkov wrote:
> Some of the boards supported by the TCPM drivers can support USB-C
> Accessory Modes (Analog Audio, Debug). Parse information about supported
> modes from the device tree.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> drivers/usb/typec/tcpm/tcpm.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> index 6e843c511b85..6297f803de53 100644
> --- a/drivers/usb/typec/tcpm/tcpm.c
> +++ b/drivers/usb/typec/tcpm/tcpm.c
> @@ -6114,6 +6114,7 @@ static int tcpm_fw_get_caps(struct tcpm_port *port,
> {
> const char *opmode_str;
> int ret;
> + int mode;
> u32 mw, frs_current;
>
> if (!fwnode)
> @@ -6132,6 +6133,12 @@ static int tcpm_fw_get_caps(struct tcpm_port *port,
> if (ret < 0)
> return ret;
>
> + if (fwnode_property_read_bool(fwnode, "accessory-mode-audio"))
> + port->typec_caps.accessory[mode++] = TYPEC_ACCESSORY_AUDIO;
> +
> + if (fwnode_property_read_bool(fwnode, "accessory-mode-debug"))
> + port->typec_caps.accessory[mode++] = TYPEC_ACCESSORY_DEBUG;
> +
Hm, I don't see where that mode variable is initialized?
[...]
MBR, Sergey
prev parent reply other threads:[~2023-11-21 9:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-20 23:11 [PATCH 0/2] usb: typec: tcpm: Handle Accessory Modes Dmitry Baryshkov
2023-11-20 23:11 ` [PATCH 1/2] dt-bindings: connector: usb: add accessory mode description Dmitry Baryshkov
2023-11-20 23:11 ` [PATCH 2/2] usb: typec: tcpm: Parse Accessory Mode information Dmitry Baryshkov
2023-11-21 9:24 ` Sergei Shtylyov [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=1421f23b-20c5-dbdd-8964-4c4cb37b1a96@gmail.com \
--to=sergei.shtylyov@gmail.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@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 NNTP newsgroup(s).