<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/typec/class.c, branch v5.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-06-03T08:55:38Z</updated>
<entry>
<title>usb: typec: Registering real device entries for the muxes</title>
<updated>2019-06-03T08:55:38Z</updated>
<author>
<name>Heikki Krogerus</name>
<email>heikki.krogerus@linux.intel.com</email>
</author>
<published>2019-05-31T14:15:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3370db35193b241ba5836a66df6ec1a559108389'/>
<id>urn:sha1:3370db35193b241ba5836a66df6ec1a559108389</id>
<content type='text'>
Registering real device entries (struct device) for the mode
muxes as well as for the orientation switches.

The Type-C mux code was deliberately attempting to avoid
creation of separate device entries for the orientation
switch and the mode switch (alternate modes) because they
are not physical devices. They are functions of a single
physical multiplexer/demultiplexer switch device.

Unfortunately because of the dependency we still have on the
underlying mux device driver, we had to put in hacks like
the one in the commit 3e3b81965cbf ("usb: typec: mux: Take
care of driver module reference counting") to make sure the
driver does not disappear from underneath us. Even with
those hacks we were still left with a potential NUll pointer
dereference scenario, so just creating the device entries,
and letting the core take care of the dependencies. No more
hacks needed.

Signed-off-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Tested-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>usb: typec: Find the ports by also matching against the device node</title>
<updated>2019-02-14T09:52:25Z</updated>
<author>
<name>Heikki Krogerus</name>
<email>heikki.krogerus@linux.intel.com</email>
</author>
<published>2019-02-13T07:45:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6a0bbcf96b2273f110a14d11a5952527c5921191'/>
<id>urn:sha1:6a0bbcf96b2273f110a14d11a5952527c5921191</id>
<content type='text'>
When the connections are defined in firmware, struct
device_connection will have the fwnode member pointing to
the device node (struct fwnode_handle) of the requested
device, and the endpoint will not be used at all in that
case.

Acked-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Reviewed-by: Jun Li &lt;jun.li@nxp.com&gt;
Signed-off-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: Rationalize the API for the muxes</title>
<updated>2019-02-14T09:52:25Z</updated>
<author>
<name>Heikki Krogerus</name>
<email>heikki.krogerus@linux.intel.com</email>
</author>
<published>2019-02-13T07:45:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=540bfab7fbff6ab9092bb28aaf804af0b4d576ae'/>
<id>urn:sha1:540bfab7fbff6ab9092bb28aaf804af0b4d576ae</id>
<content type='text'>
Since with accessory modes there is no need for additional
identification when requesting a handle to the mux, we can
replace the second parameter that is passed to the
typec_mux_get() function with a pointer to alternate mode
description structure, and simply passing NULL with
accessory modes.

This change means the naming of the mux device connections
can be updated. Alternate and Accessory Modes will both be
handled with muxes named "mode-switch", and the orientation
switches will be named "orientation-switch".

Future identification of the alternate modes will be later
done using device property "svid" of the mux.

Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Reviewed-by: Jun Li &lt;jun.li@nxp.com&gt;
Signed-off-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: Prepare alt mode enter/exit reporting for UCSI alt mode support</title>
<updated>2019-02-08T09:25:12Z</updated>
<author>
<name>Heikki Krogerus</name>
<email>heikki.krogerus@linux.intel.com</email>
</author>
<published>2019-02-01T10:47:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b0fcdffdd6262d49d509a2945b2c2375a84f28af'/>
<id>urn:sha1:b0fcdffdd6262d49d509a2945b2c2375a84f28af</id>
<content type='text'>
Because of UCSI, we have to support alt mode enter/exit
reporting even when there is no alt mode driver bind to the
alt mode device. With UCSI a firmware handles the alternate
modes, and the modes are entered automatically from OS PoW.

Changing typec_altmode_update_active() so that the driver
module ref count is incremented/decremented only if there
really is a driver for the alt mode. That avoids a NULL
pointer dereference from happening when the driver is
missing.

Signed-off-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: Fix copy/paste on typec_set_vconn_role() kerneldoc</title>
<updated>2018-10-09T14:05:41Z</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2018-10-07T23:46:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f65861c645ceb59f7325f696f0e8fa195dde575d'/>
<id>urn:sha1:f65861c645ceb59f7325f696f0e8fa195dde575d</id>
<content type='text'>
This must have been copy pasted from the function above. Fix it.

Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Acked-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: class: Don't use port parent for getting mux handles</title>
<updated>2018-09-20T11:37:29Z</updated>
<author>
<name>Heikki Krogerus</name>
<email>heikki.krogerus@linux.intel.com</email>
</author>
<published>2018-09-20T11:23:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=23481121c81d984193edf1532f5e123637e50903'/>
<id>urn:sha1:23481121c81d984193edf1532f5e123637e50903</id>
<content type='text'>
It is not possible to use the parent of the port device when
requesting mux handles as the parent may be a multiport USB
Type-C or PD controller. The muxes must be assigned to the
ports, not the controllers.

This will also move the requesting of the muxes after the
port device is initialized.

Acked-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Tested-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: fix kernel-doc parameter warning</title>
<updated>2018-09-05T11:27:07Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2018-09-03T02:30:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=49aa5afda2ed9cf6a8819707014385ede895ff87'/>
<id>urn:sha1:49aa5afda2ed9cf6a8819707014385ede895ff87</id>
<content type='text'>
Fix kernel-doc warning (13 times):

../drivers/usb/typec/class.c:1497: warning: Excess function parameter 'drvdata' description in 'typec_port_register_altmode'

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: Bus type for alternate modes</title>
<updated>2018-07-02T15:42:36Z</updated>
<author>
<name>Heikki Krogerus</name>
<email>heikki.krogerus@linux.intel.com</email>
</author>
<published>2018-06-27T15:19:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8a37d87d72f0c69f837229c04d2fcd7117ea57e7'/>
<id>urn:sha1:8a37d87d72f0c69f837229c04d2fcd7117ea57e7</id>
<content type='text'>
Introducing a simple bus for the alternate modes. Bus allows
binding drivers to the discovered alternate modes the
partners support.

Signed-off-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Tested-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: Register a device for every mode</title>
<updated>2018-07-02T15:42:36Z</updated>
<author>
<name>Heikki Krogerus</name>
<email>heikki.krogerus@linux.intel.com</email>
</author>
<published>2018-06-27T15:19:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4ab8c18d4d67321cc7b660559de17511d4fc0237'/>
<id>urn:sha1:4ab8c18d4d67321cc7b660559de17511d4fc0237</id>
<content type='text'>
Before a device was created for every discovered SVID, but
this will create a device for every discovered mode of every
SVID. The idea is to make it easier to create mode specific
drivers once a bus for the alternate mode is added.

Signed-off-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Tested-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: mux: Get the mux identifier from function parameter</title>
<updated>2018-07-02T15:42:36Z</updated>
<author>
<name>Heikki Krogerus</name>
<email>heikki.krogerus@linux.intel.com</email>
</author>
<published>2018-06-27T15:19:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=93dd2112c7b2fa5512cc4aff2c449420487fcb68'/>
<id>urn:sha1:93dd2112c7b2fa5512cc4aff2c449420487fcb68</id>
<content type='text'>
In order for the muxes to be usable with alternate modes,
the alternate mode devices will need also to be able to get
a handle to the muxes on top of the port devices. To make
that possible, the muxes need to be possible to request with
an identifier.

This will change the API so that the mux identifier is given
as a function parameter to typec_mux_get(), and the hard-coded
"typec-mux" is replaced with that value.

Signed-off-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Tested-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
