<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/extcon/extcon-class.c, branch v3.10.25</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/extcon/extcon-class.c?h=v3.10.25</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/extcon/extcon-class.c?h=v3.10.25'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-11-21T11:00:39Z</updated>
<entry>
<title>extcon: Fix return value in extcon-class.c</title>
<updated>2012-11-21T11:00:39Z</updated>
<author>
<name>Sachin Kamat</name>
<email>sachin.kamat@linaro.org</email>
</author>
<published>2012-11-20T07:30:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c0c078c363a578543826bb8bfc9af47c7cc9321b'/>
<id>urn:sha1:c0c078c363a578543826bb8bfc9af47c7cc9321b</id>
<content type='text'>
Return the value obtained from the function extcon_register_interest
instead of -ENODEV.

Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Myungjoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>extcon : register for cable interest by cable name</title>
<updated>2012-10-23T07:32:18Z</updated>
<author>
<name>Jenny TC</name>
<email>jenny.tc@intel.com</email>
</author>
<published>2012-10-18T12:00:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4f2de3bf177e57417963eec6a131a7bb2d2b660d'/>
<id>urn:sha1:4f2de3bf177e57417963eec6a131a7bb2d2b660d</id>
<content type='text'>
There are some scnearios where a driver/framework needs to register
interest for a particular cable without specifying the extcon device
name. One such scenario is charger notifications. The platform will
have charger cabel which will be bound to any extcon device. It's
not mandatory for the charger driver to know which extcon device
it should use. This patch enables the support for registering
interest for a cable just by cable name wihtout specifying the
extcon device name

Signed-off-by: Jenny TC &lt;jenny.tc@intel.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Tested-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;

--
Kernel-doc comment added by MyungJoo Ham
</content>
</entry>
<entry>
<title>extcon: driver model release call not needed</title>
<updated>2012-10-23T07:32:17Z</updated>
<author>
<name>anish kumar</name>
<email>anish198519851985@gmail.com</email>
</author>
<published>2012-10-22T00:43:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=57e7cd37059bb00cd56b60b95b8799af0db91e18'/>
<id>urn:sha1:57e7cd37059bb00cd56b60b95b8799af0db91e18</id>
<content type='text'>
There was a case where free and list_del can be called twice
on the same pointer.So fixed it by re-arranging the code and
removing a function which was not needed.

Signed-off-by: anish kumar &lt;anish198519851985@gmail.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>extcon: Fix kerneldoc for extcon_set_cable_state and extcon_set_cable_state_</title>
<updated>2012-10-23T07:32:15Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2012-10-04T00:53:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=909f9ec0a42eeff94dbcac226664d225a11f10d6'/>
<id>urn:sha1:909f9ec0a42eeff94dbcac226664d225a11f10d6</id>
<content type='text'>
Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>extcon: Fix return value in extcon_register_interest()</title>
<updated>2012-10-23T07:32:13Z</updated>
<author>
<name>Sachin Kamat</name>
<email>sachin.kamat@linaro.org</email>
</author>
<published>2012-09-25T23:10:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5cd3c277ebc64e4bc30c5eb6412edd43b5730a4f'/>
<id>urn:sha1:5cd3c277ebc64e4bc30c5eb6412edd43b5730a4f</id>
<content type='text'>
Propagate the value returned from extcon_find_cable_index()
instead of -ENODEV. For readability, -EINVAL is returned in place of
the variable.

Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>extcon: unregister compat link on cleanup</title>
<updated>2012-10-23T07:32:12Z</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.amat.us/linux/commit/?id=824a1bc045cef278aec15bef35d8d0b59ce77856'/>
<id>urn:sha1:824a1bc045cef278aec15bef35d8d0b59ce77856</id>
<content type='text'>
Since extcon registers this compat link at device registration
(extcon_dev_register), we should probably remove them at deregistration/cleanup.

Cc: stable@vger.kernel.org
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-23T07:32:11Z</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.amat.us/linux/commit/?id=0dc77b6dabec8fd298392018cc0de5214af2dc43'/>
<id>urn:sha1:0dc77b6dabec8fd298392018cc0de5214af2dc43</id>
<content type='text'>
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.

Cc: stable@vger.kernel.org
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: optimising the check_mutually_exclusive function</title>
<updated>2012-10-22T02:28:10Z</updated>
<author>
<name>anish kumar</name>
<email>anish198519851985@gmail.com</email>
</author>
<published>2012-08-29T19:05:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=28c0ada62d39eaafef03d88a4e6f4c5bcb6e1b6c'/>
<id>urn:sha1:28c0ada62d39eaafef03d88a4e6f4c5bcb6e1b6c</id>
<content type='text'>
Rather than re-inventing the wheel we can use the hamming function
to calculate the number of bits set to check for violation of
exclusivity.

Signed-off-by: anish kumar &lt;anish198519851985@gmail.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>extcon: standard cable names definition and declaration changed</title>
<updated>2012-10-22T02:28:10Z</updated>
<author>
<name>anish kumar</name>
<email>anish198519851985@gmail.com</email>
</author>
<published>2012-08-29T19:05:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0cf6ad8a18f7f7bdbb81975188d9e0656ef277dd'/>
<id>urn:sha1:0cf6ad8a18f7f7bdbb81975188d9e0656ef277dd</id>
<content type='text'>
With this change now individual drivers can use standard cable
names as below:
static const char *arizona_cable[] = {
    extcon_cable_name[EXTCON_USB],
    extcon_cable_name[EXTCON_USB_HOST],
    "CUSTOM_CABLE"
    NULL,
}

Signed-off-by: anish kumar &lt;anish198519851985@gmail.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>extcon: fixing typos</title>
<updated>2012-09-05T19:18:11Z</updated>
<author>
<name>Peter Meerwald</name>
<email>pmeerw@pmeerw.net</email>
</author>
<published>2012-08-23T00:11:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c338bb0380b1cd64ae566d1ea7d1bfd6c811297d'/>
<id>urn:sha1:c338bb0380b1cd64ae566d1ea7d1bfd6c811297d</id>
<content type='text'>
Signed-off-by: Peter Meerwald &lt;pmeerw@pmeerw.net&gt;
Signed-off-by: Myungjoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
