diff options
author | Chanwoo Choi <cw00.choi@samsung.com> | 2013-08-30 17:15:53 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 11:44:47 +0900 |
commit | af9d4b498e54ac6817080016461b9d0ad79304ff (patch) | |
tree | a89d4c25b4fe93112e5e699e9d20fd2323c1f104 /include | |
parent | ab6ad841f239aa1e3b64b7cfc64766e808099708 (diff) | |
download | linux-3.10-af9d4b498e54ac6817080016461b9d0ad79304ff.tar.gz linux-3.10-af9d4b498e54ac6817080016461b9d0ad79304ff.tar.bz2 linux-3.10-af9d4b498e54ac6817080016461b9d0ad79304ff.zip |
extcon: Add extcon-port driver to maintain compatibility with old jack driver
This patch add extcon-port driver which maintain compatibility with old JACK
driver(drivers/misc/jack.c). extcon-port driver send uevent to user-space
when receive notification of cable state from EXTCON.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Conflicts:
drivers/extcon/Kconfig
drivers/extcon/Makefile
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/extcon/extcon-port.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/include/linux/extcon/extcon-port.h b/include/linux/extcon/extcon-port.h new file mode 100644 index 00000000000..6438ec4fc2e --- /dev/null +++ b/include/linux/extcon/extcon-port.h @@ -0,0 +1,46 @@ +/* + * include/linux/extcon/extcon-port.h + * + * Copyright (C) 2012 Samsung Electronics + * Chanwoo Choi <cw00.choi@samsung.com> + * + * based on include/linux/jack.h + * Copyright (C) 2009 Samsung Electronics + * Minkyu Kang <mk7.samsung.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __EXTCON_PORT_H_ +#define __EXTCON_PORT_H_ + +struct jack_platform_data { + int usb_online; + int charger_online; + int hdmi_online; + int earjack_online; + int earkey_online; + int ums_online; + int cdrom_online; + int jig_online; + int host_online; + int cradle_online; + + char *extcon_name_muic; + char *extcon_name_jack; + char *extcon_name_hdmi; +}; + +#ifdef CONFIG_EXTCON_PORT +extern int jack_get_data(const char *name); +extern void jack_event_handler(char *name, int value); +#else +static int jack_get_data(const char *name) +{ + return 0; +} +static void jack_event_handler(char *name, int value) {} +#endif +#endif |