19 Mar, 2014
4 commits
-
This patch move simply OF helper function to extcon core and change function
name as following:
- of_extcon_get_extcon_dev() -> extcon_get_edev_by_phandle()Signed-off-by: Chanwoo Choi
Acked-by: Felipe Balbi -
This patch remove unnecessary function call in of_extcon_get_extcon_dev()
by using the name of device_node structure.Signed-off-by: Chanwoo Choi
-
Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.
Signed-off-by: Jingoo Han
Signed-off-by: Chanwoo Choi -
Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.
Signed-off-by: Jingoo Han
Signed-off-by: Chanwoo Choi
20 Feb, 2014
1 commit
-
The snd_soc_dapm_xxxx_pin all require the dapm_mutex to be held when
they are called as they edit the dirty list, however very few of the
callers do so.This patch adds unlocked versions of all the functions replacing the
existing implementations with one that holds the lock internally. We
also fix up the places where the lock was actually held on the caller
side.Signed-off-by: Charles Keepax
Signed-off-by: Mark Brown
Cc: stable@vger.kernel.org
09 Jan, 2014
1 commit
-
When system on the suspend state, Some SoC can't get gpio interrupt.
After system resume, need send extcon uevent to userspace.Signed-off-by: Rongjun Ying
Reviewed-by: Barry Song
Acked-by: Myungjoo Ham
Signed-off-by: Chanwoo Choi
07 Jan, 2014
9 commits
-
This patch supports Maxim MAX14577 MUIC(Micro USB Interface Controller)
device by using EXTCON subsystem to handle various external connectors.
The max14577 device uses regmap method for i2c communication and
supports irq domain.Signed-off-by: Chanwoo Choi
Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Kyungmin Park -
wm5110 rev D is the first chip to use headphone detection IP 2, specify
such and make a small correction as the impedance value is actually read
in 0.5 ohm increments now.Signed-off-by: Charles Keepax
Signed-off-by: Chanwoo Choi -
No point in revisiting ranges the detection will be no more accurate
the second time simply report that the resistance is right on the
range boundry.Signed-off-by: Charles Keepax
Signed-off-by: Chanwoo Choi -
The microphone detection code is run as delayed work to provide
additional debounce, it is possible that the jack could have been
removed by the time we process the microphone detection. Turn this
case into a no op.Signed-off-by: Charles Keepax
Signed-off-by: Chanwoo Choi -
We need to make sure we reset back to our starting state, especially
making sure that we have disabled poll in the register cache.Signed-off-by: Charles Keepax
Signed-off-by: Chanwoo Choi -
Improve readability by creating a define for each microphone detection
level.Acked-by: Lee Jones
Signed-off-by: Charles Keepax
Signed-off-by: Chanwoo Choi -
Always cross check with the ID state and the source of interrupt.
Also add a case in which ID Source is ID_GND but LATCH state is set
wrongly. This uses the previous Link stat to determine the new state.Signed-off-by: George Cherian
Acked-by: Laxman Dewangan
Signed-off-by: Chanwoo Choi -
The Palmas device contains only a USB VBUS-ID detector, so added a
compatible type *ti,palmas-usb-vid*. Didn't remove the existing compatible
types for backward compatibility.Signed-off-by: Kishon Vijay Abraham I
Signed-off-by: Chanwoo Choi -
Commit 338de0ca (extcon: gpio: Use gpio driver/chip debounce if supported)
introduced a call to gpio_set_debounce() before actually requesting the
respective gpio pin from the gpio subsystem.The gpio subsystem expects that a gpio pin was requested before modifying its
state. Not doing so results in a warning from gpiolib, and the gpio pin is
auto-requested. This in turn causes the subsequent devm_gpio_request_one()
to fail. So devm_gpio_request_one() must be called prior to calling
gpio_set_debounce().Signed-off-by: Guenter Roeck
Acked-by: MyungJoo Ham
Signed-off-by: Chanwoo Choi
26 Nov, 2013
2 commits
-
(edev->extcon_dev_type.groups) has been freed before device_unregister.
extcon_dev_unregister -> kfree(edev->extcon_dev_type.groups)
then device_unregister -> device_del -> device_remove_attrs
-> device_remove_groups(dev, type->groups);
panic because type->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: [] 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:[] 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] [] ? sysfs_hash_and_remove+0x49/0xa0
[ 22.847300] [] ? sub_preempt_count+0x55/0xe0
[ 22.847306] [] device_remove_groups+0x2a/0x40
[ 22.847309] [] device_remove_attrs+0x38/0x60
[ 22.847313] [] device_del+0xd6/0x150
[ 22.847316] [] device_unregister+0x21/0x60
[ 22.847320] [] ? sysfs_remove_link+0x18/0x30
[ 22.847323] [] ? class_compat_remove_link+0x34/0x50
[ 22.847329] [] extcon_dev_unregister+0xf9/0x130
[ 22.847333] [] pwrsrc_extcon_dev_reg_callback+0x7f/0xa0
[ 22.847337] [] notifier_call_chain+0x43/0x60
[ 22.847343] [] __blocking_notifier_call_chain+0x41/0x80
[ 22.847347] [] blocking_notifier_call_chain+0x1f/0x30
[ 22.847351] [] extcon_dev_notify_add_device+0x19/0x20
[ 22.847354] [] extcon_dev_register+0x134/0x580
[ 22.847358] [] ? sub_preempt_count+0x55/0xe0
[ 22.847363] [] ? gpiod_request+0x6a/0x1d0
[ 22.847368] [] ? kmem_cache_alloc_trace+0xaa/0x170
[ 22.847372] [] ? fsa9285_probe+0x99/0x3f0
[ 22.847375] [] ? fsa9285_irq_handler+0xf0/0xf0
[ 22.847379] [] fsa9285_probe+0xbf/0x3f0
[ 22.847383] [] ? fsa9285_irq_handler+0xf0/0xf0
[ 22.847388] [] i2c_device_probe+0x7e/0xf0
[ 22.847392] [] ? sysfs_create_link+0x22/0x40
[ 22.847395] [] ? driver_sysfs_add+0x72/0xa0
[ 22.847399] [] driver_probe_device+0x79/0x360
[ 22.847403] [] __driver_attach+0x91/0xa0
[ 22.847407] [] ? driver_probe_device+0x360/0x360
[ 22.847410] [] bus_for_each_dev+0x42/0x80
[ 22.847414] [] driver_attach+0x1e/0x20
[ 22.847417] [] ? driver_probe_device+0x360/0x360
[ 22.847420] [] bus_add_driver+0xef/0x270
[ 22.847425] [] ? i2c_device_probe+0xf0/0xf0
[ 22.847428] [] ? i2c_device_probe+0xf0/0xf0
[ 22.847432] [] driver_register+0x6a/0x160
[ 22.847436] [] ? mutex_unlock+0xd/0x10
[ 22.847440] [] ? __create_file+0x122/0x2a0
[ 22.847446] [] ? extcon_class_init+0x15/0x15
[ 22.847450] [] i2c_register_driver+0x2b/0xd0
[ 22.847454] [] ? debugfs_create_file+0x35/0x40
[ 22.847458] [] ? extcon_class_init+0x15/0x15
[ 22.847461] [] fsa9285_extcon_init+0x11/0x29
[ 22.847465] [] do_one_initcall+0xba/0x170
[ 22.847471] [] kernel_init_freeable+0x119/0x1b8
[ 22.847475] [] ? do_early_param+0x7a/0x7a
[ 22.847480] [] kernel_init+0x10/0xd0
[ 22.847485] [] ret_from_kernel_thread+0x1b/0x28
[ 22.847488] [] ? rest_init+0x80/0x80Tested-by: Liu, Chuansheng
Reviewed-by: Liu, Chuansheng
Signed-off-by: xiaoming wang
Signed-off-by: Zhang Dongxing
Signed-off-by: Chanwoo Choi -
In the case of a device tree system there will be no pdata attached to
the device, causing us to deference a NULL pointer. Better to take the
pdata from the Arizona structure as this will always exist and we know
will have been populated since it is populated by the MFD device which
binds in the extcon driver.Signed-off-by: Charles Keepax
Signed-off-by: Chanwoo Choi
27 Sep, 2013
18 commits
-
…t/chanwoo/extcon into char-misc-next
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 -
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
Cc: Kishon Vijay Abraham I
Cc: Charles Keepax
Cc: Mark Brown
Signed-off-by: Chanwoo Choi
Signed-off-by: Myungjoo Ham -
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
Signed-off-by: Myungjoo Ham -
Every other pdata field is specified unshifted the patch handles
shifting for the MICBIAS from the microphone detection polarity
configurations in the extcon driver rather than demanding it in
pdata to match other fields.Signed-off-by: Charles Keepax
Signed-off-by: Chanwoo Choi -
We should move range when the measured value is greater than or equal to
the max value not when greater than.Signed-off-by: Charles Keepax
Signed-off-by: Chanwoo Choi -
This patch add 'gpio_active_low' field to 'struct gpio_extcon_data'
to check whether gpio active state is 1(high) or 0(low).Signed-off-by: Guenter Roeck
Signed-off-by: Chanwoo Choi -
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.Signed-off-by: Jingoo Han
Signed-off-by: Chanwoo Choi -
This patch use gpio_set_debounce() API provided from gpiolib if SoC or device
driver with gpio support gpio_set_debounce() function.Signed-off-by: Guenter Roeck
Signed-off-by: Chanwoo Choi -
Signed-off-by: Guenter Roeck
Signed-off-by: Chanwoo Choi -
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
Signed-off-by: Chanwoo Choi -
Signed-off-by: Chanwoo Choi
Signed-off-by: Myungjoo Ham -
Fixes the following warning:
WARNING: space prohibited before semicolonSigned-off-by: Sachin Kamat
Signed-off-by: Chanwoo Choi -
Fixes an incomplete comment introduced by commit 9c2ba270
("extcon: arizona: Simplify HPDET based identification").Signed-off-by: Sachin Kamat
Signed-off-by: Chanwoo Choi -
We want the trig_sts bits to be cleared in all cases where we consider
the jack detection interrupt to have been handled. Specifically, if a
duplicate detection event was suppressed these bits were not cleared
causing the CODEC to not enter a low power state. This patch clears the
bits on the duplicate detection code path.Reported-by: Ryo Tsutsui
Signed-off-by: Charles Keepax
Signed-off-by: Chanwoo Choi -
Fixes the following warning:
WARNING: space prohibited before semicolonSigned-off-by: Sachin Kamat
Signed-off-by: Chanwoo Choi -
This fixes up braces coding style issue by using checkpatch script.
Cc: Charles Keepax
Cc: Mark Brown
Signed-off-by: Chanwoo Choi
Signed-off-by: Greg Kroah-Hartman -
This patch remove unnecessary extern declaration (extcon_set_state).
checkpatch found this coding style issue.Signed-off-by: Chanwoo Choi
Signed-off-by: Myungjoo Ham
Signed-off-by: Greg Kroah-Hartman -
This patch fix 80 column coding sytle issues by using checkpatch script.
Cc: Charles Keepax
Cc: Mark Brown
Signed-off-by: Chanwoo Choi
Signed-off-by: Myungjoo Ham
Signed-off-by: Greg Kroah-Hartman
04 Sep, 2013
1 commit
-
Pull driver core patches from Greg KH:
"Here's the big driver core pull request for 3.12-rc1.Lots of tiny changes here fixing up the way sysfs attributes are
created, to try to make drivers simpler, and fix a whole class race
conditions with creations of device attributes after the device was
announced to userspace.All the various pieces are acked by the different subsystem
maintainers"* tag 'driver-core-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (119 commits)
firmware loader: fix pending_fw_head list corruption
drivers/base/memory.c: introduce help macro to_memory_block
dynamic debug: line queries failing due to uninitialized local variable
sysfs: sysfs_create_groups returns a value.
debugfs: provide debugfs_create_x64() when disabled
rbd: convert bus code to use bus_groups
firmware: dcdbas: use binary attribute groups
sysfs: add sysfs_create/remove_groups for when SYSFS is not enabled
driver core: add #include to core files.
HID: convert bus code to use dev_groups
Input: serio: convert bus code to use drv_groups
Input: gameport: convert bus code to use drv_groups
driver core: firmware: use __ATTR_RW()
driver core: core: use DEVICE_ATTR_RO
driver core: bus: use DRIVER_ATTR_WO()
driver core: create write-only attribute macros for devices and drivers
sysfs: create __ATTR_WO()
driver-core: platform: convert bus code to use dev_groups
workqueue: convert bus code to use dev_groups
MEI: convert bus code to use dev_groups
...
05 Aug, 2013
4 commits
-
The debounce timeout is generally quite long and the work not performance
critical so allow the scheduler to run the work anywhere rather than in
the normal per-CPU workqueue.Signed-off-by: Mark Brown
Acked-by: Viresh Kumar
Signed-off-by: Chanwoo Choi
Signed-off-by: Myungjoo Ham -
The debounce timeout is generally quite long and the work not performance
critical so allow the scheduler to run the work anywhere rather than in
the normal per-CPU workqueue.Signed-off-by: Mark Brown
Acked-by: Viresh Kumar
Signed-off-by: Chanwoo Choi
Signed-off-by: Myungjoo Ham -
None of the delayed work the driver schedules has particularly short delays
and it is not performance sensitive so let the scheduler run it wherever
is most efficient rather than in a per CPU workqueue by using the system
power efficient workqueue.Signed-off-by: Mark Brown
Signed-off-by: Chanwoo Choi
Signed-off-by: Myungjoo Ham -
Based on system design, platform needs to detect the VBUS or ID or
both. Provide option to select this through platform data to
disable part of cable detection through palmas-usb.Signed-off-by: Laxman Dewangan
Acked-by: Graeme Gregory
Signed-off-by: Chanwoo Choi
Signed-off-by: Myungjoo Ham