All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Ajay Gupta <ajayg@nvidia.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Michael Hsu <mhsu@nvidia.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: [5/5] usb: typec: ucsi: Support for DisplayPort alt mode
Date: Wed, 6 Feb 2019 10:46:21 +0200	[thread overview]
Message-ID: <20190206084621.GE27830@kuha.fi.intel.com> (raw)

Hi Ajay,

On Tue, Feb 05, 2019 at 07:24:49PM +0000, Ajay Gupta wrote:
> > +static int ucsi_displayport_configure(struct ucsi_dp *dp) {
> > +	u32 pins = DP_CONF_GET_PIN_ASSIGN(dp->data.conf);
> > +	struct ucsi_control ctrl;
> > +
> > +	if (!dp->override)
> > +		return 0;
> > +
> > +	ctrl.raw_cmd = UCSI_CMD_SET_NEW_CAM(dp->con->num, 1, dp-
> > >offset,
> > +pins);
> If previous CAM is active at this point then we should exit before setting new
> CAM. Please add something like :
> 
> +	if (!dp->override)
> +		return 0;
> 
>         UCSI_CMD_GET_CURRENT_CAM(ctrl, dp->con->num);
>         ret = ucsi_send_command(dp->con->ucsi, &ctrl, &cur, sizeof(cur));
>         while ((cur != 0xff) && (cur != dp->offset)) {
>                 ctrl.raw_cmd = UCSI_CMD_SET_NEW_CAM(dp->con->num, 0, cur, 0);
>                 ret = ucsi_send_command(dp->con->ucsi, &ctrl, NULL, 0);
>                 UCSI_CMD_GET_CURRENT_CAM(ctrl, dp->con->num);
>                 ret = ucsi_send_command(dp->con->ucsi, &ctrl, &cur, sizeof(cur));
>         }
> +	ctrl.raw_cmd = UCSI_CMD_SET_NEW_CAM(dp->con->num, 1, dp-

I'll take a look at this before preparing the next version.


thanks,

             reply	other threads:[~2019-02-06  8:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-06  8:46 Heikki Krogerus [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-02-06  8:32 [5/5] usb: typec: ucsi: Support for DisplayPort alt mode Heikki Krogerus
2019-02-05 19:24 Ajay Gupta
2019-02-05  1:03 Ajay Gupta
2019-02-01 10:47 Heikki Krogerus

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=20190206084621.GE27830@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=ajayg@nvidia.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mhsu@nvidia.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.