<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/usb/phy/phy-msm-usb.c, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/usb/phy/phy-msm-usb.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/usb/phy/phy-msm-usb.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2017-11-01T16:07:45Z</updated>
<entry>
<title>usb: phy: remove phy-msm-usb.c</title>
<updated>2017-11-01T16:07:45Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@linaro.org</email>
</author>
<published>2017-10-31T13:11:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a170a1e9ccc549e81945818b9a403e131a2e132f'/>
<id>urn:sha1:a170a1e9ccc549e81945818b9a403e131a2e132f</id>
<content type='text'>
No Qualcomm SoC requires the "phy-msm-usb.c" USB phy driver support
any more, so remove the code.

Suggested-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Acked-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Acked-by: Andy Gross &lt;andy.gross@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: phy: phy-msm-usb: mark expected switch fall-through</title>
<updated>2017-10-24T09:31:21Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>garsilva@embeddedor.com</email>
</author>
<published>2017-10-24T03:21:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=58a636ec0362d99f4edaaad4f3c682bf124e799e'/>
<id>urn:sha1:58a636ec0362d99f4edaaad4f3c682bf124e799e</id>
<content type='text'>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 1222118
Signed-off-by: Gustavo A. R. Silva &lt;garsilva@embeddedor.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: phy: phy-msm-usb: Fix usage of devm_regulator_bulk_get()</title>
<updated>2017-08-03T09:32:13Z</updated>
<author>
<name>Rajendra Nayak</name>
<email>rnayak@codeaurora.org</email>
</author>
<published>2017-08-02T07:45:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5a8141bd41f0e7f7758956e2340e10cdf5f2b0b9'/>
<id>urn:sha1:5a8141bd41f0e7f7758956e2340e10cdf5f2b0b9</id>
<content type='text'>
The regulator_bulk_data pointer passed to devm_regulator_bulk_get()
is used to store the client handles for the regulators, which
is later used by devm_regulator_bulk_release() to free the
regulators.
Passing a local array as is done here means the memory used to
store the handles is freed causing the handles to be corrupted,
resulting in a crash when devm_regulator_bulk_release() tries to
free them.

Fix this my moving the array inside of the msm_otg structure.

Signed-off-by: Rajendra Nayak &lt;rnayak@codeaurora.org&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: phy: phy-msm-usb: Remove redundant extcon register/unregister</title>
<updated>2017-05-17T11:15:38Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2017-05-05T06:12:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d94e64cb24790b1df52524173330020ff950921d'/>
<id>urn:sha1:d94e64cb24790b1df52524173330020ff950921d</id>
<content type='text'>
Since usb phy core has added common code to register or unregister
extcon device, then phy-msm-usb driver does not need its own
code to register/unregister extcon device, then remove them.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: phy: msm: Remove the set_power callback</title>
<updated>2017-01-24T09:04:22Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2017-01-18T12:19:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=7b61980a99dfa36eb40df8b7c56bde3f29de0ae9'/>
<id>urn:sha1:7b61980a99dfa36eb40df8b7c56bde3f29de0ae9</id>
<content type='text'>
Since it will not set the PMIC current drawn from USB configuration by
set_power callback, then remove it.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: phy: msm: Replace the extcon API</title>
<updated>2017-01-24T09:04:14Z</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2017-01-16T12:36:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e61bebde51d4c71db8cf8622b550bfbebbe0be7c'/>
<id>urn:sha1:e61bebde51d4c71db8cf8622b550bfbebbe0be7c</id>
<content type='text'>
This patch uses the resource-managed extcon API for extcon_register_notifier()
and replaces the deprecated extcon API as following:
- extcon_get_cable_state_() -&gt; extcon_get_state()

Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Acked-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: phy: move msm_hsusb.h into driver</title>
<updated>2016-06-21T08:12:10Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2016-05-18T21:24:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b9b092319be29bf665f1b004679de722b81c9123'/>
<id>urn:sha1:b9b092319be29bf665f1b004679de722b81c9123</id>
<content type='text'>
As a preparation for another cleanup, this moves the header file
for the phy-msm-usb driver into the driver itself. No other file
includes it any more, and we don't really want it in the global
namespace anyway.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: phy: msm: Trigger USB state detection work in DRD mode</title>
<updated>2016-02-23T06:51:38Z</updated>
<author>
<name>Ivan T. Ivanov</name>
<email>ivan.ivanov@linaro.org</email>
</author>
<published>2016-02-05T19:17:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8de4b3a3fcbc18e0aa62e9defe5c08821351be12'/>
<id>urn:sha1:8de4b3a3fcbc18e0aa62e9defe5c08821351be12</id>
<content type='text'>
When working in Dual Role Device mode, USB state machine is not kicked,
when host or gadget drivers are loaded. Fix this be explicitly triggering
state detection on client driver load.

Issue is that if the board is booted without micro usb cable and usb
device attached, kernel fails to populate the usb host and device.
The reason for this is that the state machine worker logic only checks
for USB_DR_MODE_PERIPHERAL and USB_DR_MODE_HOST modes to run worker
thread. However if the phy is configured in OTG mode it would fail
to run the state machine, resulting in failure to detect for very
first time.

This patch fixes the issue by removing the explicit checks.

Issue is noticed on Qualcomm Dragon board DB410C.

[srinivas.kandagatla@linaro.org: Added more details to log]
Signed-off-by: Ivan T. Ivanov &lt;ivan.ivanov@linaro.org&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: phy: msm: fix error handling in probe.</title>
<updated>2016-02-03T17:52:29Z</updated>
<author>
<name>Srinivas Kandagatla</name>
<email>srinivas.kandagatla@linaro.org</email>
</author>
<published>2016-01-13T09:13:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a38a08dfaaab978dced63aa9cad45f0f62e23a66'/>
<id>urn:sha1:a38a08dfaaab978dced63aa9cad45f0f62e23a66</id>
<content type='text'>
This driver registers for extcon events as part of its probe, but
never unregisters them in case of error in the probe path.

There were multiple issues noticed due to this missing error handling.
One of them is random crashes if the regulators are not ready yet by the
time probe is invoked.

Ivan's previous attempt [1] to fix this issue, did not really address
all the failure cases like regualtor/get_irq failures.

[1] https://lkml.org/lkml/2015/9/7/62

Without this patch the kernel would carsh with log:
...
Unable to handle kernel paging request at virtual address 17d78410
pgd = ffffffc001a5c000
[17d78410] *pgd=00000000b6806003, *pud=00000000b6806003, *pmd=0000000000000000
Internal error: Oops: 96000005 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 6 Comm: kworker/u8:0 Not tainted 4.4.0+ #48
Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
Workqueue: deferwq deferred_probe_work_func
task: ffffffc03686e900 ti: ffffffc0368b0000 task.ti: ffffffc0368b0000
PC is at raw_notifier_chain_register+0x1c/0x44
LR is at extcon_register_notifier+0x88/0xc8
pc : [&lt;ffffffc0000da43c&gt;] lr : [&lt;ffffffc000606298&gt;] pstate: 80000085
sp : ffffffc0368b3a70
x29: ffffffc0368b3a70 x28: ffffffc03680c310
x27: ffffffc035518000 x26: ffffffc035518000
x25: ffffffc03bfa20e0 x24: ffffffc035580a18
x23: 0000000000000000 x22: ffffffc035518458
x21: ffffffc0355e9a60 x20: ffffffc035518000
x19: 0000000000000000 x18: 0000000000000028
x17: 0000000000000003 x16: ffffffc0018153c8
x15: 0000000000000001 x14: ffffffc03686f0f8
x13: ffffffc03686f0f8 x12: 0000000000000003
x11: 0000000000000001 x10: 0000000000000001
x9 : ffffffc03686f0f8 x8 : 0000e3872014c1a1
x7 : 0000000000000028 x6 : 0000000000000000
x5 : 0000000000000001 x4 : 0000000000000000
x3 : 00000000354fb170 x2 : 0000000017d78400
x1 : ffffffc0355e9a60 x0 : ffffffc0354fb268

Fixes: 	591fc116f330 ("usb: phy: msm: Use extcon framework for VBUS and ID detection")
CC: Stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: phy: msm: fix a possible NULL dereference</title>
<updated>2015-12-08T14:13:28Z</updated>
<author>
<name>LABBE Corentin</name>
<email>clabbe.montjoie@gmail.com</email>
</author>
<published>2015-11-24T14:34:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=928c75fbeb6b62edbdff7c52ee1e9a3591faee4f'/>
<id>urn:sha1:928c75fbeb6b62edbdff7c52ee1e9a3591faee4f</id>
<content type='text'>
of_match_device could return NULL, and so cause a NULL pointer
dereference later.
Even if the probability of this case is very low, fixing it made
static analyzers happy.
Solving this with of_device_get_match_data made also code simplier.

Reported-by: coverity (CID 1324133)
Signed-off-by: LABBE Corentin &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
</feed>
