<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/extcon/extcon_class.c, branch v3.6.9</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.6.9</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.6.9'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2012-10-31T17:10:00Z</updated>
<entry>
<title>extcon: unregister compat link on cleanup</title>
<updated>2012-10-31T17:10:00Z</updated>
<author>
<name>Peter Huewe</name>
<email>peterhuewe@gmx.de</email>
</author>
<published>2012-09-24T06:36:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3ed2bcc63a56f5b8983ecfc4de37fa70d7e2e380'/>
<id>urn:sha1:3ed2bcc63a56f5b8983ecfc4de37fa70d7e2e380</id>
<content type='text'>
commit 824a1bc045cef278aec15bef35d8d0b59ce77856 upstream.

Since extcon registers this compat link at device registration
(extcon_dev_register), we should probably remove them at deregistration/cleanup.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;

</content>
</entry>
<entry>
<title>extcon: Unregister compat class at module unload to fix oops</title>
<updated>2012-10-31T17:10:00Z</updated>
<author>
<name>Peter Huewe</name>
<email>peterhuewe@gmx.de</email>
</author>
<published>2012-09-24T06:32:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c5a2edcb66a0f15a5313b52dd68821ec387d8091'/>
<id>urn:sha1:c5a2edcb66a0f15a5313b52dd68821ec387d8091</id>
<content type='text'>
commit 0dc77b6dabec8fd298392018cc0de5214af2dc43 upstream.

If you compile extcon with CONFIG_ANDROID and then load and unload the
module you get a simple oops as the driver does not unregister its
compat class and thus cannot register it again.

Full trace:

root@(none):~# modprobe extcon_class
root@(none):~# rmmod extcon_class
root@(none):~# modprobe extcon_class
------------[ cut here ]------------
WARNING: at fs/sysfs/dir.c:536 sysfs_add_one+0xde/0x100()
sysfs: cannot create duplicate filename '/class/switch'
Modules linked in: extcon_class(+) [last unloaded: extcon_class]
Call Trace:
9f451a00:  [&lt;602a58bc&gt;] printk+0x0/0xa8
9f451a18:  [&lt;60039b43&gt;] warn_slowpath_common+0x93/0xd0
9f451a28:  [&lt;6012c6de&gt;] sysfs_add_one+0xde/0x100
9f451a50:  [&lt;601d3d90&gt;] strcat+0x0/0x40
9f451a68:  [&lt;60039cdc&gt;] warn_slowpath_fmt+0x9c/0xa0
9f451a90:  [&lt;6002fe32&gt;] unblock_signals+0x0/0x84
9f451ab0:  [&lt;60039c40&gt;] warn_slowpath_fmt+0x0/0xa0
9f451ac0:  [&lt;6002fe32&gt;] unblock_signals+0x0/0x84
9f451ae8:  [&lt;6012bd97&gt;] sysfs_pathname.isra.10+0x57/0x70
9f451b00:  [&lt;601d3d90&gt;] strcat+0x0/0x40
9f451b18:  [&lt;6012bd97&gt;] sysfs_pathname.isra.10+0x57/0x70
9f451b48:  [&lt;6012c6de&gt;] sysfs_add_one+0xde/0x100
9f451b78:  [&lt;6012c96f&gt;] create_dir+0x8f/0x100
9f451bc0:  [&lt;a0861000&gt;] extcon_class_init+0x0/0x12 [extcon_class]
9f451bd8:  [&lt;6012cda6&gt;] sysfs_create_dir+0xa6/0x1c0
9f451be8:  [&lt;601d89f1&gt;] kvasprintf+0x81/0xa0
9f451bf8:  [&lt;601cf0f0&gt;] kobject_get+0x0/0x50
9f451c18:  [&lt;601cf396&gt;] kobject_add_internal+0x96/0x280
9f451c60:  [&lt;a0861000&gt;] extcon_class_init+0x0/0x12 [extcon_class]
9f451c78:  [&lt;601cfb93&gt;] kobject_add+0xd3/0x140
9f451cc0:  [&lt;601cfac0&gt;] kobject_add+0x0/0x140
9f451cd0:  [&lt;6002fe32&gt;] unblock_signals+0x0/0x84
9f451cf8:  [&lt;6002fffc&gt;] set_signals+0x29/0x3f
9f451d28:  [&lt;600c1de1&gt;] kmem_cache_alloc+0xe1/0x100
9f451d78:  [&lt;601cffa0&gt;] kobject_create_and_add+0x50/0xa0
9f451da8:  [&lt;601fbe76&gt;] class_compat_register+0x56/0x80
9f451dc8:  [&lt;a085d118&gt;] create_extcon_class+0x88/0xd0 [extcon_class]
9f451de8:  [&lt;a0861010&gt;] extcon_class_init+0x10/0x12 [extcon_class]
9f451df8:  [&lt;600189a8&gt;] do_one_initcall+0x48/0x1f0
9f451e20:  [&lt;60061920&gt;] blocking_notifier_call_chain+0x0/0x20
9f451e30:  [&lt;60061920&gt;] blocking_notifier_call_chain+0x0/0x20
9f451e58:  [&lt;6007e3c3&gt;] sys_init_module+0xa3/0x280
9f451e88:  [&lt;6001e2ad&gt;] handle_syscall+0x8d/0x90
9f451ea8:  [&lt;60033370&gt;] userspace+0x405/0x531
9f451ee8:  [&lt;6001e380&gt;] copy_chunk_to_user+0x0/0x40
9f451ef8:  [&lt;6001e5cd&gt;] do_op_one_page+0x14d/0x220
9f451fd8:  [&lt;6001a355&gt;] fork_handler+0x95/0xa0

---[ end trace dd512cc03fe1c367 ]---
------------[ cut here ]------------
WARNING: at lib/kobject.c:196 kobject_add_internal+0x26e/0x280()
kobject_add_internal failed for switch with -EEXIST, don't try to
register things with the same name in the same directory.
Modules linked in: extcon_class(+) [last unloaded: extcon_class]
Call Trace:
9f451ad0:  [&lt;602a58bc&gt;] printk+0x0/0xa8
9f451ae8:  [&lt;60039b43&gt;] warn_slowpath_common+0x93/0xd0
9f451af8:  [&lt;601cf56e&gt;] kobject_add_internal+0x26e/0x280
9f451b18:  [&lt;601cf140&gt;] kobject_put+0x0/0x70
9f451b20:  [&lt;a0861000&gt;] extcon_class_init+0x0/0x12 [extcon_class]
9f451b38:  [&lt;60039cdc&gt;] warn_slowpath_fmt+0x9c/0xa0
9f451b88:  [&lt;60039c40&gt;] warn_slowpath_fmt+0x0/0xa0
9f451bc0:  [&lt;a0861000&gt;] extcon_class_init+0x0/0x12 [extcon_class]
9f451bd8:  [&lt;6012cda6&gt;] sysfs_create_dir+0xa6/0x1c0
9f451be8:  [&lt;601d89f1&gt;] kvasprintf+0x81/0xa0
9f451bf8:  [&lt;601cf0f0&gt;] kobject_get+0x0/0x50
9f451c18:  [&lt;601cf56e&gt;] kobject_add_internal+0x26e/0x280
9f451c60:  [&lt;a0861000&gt;] extcon_class_init+0x0/0x12 [extcon_class]
9f451c78:  [&lt;601cfb93&gt;] kobject_add+0xd3/0x140
9f451cc0:  [&lt;601cfac0&gt;] kobject_add+0x0/0x140
9f451cd0:  [&lt;6002fe32&gt;] unblock_signals+0x0/0x84
9f451cf8:  [&lt;6002fffc&gt;] set_signals+0x29/0x3f
9f451d28:  [&lt;600c1de1&gt;] kmem_cache_alloc+0xe1/0x100
9f451d78:  [&lt;601cffa0&gt;] kobject_create_and_add+0x50/0xa0
9f451da8:  [&lt;601fbe76&gt;] class_compat_register+0x56/0x80
9f451dc8:  [&lt;a085d118&gt;] create_extcon_class+0x88/0xd0 [extcon_class]
9f451de8:  [&lt;a0861010&gt;] extcon_class_init+0x10/0x12 [extcon_class]
9f451df8:  [&lt;600189a8&gt;] do_one_initcall+0x48/0x1f0
9f451e20:  [&lt;60061920&gt;] blocking_notifier_call_chain+0x0/0x20
9f451e30:  [&lt;60061920&gt;] blocking_notifier_call_chain+0x0/0x20
9f451e58:  [&lt;6007e3c3&gt;] sys_init_module+0xa3/0x280
9f451e88:  [&lt;6001e2ad&gt;] handle_syscall+0x8d/0x90
9f451ea8:  [&lt;60033370&gt;] userspace+0x405/0x531
9f451ee8:  [&lt;6001e380&gt;] copy_chunk_to_user+0x0/0x40
9f451ef8:  [&lt;6001e5cd&gt;] do_op_one_page+0x14d/0x220
9f451fd8:  [&lt;6001a355&gt;] fork_handler+0x95/0xa0

---[ end trace dd512cc03fe1c368 ]---
kobject_create_and_add: kobject_add error: -17
------------[ cut here ]------------
WARNING: at drivers/extcon/extcon_class.c:545
create_extcon_class+0xbc/0xd0 [extcon_class]()
cannot allocate
Modules linked in: extcon_class(+) [last unloaded: extcon_class]
Call Trace:
9f451c80:  [&lt;602a58bc&gt;] printk+0x0/0xa8
9f451c98:  [&lt;60039b43&gt;] warn_slowpath_common+0x93/0xd0
9f451ca0:  [&lt;6002fe32&gt;] unblock_signals+0x0/0x84
9f451ca8:  [&lt;a085d14c&gt;] create_extcon_class+0xbc/0xd0 [extcon_class]
9f451cd0:  [&lt;a0861000&gt;] extcon_class_init+0x0/0x12 [extcon_class]
9f451ce8:  [&lt;60039cdc&gt;] warn_slowpath_fmt+0x9c/0xa0
9f451d20:  [&lt;6002fe32&gt;] unblock_signals+0x0/0x84
9f451d28:  [&lt;60039c40&gt;] warn_slowpath_fmt+0x0/0xa0
9f451d48:  [&lt;6002fffc&gt;] set_signals+0x29/0x3f
9f451d58:  [&lt;601cf172&gt;] kobject_put+0x32/0x70
9f451d78:  [&lt;600c22c3&gt;] kfree+0xb3/0x100
9f451da8:  [&lt;601fbe9a&gt;] class_compat_register+0x7a/0x80
9f451dc8:  [&lt;a085d14c&gt;] create_extcon_class+0xbc/0xd0 [extcon_class]
9f451de8:  [&lt;a0861010&gt;] extcon_class_init+0x10/0x12 [extcon_class]
9f451df8:  [&lt;600189a8&gt;] do_one_initcall+0x48/0x1f0
9f451e20:  [&lt;60061920&gt;] blocking_notifier_call_chain+0x0/0x20
9f451e30:  [&lt;60061920&gt;] blocking_notifier_call_chain+0x0/0x20
9f451e58:  [&lt;6007e3c3&gt;] sys_init_module+0xa3/0x280
9f451e88:  [&lt;6001e2ad&gt;] handle_syscall+0x8d/0x90
9f451ea8:  [&lt;60033370&gt;] userspace+0x405/0x531
9f451ee8:  [&lt;6001e380&gt;] copy_chunk_to_user+0x0/0x40
9f451ef8:  [&lt;6001e5cd&gt;] do_op_one_page+0x14d/0x220
9f451fd8:  [&lt;6001a355&gt;] fork_handler+0x95/0xa0

---[ end trace dd512cc03fe1c369 ]---
FATAL: Error inserting extcon_class
(/lib/modules/3.6.0-rc6-00178-g811315f/kernel/drivers/extcon/extcon_class.ko):
Cannot allocate memory

This patch fixes this.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Merge v3.5-rc5 into driver-core-next</title>
<updated>2012-07-05T15:25:34Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2012-07-05T15:25:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6fbfd0592ef88ba29cdce84ef92757351f1fa9c9'/>
<id>urn:sha1:6fbfd0592ef88ba29cdce84ef92757351f1fa9c9</id>
<content type='text'>
This picks up the big printk fixes, and resolves a merge issue with:
	drivers/extcon/extcon_gpio.c

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Extcon: Don't try to create duplicate link names</title>
<updated>2012-06-15T00:20:09Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2012-06-05T15:43:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c3b15452e253ab0629cd9e400d3fb6d76c76cb73'/>
<id>urn:sha1:c3b15452e253ab0629cd9e400d3fb6d76c76cb73</id>
<content type='text'>
We can't create a link from the device to the compatibility switch class
since we already create a link from the device to to the extcon class
object and we try to use the same name for both links. This causes a loud
complaint from sysfs on boot.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Extcon: Staticise extcon_class</title>
<updated>2012-06-15T00:15:25Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2012-06-05T15:14:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=be3a07f71ca3ae300d652a653279321e85b9f3d0'/>
<id>urn:sha1:be3a07f71ca3ae300d652a653279321e85b9f3d0</id>
<content type='text'>
It's not referenced outside the core file.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>extcon: Add EXTCON_MECHANICAL cable type for physical presence</title>
<updated>2012-05-04T23:25:29Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2012-05-02T09:38:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0e1507c8453081c9a6a515b92f89dd00b68f5c09'/>
<id>urn:sha1:0e1507c8453081c9a6a515b92f89dd00b68f5c09</id>
<content type='text'>
Some accessory detection mechanisms are able to detect that something is
physically present in the socket separately to identifying what is present
in the socket. This information can be useful to applications, for example
allowing them to indicate that a potentially broken accessory is present,
so provide a standard way to report it to userspace.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Extcon: Notify changed state for only one cable to notifee</title>
<updated>2012-04-30T02:03:49Z</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2012-04-27T06:17:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f4cce69611ee941bac0729c6069795f106905ef9'/>
<id>urn:sha1:f4cce69611ee941bac0729c6069795f106905ef9</id>
<content type='text'>
This patch inform the state of only one cable instead of previous data
including the state of 32 cables to notifee which use
extcon_register_interest()
function to monitor whether the specific cable is attachd or detached.

Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Myungjoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Extcon: check for allocation failure</title>
<updated>2012-04-25T18:43:24Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2012-04-25T08:47:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a1d26ac0ddc4ea561e17a75dd3b5f9d3c1812f16'/>
<id>urn:sha1:a1d26ac0ddc4ea561e17a75dd3b5f9d3c1812f16</id>
<content type='text'>
Return -ENOMEM if the kmalloc() fails.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Remove "switch" class in drivers/staging/android/switch</title>
<updated>2012-04-23T20:24:00Z</updated>
<author>
<name>MyungJoo Ham</name>
<email>myungjoo.ham@samsung.com</email>
</author>
<published>2012-04-23T11:19:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=449a2bf5e881b2a00d42a7c0baa67119c8cb5dce'/>
<id>urn:sha1:449a2bf5e881b2a00d42a7c0baa67119c8cb5dce</id>
<content type='text'>
Because extcon can also be a switch class for legacy userspace (Android)
and is a superset of switch class in drivers/staging/android/switch,
switch class may be removed.

- Remove switch class
- Remove switch class consideration in extcon class

Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Extcon: support mutually exclusive relation between cables.</title>
<updated>2012-04-20T16:24:03Z</updated>
<author>
<name>MyungJoo Ham</name>
<email>myungjoo.ham@samsung.com</email>
</author>
<published>2012-04-20T05:16:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bde68e60b18208978c50c6fb9bdf29826d2887f3'/>
<id>urn:sha1:bde68e60b18208978c50c6fb9bdf29826d2887f3</id>
<content type='text'>
There could be cables that t recannot be attaches simulatenously. Extcon
device drivers may express such information via mutually_exclusive in
struct extcon_dev.

For example, for an extcon device with 16 cables (bits 0 to 15 are
available), if mutually_exclusive = { 0x7, 0xC0, 0x81, 0 }, then, the
following attachments are prohibitted.
{0, 1}
{0, 2}
{1, 2}
{6, 7}
{0, 7}
and every attachment set that are superset of one of the above.
For the detail, please refer to linux/include/linux/extcon.h.

The concept is suggested by NeilBrown &lt;neilb@suse.de&gt;

Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;

--
Changes from V5:
- Updated sysfs format
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
