<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/typec, branch v4.19.16</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.16</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.16'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-11-13T19:08:41+00:00</updated>
<entry>
<title>usb: typec: tcpm: Fix APDO PPS order checking to be based on voltage</title>
<updated>2018-11-13T19:08:41+00:00</updated>
<author>
<name>Adam Thomson</name>
<email>Adam.Thomson.Opensource@diasemi.com</email>
</author>
<published>2018-09-21T15:04:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=512307dd4f0976fa83d7cf576d10c426869bb3f5'/>
<id>urn:sha1:512307dd4f0976fa83d7cf576d10c426869bb3f5</id>
<content type='text'>
commit 1b6af2f58c2b1522e0804b150ca95e50a9e80ea7 upstream.

Current code mistakenly checks against max current to determine
order but this should be max voltage. This commit fixes the issue
so order is correctly determined, thus avoiding failure based on
a higher voltage PPS APDO having a lower maximum current output,
which is actually valid.

Fixes: 2eadc33f40d4 ("typec: tcpm: Add core support for sink side PPS")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Adam Thomson &lt;Adam.Thomson.Opensource@diasemi.com&gt;
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: typec: tcpm: Report back negotiated PPS voltage and current</title>
<updated>2018-11-13T19:08:33+00:00</updated>
<author>
<name>Adam Thomson</name>
<email>Adam.Thomson.Opensource@diasemi.com</email>
</author>
<published>2018-10-08T12:53:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=18083411913dd92f9fc01aa533f0cdbe594f7425'/>
<id>urn:sha1:18083411913dd92f9fc01aa533f0cdbe594f7425</id>
<content type='text'>
[ Upstream commit 554fab6dbf20ee7298ed2d4e8398b85e6058abb7 ]

Currently when requesting a specific voltage or current through
the psy interface, for PPS, when reading back from that interface
the values will always be the same as previously given, if the
request was successful. However PPS only allows for 20mV voltage
steps and 50mA current steps, and the psy class expects microvolt
and micro amp requests, so inbetween values can be provided through
this interface. Really when reading back the true values negotiated
should be given, and not the ones originally asked for.

To report the actual values negotiated with the Source, the values
stored are now rounded down to the relevant step units prior to
building the PPS request, so that those values are later correctly
reported through the psy interface. In addition this improves the
adjustments made to meet the operating power requirements of the
platform, which previously could have been slightly out due to not
using valid PPS units of voltage and current.

Signed-off-by: Adam Thomson &lt;Adam.Thomson.Opensource@diasemi.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: mux: Take care of driver module reference counting</title>
<updated>2018-09-20T11:35:01+00:00</updated>
<author>
<name>Heikki Krogerus</name>
<email>heikki.krogerus@linux.intel.com</email>
</author>
<published>2018-09-19T07:58:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3e3b81965cbfa01fda6d77750feedc3c46fc28d0'/>
<id>urn:sha1:3e3b81965cbfa01fda6d77750feedc3c46fc28d0</id>
<content type='text'>
Functions typec_mux_get() and typec_switch_get() already
make sure that the mux device reference count is
incremented, but the same must be done to the driver module
as well to prevent the drivers from being unloaded in the
middle of operation.

This fixes a potential "BUG: unable to handle kernel paging
request at ..." from happening.

Fixes: 93dd2112c7b2 ("usb: typec: mux: Get the mux identifier from function parameter")
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 notation warning for typec_match_altmode</title>
<updated>2018-09-05T12:36:53+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2018-09-03T19:58:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=40de5fe4f45c5b804ea085d7e3f1a72fc6705929'/>
<id>urn:sha1:40de5fe4f45c5b804ea085d7e3f1a72fc6705929</id>
<content type='text'>
Fix kernel-doc warning for missing function parameter 'mode' description:

../drivers/usb/typec/bus.c:268: warning: Function parameter or member 'mode' not described in 'typec_match_altmode'

Also fix typos for same function documentation.

Fixes: 8a37d87d72f0 ("usb: typec: Bus type for alternate modes")

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: fix kernel-doc parameter warning</title>
<updated>2018-09-05T11:27:07+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2018-09-03T02:30:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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>Merge 4.18-rc7 into usb-next</title>
<updated>2018-07-30T08:04:58+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-07-30T08:04:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8a7b5d0f75f757fa88b0d17c19523161b27b8e80'/>
<id>urn:sha1:8a7b5d0f75f757fa88b0d17c19523161b27b8e80</id>
<content type='text'>
We want the USB fixes in here as well to handle merge issues.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: tcpm: Fix sink PDO starting index for PPS APDO selection</title>
<updated>2018-07-20T14:40:04+00:00</updated>
<author>
<name>Adam Thomson</name>
<email>Adam.Thomson.Opensource@diasemi.com</email>
</author>
<published>2018-07-17T14:36:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c413767e6698ae24ac1904827314470cacff1497'/>
<id>urn:sha1:c413767e6698ae24ac1904827314470cacff1497</id>
<content type='text'>
There is a bug in the sink PDO search code when trying to select
a PPS APDO. The current code actually sets the starting index for
searching to whatever value 'i' is, rather than choosing index 1
to avoid the first PDO (always 5V fixed). As a result, for sources
which support PPS but whose PPS APDO index does not match with the
supporting sink PPS APDO index for the platform, no valid PPS APDO
will be found so this feature will not be permitted.

Sadly in testing, both Source and Sink capabilities matched up and
this was missed. Code is now updated to correctly set the start
index to 1, and testing with additional PPS capable sources show
this to work as expected.

Signed-off-by: Adam Thomson &lt;Adam.Thomson.Opensource@diasemi.com&gt;
Fixes: 2eadc33f40d4 ("typec: tcpm: Add core support for sink side PPS")
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 4.18-rc5 into usb-next</title>
<updated>2018-07-16T07:09:24+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-07-16T07:09:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=500f0716b5f7fd6b0ff3d045588c7588ce2eee1d'/>
<id>urn:sha1:500f0716b5f7fd6b0ff3d045588c7588ce2eee1d</id>
<content type='text'>
We need the USB fixes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: avoid format-overflow warning</title>
<updated>2018-07-06T14:36:19+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2018-07-06T13:28:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8160eac1213fb6d466dee156638647a71da7d7fb'/>
<id>urn:sha1:8160eac1213fb6d466dee156638647a71da7d7fb</id>
<content type='text'>
gcc-8 points out that the fix-byte buffer might be too small if
desc-&gt;mode is a three-digit number:

drivers/usb/typec/class.c: In function 'typec_register_altmode':
drivers/usb/typec/class.c:502:32: error: '%d' directive writing between 1 and 3 bytes into a region of size 2 [-Werror=format-overflow=]
  sprintf(alt-&gt;group_name, "mode%d", desc-&gt;mode);
                                ^~
drivers/usb/typec/class.c:502:27: note: directive argument in the range [0, 255]
  sprintf(alt-&gt;group_name, "mode%d", desc-&gt;mode);
                           ^~~~~~~~
drivers/usb/typec/class.c:502:2: note: 'sprintf' output between 6 and 8 bytes into a destination of size 6
  sprintf(alt-&gt;group_name, "mode%d", desc-&gt;mode);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I assume this cannot happen in practice, but we can simply make the
string long enough to avoid the warning. This uses the two padding
bytes that already exist after the string.

Fixes: 4ab8c18d4d67 ("usb: typec: Register a device for every mode")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: unlock dp-&gt;lock on error exit path, and also zero ret if successful</title>
<updated>2018-07-06T14:36:19+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2018-07-05T13:36:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=98a1a0c7a321a46e805df289c7d385a9b1b4c661'/>
<id>urn:sha1:98a1a0c7a321a46e805df289c7d385a9b1b4c661</id>
<content type='text'>
One of the error handling paths forgets to unlock dp-&gt;lock on the error
exit path leading to a potential lock-up.  Also the return path for a
successful call to the function configuration_store can return an
uninitialized error return code if dp-&gt;alt-&gt;active is false, so ensure
ret is zeroed on the successful exit path to avoid garbage being returned.

Detected by CoverityScan, CID#1471597 ("Unitialized scalar variable")

Fixes: 0e3bb7d6894d ("usb: typec: Add driver for DisplayPort alternate mode")
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>
</feed>
