<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/extcon/extcon-palmas.c, branch toradex_4.20.y</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>extcon: palmas: Don't miss GPIO events during suspend/resume</title>
<updated>2017-04-06T01:55:22+00:00</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@ti.com</email>
</author>
<published>2017-02-15T12:31:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=01944321de3021020886564328684b7603ee216c'/>
<id>01944321de3021020886564328684b7603ee216c</id>
<content type='text'>
The USB cable state can change during suspend/resume
so be sure to check and update the extcon state.

Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The USB cable state can change during suspend/resume
so be sure to check and update the extcon state.

Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>extcon: palmas: Use dev_dbg macro for the debug messages</title>
<updated>2017-01-25T06:03:54+00:00</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@ti.com</email>
</author>
<published>2017-01-24T14:54:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=567ab5a81ba569b823b51f4af74f26c437e98b56'/>
<id>567ab5a81ba569b823b51f4af74f26c437e98b56</id>
<content type='text'>
User is not interested in USB cable events appearing on the
console. Use dev_dbg() instead of dev_info() for these events.

Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
User is not interested in USB cable events appearing on the
console. Use dev_dbg() instead of dev_info() for these events.

Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>extcon: palmas: Check the parent instance to prevent the NULL</title>
<updated>2017-01-09T01:04:09+00:00</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@ti.com</email>
</author>
<published>2016-12-08T08:45:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9fe172b9be532acc23e35ba693700383ab775e66'/>
<id>9fe172b9be532acc23e35ba693700383ab775e66</id>
<content type='text'>
extcon-palmas must be child of palmas and expects parent's
drvdata to be valid. Check for non NULL parent drvdata and
fail if it is NULL. Not doing so will result in a NULL
pointer dereference later in the probe() parent drvdata
is NULL (e.g. misplaced extcon-palmas node in device tree).

Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
extcon-palmas must be child of palmas and expects parent's
drvdata to be valid. Check for non NULL parent drvdata and
fail if it is NULL. Not doing so will result in a NULL
pointer dereference later in the probe() parent drvdata
is NULL (e.g. misplaced extcon-palmas node in device tree).

Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>extcon: Use the extcon_set_state_sync() instead of deprecated functions</title>
<updated>2016-09-13T02:26:26+00:00</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2016-08-16T06:55:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8670b4598064007abfc44554e713fa2004734e1d'/>
<id>8670b4598064007abfc44554e713fa2004734e1d</id>
<content type='text'>
This patch alters the renamed extcon API to set the state of the external
connectors instead of deprecated extcon_set_cable_state_().

Because the patch[1] modifies the function name to maintain the function
naming pattern.
- extcon_set_cable_state_() -&gt; extcon_set_state_sync()
- extcon_get_cable_state_() -&gt; extcon_get_state()

[1] https://lkml.org/lkml/2016/8/4/729
- extcon: Rename the extcon_set/get_state() to maintain the function naming pattern

Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Acked-by: Charles Keepax &lt;ckeepax@opensource.wolfsonmicro.com&gt;
Acked-by: Roger Quadros &lt;rogerq@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch alters the renamed extcon API to set the state of the external
connectors instead of deprecated extcon_set_cable_state_().

Because the patch[1] modifies the function name to maintain the function
naming pattern.
- extcon_set_cable_state_() -&gt; extcon_set_state_sync()
- extcon_get_cable_state_() -&gt; extcon_get_state()

[1] https://lkml.org/lkml/2016/8/4/729
- extcon: Rename the extcon_set/get_state() to maintain the function naming pattern

Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Acked-by: Charles Keepax &lt;ckeepax@opensource.wolfsonmicro.com&gt;
Acked-by: Roger Quadros &lt;rogerq@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>extcon: palmas: Fix boot up state of VBUS when using GPIO detection</title>
<updated>2016-06-15T08:17:22+00:00</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@ti.com</email>
</author>
<published>2016-06-15T08:12:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=62e6d1e59c77316768a663d1328390b4cd33801f'/>
<id>62e6d1e59c77316768a663d1328390b4cd33801f</id>
<content type='text'>
If USB cable is connected prior to boot, we don't get any interrupts
so we must manually check the VBUS state and report it during probe.
If we don't do it then USB controller will never know that peripheral
cable was connected till the user unplugs and replugs the cable.

Fixes: b7aad8e2685b ("extcon: palmas: Add the support for VBUS detection by using GPIO")
Cc: stable@vger.kernel.org
Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If USB cable is connected prior to boot, we don't get any interrupts
so we must manually check the VBUS state and report it during probe.
If we don't do it then USB controller will never know that peripheral
cable was connected till the user unplugs and replugs the cable.

Fixes: b7aad8e2685b ("extcon: palmas: Add the support for VBUS detection by using GPIO")
Cc: stable@vger.kernel.org
Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>extcon: palmas: Drop stray IRQF_EARLY_RESUME flag</title>
<updated>2016-04-03T23:32:45+00:00</updated>
<author>
<name>Nishanth Menon</name>
<email>nm@ti.com</email>
</author>
<published>2016-04-01T13:52:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f75587b8ca69768c6cf8a38a0b61e68e1bea3d36'/>
<id>f75587b8ca69768c6cf8a38a0b61e68e1bea3d36</id>
<content type='text'>
Palmas extcon IRQs are nested threaded and wired to the Palmas
interrupt controller. So, this flag is not required for nested
IRQs anymore, since commit 3c646f2c6aa9 ("genirq: Don't suspend
nested_thread irqs over system suspend") was merged. However, the
fix in commit ae64e42cc2b3 ("extcon: palmas: Drop IRQF_EARLY_RESUME
flag") missed a stray flag causing the following crash on resume on
BeagleBoard-X15 platform:

[   53.670141] Unhandled fault: imprecise external abort (0x1406) at 0x00000000
[..]
[   53.670141] [&lt;c04ae734&gt;] (omap_set_gpio_triggering) from [&lt;c04aeb94&gt;] (omap_gpio_unmask_irq+0xc0/0xc4)
[   53.670141] [&lt;c04aeb94&gt;] (omap_gpio_unmask_irq) from [&lt;c01a0b88&gt;] (irq_enable+0x30/0x44)
[   53.670141] [&lt;c01a0b88&gt;] (irq_enable) from [&lt;c019ebd8&gt;] (__enable_irq+0x54/0x78)
[   53.670141] [&lt;c019ebd8&gt;] (__enable_irq) from [&lt;c01a4e60&gt;] (resume_irqs+0xe8/0x100)
[   53.670141] [&lt;c01a4e60&gt;] (resume_irqs) from [&lt;c0514840&gt;] (syscore_resume+0x94/0x298)
[   53.670141] [&lt;c0514840&gt;] (syscore_resume) from [&lt;c01981cc&gt;] (suspend_devices_and_enter+0x790/0x9e4)
[   53.670141] [&lt;c01981cc&gt;] (suspend_devices_and_enter) from [&lt;c0198a60&gt;] (pm_suspend+0x640/0x75c)
[   53.670141] [&lt;c0198a60&gt;] (pm_suspend) from [&lt;c0196bec&gt;] (state_store+0x64/0xb8)
[   53.670141] [&lt;c0196bec&gt;] (state_store) from [&lt;c0307944&gt;] (kernfs_fop_write+0xc0/0x1bc)
[   53.670141] [&lt;c0307944&gt;] (kernfs_fop_write) from [&lt;c028acb0&gt;] (__vfs_write+0x1c/0xd8)
[   53.670141] [&lt;c028acb0&gt;] (__vfs_write) from [&lt;c028bba0&gt;] (vfs_write+0x90/0x16c)
[   53.670141] [&lt;c028bba0&gt;] (vfs_write) from [&lt;c028c8c0&gt;] (SyS_write+0x44/0x9c)
[   53.670141] [&lt;c028c8c0&gt;] (SyS_write) from [&lt;c0107840&gt;] (ret_fast_syscall+0x0/0x1c)
[..]

Fixes: ae64e42cc2b3 ("extcon: palmas: Drop IRQF_EARLY_RESUME flag")
Cc: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Cc: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Cc: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Lee Jones &lt;lee.jones@linaro.org&gt;
Cc: Roger Quadros &lt;rogerq@ti.com&gt;

Reviewed-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Signed-off-by: Nishanth Menon &lt;nm@ti.com&gt;
Acked-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Palmas extcon IRQs are nested threaded and wired to the Palmas
interrupt controller. So, this flag is not required for nested
IRQs anymore, since commit 3c646f2c6aa9 ("genirq: Don't suspend
nested_thread irqs over system suspend") was merged. However, the
fix in commit ae64e42cc2b3 ("extcon: palmas: Drop IRQF_EARLY_RESUME
flag") missed a stray flag causing the following crash on resume on
BeagleBoard-X15 platform:

[   53.670141] Unhandled fault: imprecise external abort (0x1406) at 0x00000000
[..]
[   53.670141] [&lt;c04ae734&gt;] (omap_set_gpio_triggering) from [&lt;c04aeb94&gt;] (omap_gpio_unmask_irq+0xc0/0xc4)
[   53.670141] [&lt;c04aeb94&gt;] (omap_gpio_unmask_irq) from [&lt;c01a0b88&gt;] (irq_enable+0x30/0x44)
[   53.670141] [&lt;c01a0b88&gt;] (irq_enable) from [&lt;c019ebd8&gt;] (__enable_irq+0x54/0x78)
[   53.670141] [&lt;c019ebd8&gt;] (__enable_irq) from [&lt;c01a4e60&gt;] (resume_irqs+0xe8/0x100)
[   53.670141] [&lt;c01a4e60&gt;] (resume_irqs) from [&lt;c0514840&gt;] (syscore_resume+0x94/0x298)
[   53.670141] [&lt;c0514840&gt;] (syscore_resume) from [&lt;c01981cc&gt;] (suspend_devices_and_enter+0x790/0x9e4)
[   53.670141] [&lt;c01981cc&gt;] (suspend_devices_and_enter) from [&lt;c0198a60&gt;] (pm_suspend+0x640/0x75c)
[   53.670141] [&lt;c0198a60&gt;] (pm_suspend) from [&lt;c0196bec&gt;] (state_store+0x64/0xb8)
[   53.670141] [&lt;c0196bec&gt;] (state_store) from [&lt;c0307944&gt;] (kernfs_fop_write+0xc0/0x1bc)
[   53.670141] [&lt;c0307944&gt;] (kernfs_fop_write) from [&lt;c028acb0&gt;] (__vfs_write+0x1c/0xd8)
[   53.670141] [&lt;c028acb0&gt;] (__vfs_write) from [&lt;c028bba0&gt;] (vfs_write+0x90/0x16c)
[   53.670141] [&lt;c028bba0&gt;] (vfs_write) from [&lt;c028c8c0&gt;] (SyS_write+0x44/0x9c)
[   53.670141] [&lt;c028c8c0&gt;] (SyS_write) from [&lt;c0107840&gt;] (ret_fast_syscall+0x0/0x1c)
[..]

Fixes: ae64e42cc2b3 ("extcon: palmas: Drop IRQF_EARLY_RESUME flag")
Cc: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Cc: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Cc: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Lee Jones &lt;lee.jones@linaro.org&gt;
Cc: Roger Quadros &lt;rogerq@ti.com&gt;

Reviewed-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Signed-off-by: Nishanth Menon &lt;nm@ti.com&gt;
Acked-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>extcon: palmas: Drop IRQF_EARLY_RESUME flag</title>
<updated>2016-02-29T02:07:34+00:00</updated>
<author>
<name>Grygorii Strashko</name>
<email>grygorii.strashko@ti.com</email>
</author>
<published>2016-02-26T15:42:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ae64e42cc2b3a17ac0c11815f53211093a54cf55'/>
<id>ae64e42cc2b3a17ac0c11815f53211093a54cf55</id>
<content type='text'>
Palams extcon IRQs are nested threaded and wired to the Palmas
inerrupt controller. So, this flag is not required for nested irqs
anymore, since commit 3c646f2c6aa9 ("genirq: Don't suspend
nested_thread irqs over system suspend") was merged.

Cc: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Cc: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Lee Jones &lt;lee.jones@linaro.org&gt;
Cc: Roger Quadros &lt;rogerq@ti.com&gt;
Cc: Nishanth Menon &lt;nm@ti.com&gt;
Signed-off-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Palams extcon IRQs are nested threaded and wired to the Palmas
inerrupt controller. So, this flag is not required for nested irqs
anymore, since commit 3c646f2c6aa9 ("genirq: Don't suspend
nested_thread irqs over system suspend") was merged.

Cc: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Cc: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Lee Jones &lt;lee.jones@linaro.org&gt;
Cc: Roger Quadros &lt;rogerq@ti.com&gt;
Cc: Nishanth Menon &lt;nm@ti.com&gt;
Signed-off-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>extcon: palmas: Add the support for VBUS detection by using GPIO</title>
<updated>2016-02-05T05:15:31+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>balbi@ti.com</email>
</author>
<published>2015-12-30T00:55:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b7aad8e2685b0aa58295bc4250c8476c9c7193eb'/>
<id>b7aad8e2685b0aa58295bc4250c8476c9c7193eb</id>
<content type='text'>
This patch support for VBUS detection by using GPIO pin.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch support for VBUS detection by using GPIO pin.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>extcon: palmas: Fix build break due to devm_gpiod_get_optional API change</title>
<updated>2015-08-13T11:56:18+00:00</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2015-08-13T00:19:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ac22a1d3386e195c57e299da3bfad97a061b9616'/>
<id>ac22a1d3386e195c57e299da3bfad97a061b9616</id>
<content type='text'>
With commit b17d1bf16cc7 ("gpio: make flags mandatory for gpiod_get functions")
it becomes necessary to pass the flags argument. And this patch adds the gpio
header file to fix the build breakage when build testing with random
configuration files.

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Acked-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With commit b17d1bf16cc7 ("gpio: make flags mandatory for gpiod_get functions")
it becomes necessary to pass the flags argument. And this patch adds the gpio
header file to fix the build breakage when build testing with random
configuration files.

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Acked-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>extcon: palmas: Support GPIO based USB ID detection</title>
<updated>2015-08-10T12:26:25+00:00</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@ti.com</email>
</author>
<published>2015-08-03T14:40:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=92b7cb5dc885b38b21093eefed8028b615952965'/>
<id>92b7cb5dc885b38b21093eefed8028b615952965</id>
<content type='text'>
Some palmas based chip variants do not have OTG based ID logic.
For these variants we rely on GPIO based USB ID detection.

These chips do have VBUS comparator for VBUS detection so we
continue to use the old way of detecting VBUS.

Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Acked-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some palmas based chip variants do not have OTG based ID logic.
For these variants we rely on GPIO based USB ID detection.

These chips do have VBUS comparator for VBUS detection so we
continue to use the old way of detecting VBUS.

Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Acked-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
