mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Mats Karrman <mats.dev.list@gmail.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jun Li <jun.li@nxp.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v4 2/8] usb: typec: helper for checking cable plug orientation
Date: Wed, 13 Jun 2018 15:33:48 +0300	[thread overview]
Message-ID: <20180613123348.GB2847@kuha.fi.intel.com> (raw)
In-Reply-To: <20180612221842.GA16275@roeck-us.net>

On Tue, Jun 12, 2018 at 03:18:42PM -0700, Guenter Roeck wrote:
> On Tue, Jun 12, 2018 at 08:56:31PM +0200, Mats Karrman wrote:
> > Hi Heikki,
> > 
> > On 2018-06-08 13:29, Heikki Krogerus wrote:
> > 
> > >This adds function typec_get_orientation() that can be used
> > >for checking the current cable plug orientation.
> > >
> > >Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> > >---
> > >  drivers/usb/typec/class.c | 11 +++++++++++
> > >  include/linux/usb/typec.h |  1 +
> > >  2 files changed, 12 insertions(+)
> > >
> > >diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
> > >index 53df10df2f9d..02db9bcbac0c 100644
> > >--- a/drivers/usb/typec/class.c
> > >+++ b/drivers/usb/typec/class.c
> > >@@ -1279,6 +1279,17 @@ int typec_set_orientation(struct typec_port *port,
> > >  }
> > >  EXPORT_SYMBOL_GPL(typec_set_orientation);
> > >+/**
> > >+ * typec_get_orientation - Get USB Type-C cable plug orientation
> > >+ * @port: USB Type-C Port
> > >+ *
> > >+ * Get current cable plug orientation for @port.
> > >+ */
> > >+enum typec_orientation typec_get_orientation(struct typec_port *port)
> > >+{
> > >+	return port->orientation;
> > >+}
> > 
> > +EXPORT_SYMBOL_GPL(typec_get_orientation);
> > 
> > Isn't this a candidate for an inline?
> > 
> 
> Currently struct typec_port is class private. To make this function inline,
> struct typec_port would have to be moved from drivers/usb/typec/class.c to
> include/linux/usb/typec.h. That doesn't sound like a good idea to me.

Yes, let's keep the structure protected.

But thanks for the report, I'll fix it.


Br,

-- 
heikki

  reply	other threads:[~2018-06-13 12:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 11:29 [RFC PATCH v4 0/8] usb: typec: Support for Alternate Modes Heikki Krogerus
2018-06-08 11:29 ` [RFC PATCH v4 1/8] usb: pd: include kernel.h Heikki Krogerus
2018-06-11  7:08   ` Greg Kroah-Hartman
2018-06-11  8:51     ` Heikki Krogerus
2018-06-08 11:29 ` [RFC PATCH v4 2/8] usb: typec: helper for checking cable plug orientation Heikki Krogerus
2018-06-12 18:56   ` Mats Karrman
2018-06-12 22:18     ` Guenter Roeck
2018-06-13 12:33       ` Heikki Krogerus [this message]
2018-06-08 11:29 ` [RFC PATCH v4 3/8] usb: typec: mux: Get the mux identifier from function parameter Heikki Krogerus
2018-06-08 11:29 ` [RFC PATCH v4 4/8] usb: typec: Register a device for every mode Heikki Krogerus
2018-06-08 11:29 ` [RFC PATCH v4 5/8] usb: typec: Bus type for alternate modes Heikki Krogerus
2018-06-08 11:29 ` [RFC PATCH v4 6/8] usb: typec: Add driver for DisplayPort alternate mode Heikki Krogerus
2018-06-08 14:04   ` Heikki Krogerus
2018-06-08 11:29 ` [RFC PATCH v4 7/8] usb: typec: pi3usb30532: Start using generic state values Heikki Krogerus
2018-06-08 17:51   ` Sergei Shtylyov
2018-06-08 11:29 ` [RFC PATCH v4 8/8] usb: typec: tcpm: Support for Alternate Modes 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=20180613123348.GB2847@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=jun.li@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mats.dev.list@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®