linux/drivers
MyungJoo Ham de55d8716a Extcon (external connector): import Android's switch class and modify.
External connector class (extcon) is based on and an extension of
Android kernel's switch class located at linux/drivers/switch/.

This patch provides the before-extension switch class moved to the
location where the extcon will be located (linux/drivers/extcon/) and
updates to handle class properly.

The before-extension class, switch class of Android kernel, commits
imported are:

switch: switch class and GPIO drivers. (splitted)
Author: Mike Lockwood <lockwood@android.com>

switch: Use device_create instead of device_create_drvdata.
Author: Arve Hjønnevåg <arve@android.com>

In this patch, upon the commits of Android kernel, we have added:
- Relocated and renamed for extcon.
- Comments, module name, and author information are updated
- Code clean for successing patches
- Bugfix: enabling write access without write functions
- Class/device/sysfs create/remove handling
- Added comments about uevents
- Format changes for extcon_dev_register() to have a parent dev.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

--
Changes from v7
- Compiler error fixed when it is compiled as a module.
- Removed out-of-date Kconfig entry

Changes from v6
- Updated comment/strings
- Revised "Android-compatible" mode.
   * Automatically activated if CONFIG_ANDROID && !CONFIG_ANDROID_SWITCH
   * Creates /sys/class/switch/*, which is a copy of /sys/class/extcon/*

Changes from v5
- Split the patch
- Style fixes
- "Android-compatible" mode is enabled by Kconfig option.

Changes from v2
- Updated name_show
- Sysfs entries are handled by class itself.
- Updated the method to add/remove devices for the class
- Comments on uevent send
- Able to become a module
- Compatible with Android platform

Changes from RFC
- Renamed to extcon (external connector) from multistate switch
- Added a seperated directory (drivers/extcon)
- Added kerneldoc comments
- Removed unused variables from extcon_gpio.c
- Added ABI Documentation.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-20 09:21:11 -07:00
..
accessibility
acpi Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-04-06 19:56:04 -07:00
amba
ata
atm Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
auxdisplay
base Revert "driver core: check start node in klist_iter_init_node" 2012-04-19 19:17:30 -07:00
bcma
block Two fixes for regressions: 2012-04-06 17:54:53 -07:00
bluetooth Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
cdrom
char Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2012-04-06 17:56:20 -07:00
clk
clocksource Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-03-29 16:53:48 -07:00
connector
cpufreq ARM: SoC fixes for 3.4-rc2 2012-04-05 22:13:39 -07:00
cpuidle Merge branches 'idle-fix' and 'misc' into release 2012-04-06 21:48:59 -04:00
crypto
dca
devfreq ARM: global cleanups 2012-03-27 16:03:32 -07:00
dio
dma Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
edac Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2012-04-06 17:56:20 -07:00
eisa
extcon Extcon (external connector): import Android's switch class and modify. 2012-04-20 09:21:11 -07:00
firewire Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
firmware
gpio gpio: tegra: Iterate over the correct number of banks 2012-04-04 13:13:18 -06:00
gpu Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
hid simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
hsi
hv hv: fix return type of hv_post_message() 2012-04-09 15:05:47 -07:00
hwmon hwmon: (ad7314) Adds missing spi_dev initialization 2012-04-03 17:08:28 -07:00
hwspinlock
i2c Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
ide Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
idle simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
ieee802154
infiniband Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2012-03-29 23:17:44 -07:00
iommu Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-04-02 17:53:39 -07:00
leds MFD changes for 3.4 2012-03-28 13:56:35 -07:00
lguest
macintosh Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
mca
md md/raid1,raid10: don't compare excess byte during consistency check. 2012-04-03 15:39:23 +10:00
media ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
memstick
message Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
mfd Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
misc Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
mmc mmc: use really long write timeout to deal with crappy cards 2012-04-05 20:32:34 -04:00
mtd Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
net Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2012-04-06 17:56:20 -07:00
nfc
nubus Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
of GPIO changes for v3.4 2012-03-28 14:08:46 -07:00
oprofile simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
parisc Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
parport
pci Two fixes for regressions: 2012-04-06 17:54:53 -07:00
pcmcia Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia 2012-03-29 16:00:48 -07:00
pinctrl
platform Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-03-30 16:45:39 -07:00
pnp Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-03-30 16:45:39 -07:00
power Various small bugfixes and enhancements, plus two new drivers: 2012-03-30 16:09:02 -07:00
pps
ps3
ptp
rapidio
regulator regulator: Fixes for -rc1 2012-04-04 10:09:30 -07:00
remoteproc simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
rpmsg
rtc Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
s390 Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
sbus Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
scsi Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
sfi
sh SuperH updates for 3.4 merge window 2012-03-30 00:09:17 -07:00
sn
spi Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
ssb
staging Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
target tcm_fc: Do not free tpg structure during wq allocation failure 2012-04-06 18:57:05 -07:00
tc
thermal
tty SuperH updates for 3.4-rc1 2012-04-07 09:52:46 -07:00
uio
usb ARM: SoC fixes for 3.4-rc2 2012-04-05 22:13:39 -07:00
uwb simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
vhost
video ARM: SoC fixes for 3.4-rc2 2012-04-05 22:13:39 -07:00
virt
virtio virtio-pci: switch to PM ops macro to initialise PM functions 2012-03-31 08:09:51 +05:30
vlynq
w1 w1: w1_ds28e04: unlock on error path in w1_f1C_write_pio() 2012-04-18 15:37:35 -07:00
watchdog ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
xen Two fixes for regressions: 2012-04-06 17:54:53 -07:00
zorro
Kconfig Extcon (external connector): import Android's switch class and modify. 2012-04-20 09:21:11 -07:00
Makefile Extcon (external connector): import Android's switch class and modify. 2012-04-20 09:21:11 -07:00