<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/extcon/extcon-class.c, branch v3.16</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.16</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.16'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-04-29T00:45:56Z</updated>
<entry>
<title>extcon: Add devm_extcon_dev_allocate/free to manage the resource of extcon device</title>
<updated>2014-04-29T00:45:56Z</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2014-04-24T11:12:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=739ba1bfdb15e773999aafddbd6c59b5737797a0'/>
<id>urn:sha1:739ba1bfdb15e773999aafddbd6c59b5737797a0</id>
<content type='text'>
This patch add device managed devm_extcon_dev_{allocate,free} to automatically
free the memory of extcon_dev structure without handling free operation.

Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Reviewed-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>extcon: Add extcon_dev_allocate/free() to control the memory of extcon device</title>
<updated>2014-04-29T00:35:15Z</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2014-04-24T10:46:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a9af65223b41cec60cd44fa95a93d10149deb143'/>
<id>urn:sha1:a9af65223b41cec60cd44fa95a93d10149deb143</id>
<content type='text'>
This patch add APIs to control the extcon device on extcon provider driver.
The extcon_dev_allocate() allocates the memory of extcon device and initializes
supported cables. And then extcon_dev_free() decrement the reference of the
device of extcon device and free the memory of the extcon device. This APIs
must need to implement devm_extcon_dev_allocate()/free() APIs.

Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Reviewed-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>extcon: Add resource-managed extcon register function</title>
<updated>2014-04-24T10:36:55Z</updated>
<author>
<name>Sangjung Woo</name>
<email>sangjung.woo@samsung.com</email>
</author>
<published>2014-04-21T10:10:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1111244ff4493448c0ee66e814e20c6e81d3b93d'/>
<id>urn:sha1:1111244ff4493448c0ee66e814e20c6e81d3b93d</id>
<content type='text'>
Add resource-managed extcon device register function for convenience.
For example, if a extcon device is attached with new
devm_extcon_dev_register(), that extcon device is automatically
unregistered on driver detach.

Signed-off-by: Sangjung Woo &lt;sangjung.woo@samsung.com&gt;
[Fix bug about devm_extcon_dev_match/release() and code clean by Chanwoo Choi]
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>extcon: Move OF helper function to extcon core and change function name</title>
<updated>2014-03-19T05:41:58Z</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2014-03-18T10:55:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1ad94ffef22c0a6e2ee6ba90a800c32fd29ffa1f'/>
<id>urn:sha1:1ad94ffef22c0a6e2ee6ba90a800c32fd29ffa1f</id>
<content type='text'>
This patch move simply OF helper function to extcon core and change function
name as following:
- of_extcon_get_extcon_dev() -&gt; extcon_get_edev_by_phandle()

Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Acked-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>extcon: remove freed groups caused the panic or warning in unregister flow</title>
<updated>2013-11-26T06:17:23Z</updated>
<author>
<name>Wang, Xiaoming</name>
<email>xiaoming.wang@intel.com</email>
</author>
<published>2013-11-01T22:48:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7585ca0dc950583be7fc62099ca43a0c9551a875'/>
<id>urn:sha1:7585ca0dc950583be7fc62099ca43a0c9551a875</id>
<content type='text'>
(edev-&gt;extcon_dev_type.groups) has been freed before device_unregister.
extcon_dev_unregister -&gt; kfree(edev-&gt;extcon_dev_type.groups)
then device_unregister -&gt; device_del -&gt; device_remove_attrs
-&gt; device_remove_groups(dev, type-&gt;groups);
panic because type-&gt;groups has been freed.

This patch is move device_unregister ahead of groups free
to avoid panic in extcon_dev_unregister.

stack
[ 22.847226] BUG: unable to handle kernel paging request at 5f39746e
[ 22.847234] IP: [&lt;c1387fcd&gt;] sysfs_remove_group+0x2d/0xd0
[ 22.847238] *pdpt = 0000000000000000 *pde = 0000000000000000
[ 22.847241] Oops: 0000 [#1] PREEMPT SMP
[ 22.847244] Modules linked in:
[ 22.847249] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 3.10.16-261140-g6533774 #1
[ 22.847251] task: f3078000 ti: f3072000 task.ti: f3072000
[ 22.847254] EIP: 0060:[&lt;c1387fcd&gt;] EFLAGS: 00010206 CPU: 0
[ 22.847257] EIP is at sysfs_remove_group+0x2d/0xd0
[ 22.847259] EAX: 00000004 EBX: 5f39746e ECX: 00000000 EDX: f2773560
[ 22.847261] ESI: f2653b80 EDI: f2773560 EBP: f3073c90 ESP: f3073c70
[ 22.847263] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
[ 22.847264] CR0: 8005003b CR2: 5f39746e CR3: 020e5000 CR4: 001007f0
[ 22.847266] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[ 22.847268] DR6: ffff0ff0 DR7: 00000400
[ 22.847269] Stack:
[ 22.847276] c13848c9 c1ae3805 f3073c80 f24ddc4c 00000246 f2773e88 f1c44408 f2531340
[ 22.847283] f3073ca0 c16935ca f1c44400 f27d3340 f3073cb4 c1693858 f24ddc44 f1c44400
[ 22.847289] f1c4420c f3073cc8 c1693f76 f1c44400 00000001 00000000 f3073ce8 c1694011
[ 22.847290] Call Trace:
[ 22.847295] [&lt;c13848c9&gt;] ? sysfs_hash_and_remove+0x49/0xa0
[ 22.847300] [&lt;c1ae3805&gt;] ? sub_preempt_count+0x55/0xe0
[ 22.847306] [&lt;c16935ca&gt;] device_remove_groups+0x2a/0x40
[ 22.847309] [&lt;c1693858&gt;] device_remove_attrs+0x38/0x60
[ 22.847313] [&lt;c1693f76&gt;] device_del+0xd6/0x150
[ 22.847316] [&lt;c1694011&gt;] device_unregister+0x21/0x60
[ 22.847320] [&lt;c13869e8&gt;] ? sysfs_remove_link+0x18/0x30
[ 22.847323] [&lt;c1697d04&gt;] ? class_compat_remove_link+0x34/0x50
[ 22.847329] [&lt;c18bf5d9&gt;] extcon_dev_unregister+0xf9/0x130
[ 22.847333] [&lt;c18bd21f&gt;] pwrsrc_extcon_dev_reg_callback+0x7f/0xa0
[ 22.847337] [&lt;c1ae36e3&gt;] notifier_call_chain+0x43/0x60
[ 22.847343] [&lt;c12634e1&gt;] __blocking_notifier_call_chain+0x41/0x80
[ 22.847347] [&lt;c126353f&gt;] blocking_notifier_call_chain+0x1f/0x30
[ 22.847351] [&lt;c18bef39&gt;] extcon_dev_notify_add_device+0x19/0x20
[ 22.847354] [&lt;c18bf074&gt;] extcon_dev_register+0x134/0x580
[ 22.847358] [&lt;c1ae3805&gt;] ? sub_preempt_count+0x55/0xe0
[ 22.847363] [&lt;c154b4da&gt;] ? gpiod_request+0x6a/0x1d0
[ 22.847368] [&lt;c132528a&gt;] ? kmem_cache_alloc_trace+0xaa/0x170
[ 22.847372] [&lt;c18c0179&gt;] ? fsa9285_probe+0x99/0x3f0
[ 22.847375] [&lt;c18c00e0&gt;] ? fsa9285_irq_handler+0xf0/0xf0
[ 22.847379] [&lt;c18c019f&gt;] fsa9285_probe+0xbf/0x3f0
[ 22.847383] [&lt;c18c00e0&gt;] ? fsa9285_irq_handler+0xf0/0xf0
[ 22.847388] [&lt;c1828d9e&gt;] i2c_device_probe+0x7e/0xf0
[ 22.847392] [&lt;c1386e52&gt;] ? sysfs_create_link+0x22/0x40
[ 22.847395] [&lt;c1696c62&gt;] ? driver_sysfs_add+0x72/0xa0
[ 22.847399] [&lt;c1697119&gt;] driver_probe_device+0x79/0x360
[ 22.847403] [&lt;c1697491&gt;] __driver_attach+0x91/0xa0
[ 22.847407] [&lt;c1697400&gt;] ? driver_probe_device+0x360/0x360
[ 22.847410] [&lt;c16955a2&gt;] bus_for_each_dev+0x42/0x80
[ 22.847414] [&lt;c1696bee&gt;] driver_attach+0x1e/0x20
[ 22.847417] [&lt;c1697400&gt;] ? driver_probe_device+0x360/0x360
[ 22.847420] [&lt;c169675f&gt;] bus_add_driver+0xef/0x270
[ 22.847425] [&lt;c1828e10&gt;] ? i2c_device_probe+0xf0/0xf0
[ 22.847428] [&lt;c1828e10&gt;] ? i2c_device_probe+0xf0/0xf0
[ 22.847432] [&lt;c1697a8a&gt;] driver_register+0x6a/0x160
[ 22.847436] [&lt;c1addb3d&gt;] ? mutex_unlock+0xd/0x10
[ 22.847440] [&lt;c1438ab2&gt;] ? __create_file+0x122/0x2a0
[ 22.847446] [&lt;c20557d3&gt;] ? extcon_class_init+0x15/0x15
[ 22.847450] [&lt;c1827cbb&gt;] i2c_register_driver+0x2b/0xd0
[ 22.847454] [&lt;c1438d05&gt;] ? debugfs_create_file+0x35/0x40
[ 22.847458] [&lt;c20557d3&gt;] ? extcon_class_init+0x15/0x15
[ 22.847461] [&lt;c20557e4&gt;] fsa9285_extcon_init+0x11/0x29
[ 22.847465] [&lt;c12001aa&gt;] do_one_initcall+0xba/0x170
[ 22.847471] [&lt;c2012b4a&gt;] kernel_init_freeable+0x119/0x1b8
[ 22.847475] [&lt;c20124d3&gt;] ? do_early_param+0x7a/0x7a
[ 22.847480] [&lt;c1ac4090&gt;] kernel_init+0x10/0xd0
[ 22.847485] [&lt;c1ae6cf7&gt;] ret_from_kernel_thread+0x1b/0x28
[ 22.847488] [&lt;c1ac4080&gt;] ? rest_init+0x80/0x80

Tested-by: Liu, Chuansheng &lt;chuansheng.liu@intel.com&gt;
Reviewed-by: Liu, Chuansheng &lt;chuansheng.liu@intel.com&gt;
Signed-off-by: xiaoming wang &lt;xiaoming.wang@intel.com&gt;
Signed-off-by: Zhang Dongxing &lt;dongxing.zhang@intel.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'extcon-next-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next</title>
<updated>2013-09-27T03:47:25Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-09-27T03:47:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2424a7339bdc5468b8a6b3bddd750647e45b314d'/>
<id>urn:sha1:2424a7339bdc5468b8a6b3bddd750647e45b314d</id>
<content type='text'>
Chanwoo writes:

Update extcon for 3.13

This patchset modify extcon core to remove unnecessary allocation sequence for
'dev' instance and change extcon_dev_register() interface. extcon-gpio use
gpiolib API to get debounce time and include small fix of extcon core/device
driver.

Detailed description for patchset:
1. Modify extcon core driver
- The extcon-gpio driver use gpio_set_debounce() API provided from gpiolib
if gpio driver for SoC support gpio_set_debounce() function and support 'gpio_
activ_low' filed to check whether gpio active state is 1(high) or 0(low).
- Change field type of 'dev' in structure extcon_dev and remove the sequence
of allocating memory of 'struct dev' on extcon_dev_register() function because
extcon device must need 'struct device.
- Change extcon_dev_register() prototype to simplify it and remove unnecessary
parameter as below:

2. Fix coding style and typo
- extcon core     : Fix indentation coding style and remove unnecessary casting
- extcon-max8997  : Fix checkpatch warning
- extcon-max77693 : Fix checkpatch warning
- extcon-arizona  : Fix typo of comment and modify minor issue
- extcon-palmas   : Use dev_get_platdata()

3. Modify extcon-arizona driver
- Modify minor issue about micbias and comparision statement
</content>
</entry>
<entry>
<title>extcon: Simplify extcon_dev_register() prototype by removing unnecessary parameter</title>
<updated>2013-09-27T00:37:01Z</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2013-09-27T00:20:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=42d7d7539a7bcf1d493b989465283c464f4a0525'/>
<id>urn:sha1:42d7d7539a7bcf1d493b989465283c464f4a0525</id>
<content type='text'>
This patch remove extcon_dev_register()'s second parameter which means
the pointer of parent device to simplify prototype of this function.
So, if extcon device has the parent device, it should set the pointer of
parent device to edev.dev.parent in extcon device driver instead of in
extcon_dev_register().

Cc: Graeme Gregory &lt;gg@slimlogic.co.uk&gt;
Cc: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Cc: Charles Keepax &lt;ckeepax@opensource.wolfsonmicro.com&gt;
Cc: Mark Brown &lt;broonie@kernel.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: Change field type of 'dev' in extcon_dev structure</title>
<updated>2013-09-27T00:37:01Z</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2013-09-27T00:19:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dae616512476024aa61d2a598461ab6eff8c0709'/>
<id>urn:sha1:dae616512476024aa61d2a598461ab6eff8c0709</id>
<content type='text'>
The extcon device must always need 'struct device' so this patch change
field type of 'dev' instead of allocating memory for 'struct device' on
extcon_dev_register() function.

Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Myungjoo Ham &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>extcon: Remove casting the return value which is a void pointer</title>
<updated>2013-09-27T00:37:00Z</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-09-09T05:33:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cb8bb3a77252bd431997a61456689c778510447c'/>
<id>urn:sha1:cb8bb3a77252bd431997a61456689c778510447c</id>
<content type='text'>
Casting the return value which is a void pointer is redundant.
The conversion from void pointer to any other pointer type is
guaranteed by the C programming language.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>extcon: Fix indentation coding style to improve readability</title>
<updated>2013-09-27T00:37:00Z</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2013-08-31T04:16:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a75e1c73a46eed0332d036e371f714e76d167c07'/>
<id>urn:sha1:a75e1c73a46eed0332d036e371f714e76d167c07</id>
<content type='text'>
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Myungjoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
</feed>
