linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kyle Tso <kyletso@google.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Greg KH <gregkh@linuxfoundation.org>,
	Hans de Goede <hdegoede@redhat.com>,
	robh+dt@kernel.org, Badhri Jagan Sridharan <badhri@google.com>,
	USB <linux-usb@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v4 3/8] usb: pd: Make SVDM Version configurable in VDM header
Date: Tue, 2 Feb 2021 22:52:21 +0800	[thread overview]
Message-ID: <CAGZ6i=1dQrT89GpC=zxRnUae1ee40djiqYRWwQu9irheJuCcsQ@mail.gmail.com> (raw)
In-Reply-To: <029f8d48-8932-8a2c-4edf-df73d66b21b5@roeck-us.net>

On Tue, Feb 2, 2021 at 10:50 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> On 2/2/21 1:33 AM, Kyle Tso wrote:
> > PD Rev 3.0 introduces SVDM Version 2.0. This patch makes the field
> > configuable in the header in order to be able to be compatible with
> > older SVDM version.
> >
> > Signed-off-by: Kyle Tso <kyletso@google.com>
> > ---
> >  include/linux/usb/pd_vdo.h | 7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/linux/usb/pd_vdo.h b/include/linux/usb/pd_vdo.h
> > index e9b6822c54c2..69ed6929ce6e 100644
> > --- a/include/linux/usb/pd_vdo.h
> > +++ b/include/linux/usb/pd_vdo.h
> > @@ -21,22 +21,24 @@
> >   * ----------
> >   * <31:16>  :: SVID
> >   * <15>     :: VDM type ( 1b == structured, 0b == unstructured )
> > - * <14:13>  :: Structured VDM version (can only be 00 == 1.0 currently)
> > + * <14:13>  :: Structured VDM version
> >   * <12:11>  :: reserved
> >   * <10:8>   :: object position (1-7 valid ... used for enter/exit mode only)
> >   * <7:6>    :: command type (SVDM only?)
> >   * <5>      :: reserved (SVDM), command type (UVDM)
> >   * <4:0>    :: command
> >   */
> > -#define VDO(vid, type, custom)                               \
> > +#define VDO(vid, type, ver, custom)                  \
> >       (((vid) << 16) |                                \
> >        ((type) << 15) |                               \
> > +      ((ver) << 13) |                                \
> >        ((custom) & 0x7FFF))
> >
>
> Yu have to fix all users of VDO() as well, or the code will
> no longer compile after this patch.
>
> Guenter
>
That's right!
Fix incoming...

thanks,
Kyle

  reply	other threads:[~2021-02-02 14:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02  9:33 [PATCH v4 0/8] common SVDM version and VDO from dt Kyle Tso
2021-02-02  9:33 ` [PATCH v4 1/8] usb: typec: Manage SVDM version Kyle Tso
2021-02-02  9:33 ` [PATCH v4 2/8] usb: pd: Update VDO definitions Kyle Tso
2021-02-02  9:33 ` [PATCH v4 3/8] usb: pd: Make SVDM Version configurable in VDM header Kyle Tso
2021-02-02 14:50   ` Guenter Roeck
2021-02-02 14:52     ` Kyle Tso [this message]
2021-02-02  9:33 ` [PATCH v4 4/8] usb: typec: tcpm: Detemine common SVDM Version Kyle Tso
2021-02-02  9:33 ` [PATCH v4 5/8] usb: typec: ucsi: " Kyle Tso
2021-02-02  9:33 ` [PATCH v4 6/8] usb: typec: displayport: Fill the negotiated SVDM Version in the header Kyle Tso
2021-02-02  9:33 ` [PATCH v4 7/8] dt-bindings: connector: Add SVDM VDO properties Kyle Tso
2021-02-02  9:33 ` [PATCH v4 8/8] usb: typec: tcpm: Get Sink VDO from fwnode 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='CAGZ6i=1dQrT89GpC=zxRnUae1ee40djiqYRWwQu9irheJuCcsQ@mail.gmail.com' \
    --to=kyletso@google.com \
    --cc=badhri@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --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 \
    /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).