linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kyle Tso <kyletso@google.com>
To: linux@roeck-us.net, heikki.krogerus@linux.intel.com,
	gregkh@linuxfoundation.org, robh+dt@kernel.org
Cc: badhri@google.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Kyle Tso <kyletso@google.com>
Subject: [PATCH v2 0/2] TCPM non-pd mode
Date: Tue, 27 Jul 2021 23:13:05 +0800	[thread overview]
Message-ID: <20210727151307.2178352-1-kyletso@google.com> (raw)

The reason for this patch is to let the device/system policy decide
whether PD is going to be supported using devicetree properties.

A new dt property "pd-supported" is introduced and TCPM uses this
property as a flag to decide whether PD is supported. If the flag is
false, the RX functionality of the low-level driver will not be enabled.
The power negotiation related states will be skipped as well. If the
flag is true, everything is as what it was before.

If "pd-supported" is not present, and the port is SRC or DRP, another
existing dt property "typec-power-opmode" needs to be specified to
indicate which Rp value should be used when the port is SRC.

changes since v1:
- revise the patch to use dt properties

Kyle Tso (2):
  dt-bindings: connector: Add pd-supported property
  usb: typec: tcpm: Support non-PD mode

 .../bindings/connector/usb-connector.yaml     |   5 +
 drivers/usb/typec/tcpm/tcpm.c                 | 108 +++++++++++++-----
 2 files changed, 84 insertions(+), 29 deletions(-)

-- 
2.32.0.432.gabb21c7263-goog


             reply	other threads:[~2021-07-27 15:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27 15:13 Kyle Tso [this message]
2021-07-27 15:13 ` [PATCH v2 1/2] dt-bindings: connector: Add pd-supported property Kyle Tso
2021-07-27 16:29   ` Guenter Roeck
2021-07-27 15:13 ` [PATCH v2 2/2] usb: typec: tcpm: Support non-PD mode Kyle Tso
2021-07-27 22:46   ` Guenter Roeck
2021-07-28  2:11     ` Kyle Tso

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=20210727151307.2178352-1-kyletso@google.com \
    --to=kyletso@google.com \
    --cc=badhri@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh+dt@kernel.org \
    --subject='Re: [PATCH v2 0/2] TCPM non-pd mode' \
    /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

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).