<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/typec, branch v5.1</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.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-03-19T13:57:31Z</updated>
<entry>
<title>usb: typec: tcpm: Try PD-2.0 if sink does not respond to 3.0 source-caps</title>
<updated>2019-03-19T13:57:31Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2019-03-16T15:57:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=976daf9d1199932df80e7b04546d1a1bd4ed5ece'/>
<id>urn:sha1:976daf9d1199932df80e7b04546d1a1bd4ed5ece</id>
<content type='text'>
PD 2.0 sinks are supposed to accept src-capabilities with a 3.0 header and
simply ignore any src PDOs which the sink does not understand such as PPS
but some 2.0 sinks instead ignore the entire PD_DATA_SOURCE_CAP message,
causing contract negotiation to fail.

This commit fixes such sinks not working by re-trying the contract
negotiation with PD-2.0 source-caps messages if we don't have a contract
after PD_N_HARD_RESET_COUNT hard-reset attempts.

The problem fixed by this commit was noticed with a Type-C to VGA dongle.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: Fix unchecked return value</title>
<updated>2019-03-19T13:57:31Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2019-03-18T21:18:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e82adc1074a7356f1158233551df9e86b7ebfb82'/>
<id>urn:sha1:e82adc1074a7356f1158233551df9e86b7ebfb82</id>
<content type='text'>
Currently there is no check on platform_get_irq() return value
in case it fails, hence never actually reporting any errors and
causing unexpected behavior when using such value as argument
for function regmap_irq_get_virq().

Fix this by adding a proper check, a message error and return
*irq* in case platform_get_irq() fails.

Addresses-Coverity-ID: 1443899 ("Improper use of negative value")
Fixes: d2061f9cc32d ("usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&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: tps6598x: handle block writes separately with plain-I2C adapters</title>
<updated>2019-02-21T09:54:23Z</updated>
<author>
<name>Nikolaus Voss</name>
<email>nikolaus.voss@loewensteinmedical.de</email>
</author>
<published>2019-02-20T15:11:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8a863a608d47fa5d9dd15cf841817f73f804cf91'/>
<id>urn:sha1:8a863a608d47fa5d9dd15cf841817f73f804cf91</id>
<content type='text'>
Commit 1a2f474d328f handles block _reads_ separately with plain-I2C
adapters, but the problem described with regmap-i2c not handling
SMBus block transfers (i.e. read and writes) correctly also exists
with writes.

As workaround, this patch adds a block write function the same way
1a2f474d328f adds a block read function.

Fixes: 1a2f474d328f ("usb: typec: tps6598x: handle block reads separately with plain-I2C adapters")
Fixes: 0a4c005bd171 ("usb: typec: driver for TI TPS6598x USB Power Delivery controllers")
Signed-off-by: Nikolaus Voss &lt;nikolaus.voss@loewensteinmedical.de&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&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: mux: remove redundant check on variable match</title>
<updated>2019-02-20T10:29:01Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2019-02-19T13:43:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eb76b37aaf7e6bdd6638bf5b2ef29688645e03b8'/>
<id>urn:sha1:eb76b37aaf7e6bdd6638bf5b2ef29688645e03b8</id>
<content type='text'>
All the code paths that lead to the return statement are where
match is always true, hence the check to see if it is true is
redundant and can be removed.

Detected by CoverityScan, CID#14769672 ("Logically dead code")

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&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: mux: Fix unsigned comparison with less than zero</title>
<updated>2019-02-19T13:26:45Z</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2019-02-19T06:57:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4e46f271c37415323f2b650d02ef50c87ff8d092'/>
<id>urn:sha1:4e46f271c37415323f2b650d02ef50c87ff8d092</id>
<content type='text'>
The return from the call to fwnode_property_read_u16_array is int,
it can be a negative error code however this is being assigned to
an size_t variable 'nval', hence the check is always false.
Fix this by making 'nval' an int.

Detected by Coccinelle ("Unsigned expression compared with
zero: nval &lt; 0")

Fixes: 96a6d031ca99 ("usb: typec: mux: Find the muxes by also matching against the device node")
Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&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: mux: Find the muxes by also matching against the device node</title>
<updated>2019-02-14T09:52:26Z</updated>
<author>
<name>Heikki Krogerus</name>
<email>heikki.krogerus@linux.intel.com</email>
</author>
<published>2019-02-13T07:45:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=96a6d031ca9930938bd66d0052fc7ed2b56e3583'/>
<id>urn:sha1:96a6d031ca9930938bd66d0052fc7ed2b56e3583</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: 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: tps6598x: Check mode of operation</title>
<updated>2019-02-14T09:48:44Z</updated>
<author>
<name>Heikki Krogerus</name>
<email>heikki.krogerus@linux.intel.com</email>
</author>
<published>2019-02-13T16:36:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a043ad87a78f9cfb5ccd80f448e4e76b50546ad2'/>
<id>urn:sha1:a043ad87a78f9cfb5ccd80f448e4e76b50546ad2</id>
<content type='text'>
To prevent loading of the driver when the PD controller is
still in some operational mode that the driver does not
support, checking the mode in driver probe callback
function.

TI PD controllers may be in undefined mode of operation
for example when the application code (firmware) is
completely 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: tcpm: Remove unused functions</title>
<updated>2019-02-13T18:40:20Z</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2019-02-12T15:58:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c17c7cf147ac56312156eaaaf8b2e19c9a59a71a'/>
<id>urn:sha1:c17c7cf147ac56312156eaaaf8b2e19c9a59a71a</id>
<content type='text'>
tcpm_update_source_capabilities() and tcpm_update_sink_capabilities()
are not used anywhere, and I don't recall why I introduced those functions
in the first place. Effectively that means that we don't know if they even
work, or ever did. Lets remove them.

Reported-by: Kyle Tso &lt;kyletso@google.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Acked-by: Kyle Tso &lt;kyletso@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
