History log of /drivers/extcon/extcon-max77693.c
Revision Date Author Comments
dc6048d7231914a608938d330a5006f9929f76c7 16-Sep-2014 Jonghwa Lee <jonghwa3.lee@samsung.com> extcon: max77693: Fix a bug occured at changing ADC debounce time.

When it writes some value other than 0 to BTLDset and JIGset, muic device
will be reset automatically. And it happens during updating ADC debounce time,
because it shares same register. To update ADC debounce time without reset,
set value only to ADCDbset and 0 to BTLDset and JIGset.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
[Remove un-needed masking operation by Chanwoo Choi]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
d715523174479455b07a8baffbe63ff13e0695bf 12-Sep-2014 Krzysztof Kozlowski <k.kozlowski@samsung.com> extcon: max77693: Use resource managed interrupt line

Use resource managed interrupt line devm_request_threaded_irq() to
simplify a little cleanup paths:
- no goto to cleanup label,
- simpler remove function.

Overall the driver size is decreased by 11 line of code.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
0a16ee633a83374a2bedbd6a057ab7d7e50a1d50 23-Jul-2014 Jingoo Han <jg1.han@samsung.com> extcon: Remove unnecessary OOM messages

The site-specific OOM messages are unnecessary, because they
duplicate the MM subsystem generic OOM message. The following
checkpatch warning is also removed.

WARNING: Possible unnecessary 'out of memory' message

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
[Acked by Charles Keepax for arizona part]
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
342d669c1ee421323f552a62729d3a3d0065093c 21-May-2014 Robert Baldyga <r.baldyga@samsung.com> mfd: max77693: Handle IRQs using regmap

This patch modifies mfd driver to use regmap for handling interrupts.
It allows to simplify irq handling process. This modifications needed
to make small changes in function drivers, which use interrupts.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
d0540f91cf74fab90e1143d8d40da8a5b5fabc8a 21-May-2014 Robert Baldyga <r.baldyga@samsung.com> mfd: max77693: Remove unnecessary wrapper functions

This patch removes wrapper functions used to access regmap, and
make driver using regmap_*() functions instead.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Mark Brown <broonie@linaro.org>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
ac65a625a0961e7a96f2e5e182073691d0474c04 30-May-2014 Chanwoo Choi <cw00.choi@samsung.com> extcon: Set parent device of extcon device using prameter of devm_extcon_dev_allocate

This patch set the parent device of extcon device using first parameter of
devm_extco_dev_allocate() to remove duplicate code on all of extcon provider
drivers.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Reported-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tested-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Graeme Gregory <gg@slimlogic.co.uk>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
577bef11048c9dc7ce5f9f18e89bf5305be49554 21-Apr-2014 Chanwoo Choi <cw00.choi@samsung.com> extcon: max77693: Use devm_extcon_dev_allocate for extcon_dev

This patch use devm_extcon_dev_allocate() to simplify the memory control
of extcon device.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
10fae1184d00f09696078e572230402543ae34c8 21-Apr-2014 Sangjung Woo <sangjung.woo@samsung.com> extcon: max77693: Use devm_extcon_dev_register()

Use the resource-managed extcon device register function (i.e.
devm_extcon_dev_register()) instead of extcon_dev_register(). If extcon device
is attached with this function, that extcon device is automatically unregistered
on driver detach. That reduces tiresome managing code.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
b8629411bf2c0979ae130511f27fd708e2fd102e 09-Apr-2014 Krzysztof Kozlowski <k.kozlowski@samsung.com> extcon: max77693: Use power efficient workqueue for delayed cable detection

Schedule delayed cable detection work on power efficient workqueue
so the scheduler won't wake up idle core for that work.
This extends the idle time for CPU cores and conserves power.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
d5653f2b7304f05eeb45d84f123cf02f840b8537 09-Apr-2014 Krzysztof Kozlowski <k.kozlowski@samsung.com> extcon: max77693: Fix two NULL pointer exceptions on missing pdata

Fix NULL pointer exceptions when platform data is not supplied.

Trace of one exception:
Unable to handle kernel NULL pointer dereference at virtual address 00000008
pgd = c0004000
[00000008] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 2 PID: 1 Comm: swapper/0 Not tainted 3.14.0-12045-gead5dd4687a6-dirty #1628
task: eea80000 ti: eea88000 task.ti: eea88000
PC is at max77693_muic_probe+0x27c/0x528
LR is at regmap_write+0x50/0x60
pc : [<c041d1c8>] lr : [<c02eba60>] psr: 20000113
sp : eea89e38 ip : 00000000 fp : c098a834
r10: ee1a5a10 r9 : 00000005 r8 : c098a83c
r7 : 0000000a r6 : c098a774 r5 : 00000005 r4 : eeb006d0
r3 : c0697bd8 r2 : 00000000 r1 : 00000001 r0 : 00000000
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 10c5387d Table: 4000404a DAC: 00000015
Process swapper/0 (pid: 1, stack limit = 0xeea88240)
Stack: (0xeea89e38 to 0xeea8a000)
9e20: c08499fc eeb006d0
9e40: 00000000 00000000 c0915f98 00000001 00000000 ee1a5a10 c098a730 c09a88b8
9e60: 00000000 c098a730 c0915f98 00000000 00000000 c02d6aa0 c02d6a88 ee1a5a10
9e80: c0a712c8 c02d54e4 00001204 c0628b00 ee1a5a10 c098a730 ee1a5a44 00000000
9ea0: eea88000 c02d57b4 00000000 c098a730 c02d5728 c02d3a24 ee813e5c eeb9d534
9ec0: c098a730 ee22f700 c097c720 c02d4b14 c08174ec c098a730 00000006 c098a730
9ee0: 00000006 c092fd30 c09b8500 c02d5df8 00000000 c093cbb8 00000006 c0008928
9f00: 000000c3 ef7fc785 00000000 ef7fc794 00000000 c08af968 00000072 eea89f30
9f20: ef7fc85e c065f198 000000c3 c003e87c 00000003 00000000 c092fd3c 00000000
9f40: c08af618 c0826d58 00000006 00000006 c0956f58 c093cbb8 00000006 c092fd30
9f60: c09b8500 000000c3 c092fd3c c08e8510 00000000 c08e8bb0 00000006 00000006
9f80: c08e8510 c0c0c0c0 00000000 c0628fac 00000000 00000000 00000000 00000000
9fa0: 00000000 c0628fb4 00000000 c000f038 00000000 00000000 00000000 00000000
9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 c0c0c0c0 c0c0c0c0
[<c041d1c8>] (max77693_muic_probe) from [<c02d6aa0>] (platform_drv_probe+0x18/0x48)
[<c02d6aa0>] (platform_drv_probe) from [<c02d54e4>] (driver_probe_device+0x140/0x384)
[<c02d54e4>] (driver_probe_device) from [<c02d57b4>] (__driver_attach+0x8c/0x90)
[<c02d57b4>] (__driver_attach) from [<c02d3a24>] (bus_for_each_dev+0x54/0x88)
[<c02d3a24>] (bus_for_each_dev) from [<c02d4b14>] (bus_add_driver+0xe8/0x204)
[<c02d4b14>] (bus_add_driver) from [<c02d5df8>] (driver_register+0x78/0xf4)
[<c02d5df8>] (driver_register) from [<c0008928>] (do_one_initcall+0xc4/0x174)
[<c0008928>] (do_one_initcall) from [<c08e8bb0>] (kernel_init_freeable+0xfc/0x1c8)
[<c08e8bb0>] (kernel_init_freeable) from [<c0628fb4>] (kernel_init+0x8/0xec)
[<c0628fb4>] (kernel_init) from [<c000f038>] (ret_from_fork+0x14/0x3c)
Code: caffffe7 e59d200c e3550001 b3a05001 (e5923008)
---[ end trace 85db969ce011bde7 ]---

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: <stable@vger.kernel.org>
Fixes: 190d7cfc8632
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
42d7d7539a7bcf1d493b989465283c464f4a0525 27-Sep-2013 Chanwoo Choi <cw00.choi@samsung.com> extcon: Simplify extcon_dev_register() prototype by removing unnecessary parameter

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 <gg@slimlogic.co.uk>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
a33411b26e43d67d361298a822ecfd76a177183f 05-Aug-2013 Sachin Kamat <sachin.kamat@linaro.org> extcon: max77693: Fix checkpatch warning

Fixes the following warning:
WARNING: space prohibited before semicolon

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
c2275d2fa587712d285a4db97a68322a233ad2c8 23-Aug-2013 Chanwoo Choi <cw00.choi@samsung.com> extcon: Fix up 80 column coding style issues

This patch fix 80 column coding sytle issues by using checkpatch script.

Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
c2536543d53be247786b8beb7c505c629fd55813 08-Apr-2013 Sachin Kamat <sachin.kamat@linaro.org> extcon: max77693: Fix return value

Return the value obtained from the function instead of hardcoding.
Silences the following warnings:
drivers/extcon/extcon-max77693.c:297 max77693_muic_set_path()
info: why not propagate 'ret' from max77693_update_reg() instead of (-11)?
drivers/extcon/extcon-max77693.c:310 max77693_muic_set_path()
info: why not propagate 'ret' from max77693_update_reg() instead of (-11)?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
813b451644686fb7e26a54005e2f7bd495a06121 08-Apr-2013 Sachin Kamat <sachin.kamat@linaro.org> extcon: max77693: Staticize default_init_data

Commit 0ec83bd246 ("extcon: max77693: Initialize register of MUIC
device to bring up it without platform data") added this structure
but forgot to make it static. Without this patch we get the following
warning:
drivers/extcon/extcon-max77693.c:41:26: warning:
symbol 'default_init_data' was not declared. Should it be static?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
0ec83bd2460ed6aed0e7f29f9e0633b054621c02 13-Mar-2013 Chanwoo Choi <cw00.choi@samsung.com> extcon: max77693: Initialize register of MUIC device to bring up it without platform data

This patch set default value of MUIC register to bring up MUIC device.

If user don't set some initial value for MUIC device through platform data,
extcon-max77693 driver use 'default_init_data' to bring up base operation
of MAX77693 MUIC device.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
190d7cfc8632c10bfbfe756f882b6d9cfddfdf6a 18-Feb-2013 Chanwoo Choi <cw00.choi@samsung.com> extcon: max77693: Fix bug of wrong pointer when platform data is not used

This patch fix wrong pointer of platform data. If each machine set
platform data for h/w path or delay time of workqueue, this driver
happen kernel panic related to null pointer.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
45d4a4e6f5e5dcdd00b7c9d370cfb9694358e4e9 31-Jan-2013 Sachin Kamat <sachin.kamat@linaro.org> extcon: max77693: Make max77693_extcon_cable static

'max77693_extcon_cable' is used only in this file. Hence
make it static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
19d3243e797c2abc02a214d3cec9fefa5dc048ff 13-Feb-2013 Chanwoo Choi <cw00.choi@samsung.com> extcon: max77693: Remove unnecessary goto statement to improve readability

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
eff7d74f5b88ef31ac47c6d96b1494db199705f5 13-Feb-2013 Chanwoo Choi <cw00.choi@samsung.com> extcon: max77693: Convert to devm_input_allocate_device()

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
a162629859a03c07b9603ea59a0b7ae24f695689 10-Dec-2012 Chanwoo Choi <cw00.choi@samsung.com> extcon: max77693: Add support Dock-Smart device for desktop mode

This patch support the detection of Dock-Smart device which include
three type of port(HDMI, USB for mouse/keyboard and Micro-USB for
USB/TA cable).The Dock-Smart device need always exteranl power supply
(USB/TA cable through micro-usb cable). Dock-Smart device support screen
output of target to separate monitor and mouse/keyboard for desktop
mode.

Features of 'Dock-Smart device'
- Support HDMI
- Support external output feature of audio
- Support charging through micro-usb port without data
connection if TA cable is connected to target.
- Support charging and data connection through micro-usb port
if USB cable is connected between target and host device.
- Support OTG device (Mouse/Keyboard)

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
0e2738f59c6db185a70a683059980bd2296571ca 06-Dec-2012 Chanwoo Choi <cw00.choi@samsung.com> extcon: max77693: Fix bug when detecting MHL/Dock-Audio with USB/TA cable

This patch fix bug that muic couldn't detect MHL/Dock-Audio with USB/TA
cable on exception situation. I explain detail case on following:

When MHL(with USB/TA cable) or Dock-Audio with USB/TA cable is attached,
the MUIC device happen following two interrupt.
- 'MAX77693_MUIC_IRQ_INT1_ADC' for detecting MHL/Dock-Audio.
- 'MAX77693_MUIC_IRQ_INT2_CHGTYP' for detecting USB/TA cable connected to
MHL/Dock-Audio. Always, happen eariler MAX77693_MUIC_IRQ_INT1_ADC interrupt
than MAX77693_MUIC_IRQ_INT2_CHGTYP interrupt.

If user attach MHL with USB/TA cable and immediately detach MHL with USB/TA
cable before MAX77693_MUIC_IRQ_INT2_CHGTYP interrupt is happened, USB/TA
connected to MHL cable remain connected state to target. But USB/TA connected
to MHL cable isn't connected to target. user be faced with unusual action.
So, driver should check this situation in spite of that, previous charger type
is N/A.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2b75799f5ae9f31ea9778003591fd295d3bc3159 06-Dec-2012 Chanwoo Choi <cw00.choi@samsung.com> extcon: max77693: Set default uart/usb path by using platform data

This patch determine default uart/usb path by using platform data.
The MAX77693 MUIC device can possibliy set USB/UART/AUDIO/USB_AUX
/UART_AUX to internal h/w path of MUIC device. So, drvier should
determine default uart/usb path.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
ae3b3215f8e16ee8234024c77787bac9befb4f4c 27-Nov-2012 Chanwoo Choi <cw00.choi@samsung.com> extcon: max8997/max77693: Support IRQF_NO_SUSPEND flag for interrupt

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
297620fd1e14edf5fefa1736f873b9228336eee1 26-Dec-2012 Chanwoo Choi <cw00.choi@samsung.com> extcon: max77693: Check the state/type of cable after boot completed

This patch check the state/type of cable after completing the initialization
of platform and notify platform of cable state/type through extcon. If extcon
provider driver notify the state/type of cable before completing platform boot,
this uevent is unused and ignored.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
39bf369e4ed321158eb8dc5031b4a9f2108ea614 03-Dec-2012 Chanwoo Choi <cw00.choi@samsung.com> extcon: max77693: Add support dock device and buttons

This patch support detection of dock device with extcon and
buttons of dock device for playing music with input subsystem.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
d0587eb794da221a5c210348abc8f6cceae93896 26-Nov-2012 Chanwoo Choi <cw00.choi@samsung.com> extcon: max77693: Add support jig cable

This patch detect several kinds of JIG cable according to ADC value
and set the hardware line path according to type of JIG cable(JIG-USB-ON
/JIG-USB-OFF/JIG-UART-OFF).

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
06bed0afa24e98b9afa26456c6bed37a6510f7d1 27-Nov-2012 Chanwoo Choi <cw00.choi@samsung.com> extcon: max77693: Add support MHL_TA cable for charging battery

This patch support MHL_TA cable for charging battery. The MHL_TA
cable include MHL with TA cable or MHL with micro USB cable. When
MHL with TA/USB cable is attached, extcon-max77693 driver detect
two interrupt for handling precise operation according to each cable
(MHL and TA/USB cable).

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
154f757fd315270e42bd17f4a68d84bd070e5758 27-Nov-2012 Chanwoo Choi <cw00.choi@samsung.com> extcon: max77693: Remove duplicate code by making function

This patch make max77693-muic_get_cable_type() function to remove
duplicate code because almost internal function need to read
adc/adc1k/adclow/chg_type value of MUIC register. Also, this patch
add description of internal function move field constant of muic device
from extcon-max77693 driver to max77693 header file because of it
is needed for masking some interrupt through platform data.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
5f7e22283cec597e532b75d5a455ce6ed75de362 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> extcon: remove use of __devexit_p

CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
44f34fd4a7f80439f14bdd2df032b0b4427c4ab0 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> extcon: remove use of __devinit

CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
93ed0327808f7d7ef0fc90114c3457629dd683c1 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> extcon: remove use of __devexit

CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3bf742ffd48e7d1cea864741a123203207b33b80 21-Nov-2012 Sachin Kamat <sachin.kamat@linaro.org> extcon: max77693: Fix uninitialised variable warning

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
f4bb5cb54eb97fee9b4e076df8df68b91861b934 20-Nov-2012 Sachin Kamat <sachin.kamat@linaro.org> extcon: max77693: Use devm_kzalloc

devm_kzalloc() is a device managed function. It makes error handling
and cleanup code a bit simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
1967fa08d902cbf1967a29acd2e82628cfb7c7f4 21-Nov-2012 Sachin Kamat <sachin.kamat@linaro.org> extcon: max77693: Fix coding style

As per kernel coding style, if one branch of conditional statement has braces,
the other one should have too.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
00af4b16e098f7899d78c7009f0b525c9c512f94 20-Nov-2012 Sachin Kamat <sachin.kamat@linaro.org> extcon: max77693: Fix incorrect error check and return value

irq_create_mapping() returns 0 if it fails to provide a valid irq number.
'ret' needs to be updated with a negative error code before returning from
probe to signal probe failure. While at it, also corrected the 'virq' type to
unsigned from signed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
44b7bccf7c5372eab3408593ab2142a5dcde03f6 22-Oct-2012 anish kumar <anish198519851985@gmail.com> extcon: trivial: kfree missed from remove path

Extcon core doesn't free the memory when we do unregister.
Kfree is added in the remove path as it was missing.

Signed-off-by: anish kumar <anish198519851985@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
f8457d574f680a98c77846a15df13086ab1ab426 08-Oct-2012 Chanwoo Choi <cw00.choi@samsung.com> extcon: MAX77693: Add platform data for MUIC device to initialize registers

This patch add platform data for MUIC device to initialize register
on probe() call because it should unmask interrupt mask register
and initialize some register related to MUIC device.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
bf2627d66d416ff438f37643d32866aa93947be6 04-Oct-2012 Axel Lin <axel.lin@ingics.com> extcon: max77693: Use max77693_update_reg for rmw operations

This simplifies the code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
b186b12487efc80c44f2f0d26cc26eb249cf1524 21-Aug-2012 Chanwoo Choi <cw00.choi@samsung.com> mfd: MAX77693: Fix NULL pointer error when initializing irqs

This patch initialize register map of MUIC device because mfd driver
of Maxim MAX77693 use regmap-muic instance of MUIC device when irqs of
Maxim MAX77693 is initialized before call max77693-muic probe() function.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reported-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
887780b85a8dde06224f33681ecc4fac73b92a36 21-Aug-2012 Chanwoo Choi <cw00.choi@samsung.com> mfd: MAX77693: Fix NULL pointer error when initializing irqs

This patch initialize register map of MUIC device because mfd driver
of Maxim MAX77693 use regmap-muic instance of MUIC device when irqs of
Maxim MAX77693 is initialized before call max77693-muic probe() function.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reported-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
aa49312f297550ab7ff01f64f385f51cb797f4f0 06-Sep-2012 Fengguang Wu <fengguang.wu@intel.com> extcon: use IRQF_ONESHOT

Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci

Make sure threaded IRQs without a primary handler are always
requested with IRQF_ONESHOT.

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
afcfaa878d1467d8cd03076b7b044e8b3e15d9a1 23-Aug-2012 Peter Meerwald <pmeerw@pmeerw.net> extcon: fix typos in max77693 driver

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
db1b9037424b8219449a6754e9b7e97b0523c426 17-Jul-2012 Chanwoo Choi <cw00.choi@samsung.com> extcon: MAX77693: Add extcon-max77693 driver to support Maxim MAX77693 MUIC device

This patch support Maxim MAX77693 MUIC device by using EXTCON Subsystem
to handle various external connector. The extcon-max77693 use regmap
method for i2c communication and support irq domain instead of previous
method of irq base.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>