21 Mar, 2018
3 commits
-
Since we are not getting the GPIO from any platform data and global
GPIO numberspace, we simply get the named "extcon" GPIO directly from
the device. Cut away "active low" since GPIO descriptors already know
if the line is active high or low. Simplify a bit with a
struct device *dev helper variable in probe() and cut the complex
init() function.Signed-off-by: Linus Walleij
Signed-off-by: Chanwoo Choi -
This moves the platform data settings from the platform data
struct and into the state container, saving some unnecessary
references and simplifying things a bit.Signed-off-by: Linus Walleij
[cw00.choi: Add FIXME comment of extcon_id]
Signed-off-by: Chanwoo Choi -
Nothing in the entire kernel #includes
so move the platform data declaration inside of the driver.Signed-off-by: Linus Walleij
Signed-off-by: Chanwoo Choi
23 Oct, 2017
1 commit
-
The extcon has two type of extcon devices as following.
- 'extcon provider deivce' adds new extcon device and detect the
state/properties of external connector. Also, it notifies the
state/properties to the extcon consumer device.
- 'extcon consumer device' gets the change state/properties
from extcon provider device.
Prior to that, include/linux/extcon.h contains all exported API for
both provider and consumer device driver. To clarify the meaning of
header file and to remove the wrong use-case on consumer device,
this patch separates into extcon.h and extcon-provider.h.[Description for include/linux/{extcon.h|extcon-provider.h}]
- extcon.h includes the extcon API and data structure for extcon consumer
device driver. This header file contains the following APIs:
: Register/unregister the notifier to catch the change of extcon device
: Get the extcon device instance
: Get the extcon device name
: Get the state of each external connector
: Get the property value of each external connector
: Get the property capability of each external connector- extcon-provider.h includes the extcon API and data structure for extcon
provider device driver. This header file contains the following APIs:
: Include 'include/linux/extcon.h'
: Allocate the memory for extcon device instance
: Register/unregister extcon device
: Set the state of each external connector
: Set the property value of each external connector
: Set the property capability of each external connectorSigned-off-by: Chanwoo Choi
Acked-by: Sebastian Reichel
Acked-by: Chen-Yu Tsai
Acked-by: Charles Keepax
Acked-by: Lee Jones
Acked-by: Felipe Balbi
Acked-by: Yoshihiro Shimoda
Acked-by: Kishon Vijay Abraham I
15 Sep, 2016
1 commit
-
Conflicts:
drivers/extcon/extcon-adc-jack.c
drivers/extcon/extcon-arizona.c
drivers/extcon/extcon-gpio.c
include/linux/extcon.h
13 Sep, 2016
1 commit
-
This patch alters the renamed extcon API to set the state of the external
connectors instead of deprecated extcon_set_cable_state_().Because the patch[1] modifies the function name to maintain the function
naming pattern.
- extcon_set_cable_state_() -> extcon_set_state_sync()
- extcon_get_cable_state_() -> extcon_get_state()[1] https://lkml.org/lkml/2016/8/4/729
- extcon: Rename the extcon_set/get_state() to maintain the function naming patternSigned-off-by: Chanwoo Choi
Acked-by: Charles Keepax
Acked-by: Roger Quadros
10 Sep, 2016
1 commit
-
This patch removes the usage of extcon_set_state() because it uses
the bit masking to change the state of external connectors. The extcon framework
should handle the state by extcon_set_cable_state_() with extcon id.Signed-off-by: Chanwoo Choi
08 Aug, 2016
1 commit
-
This patch removes the usage of extcon_set_state() because it uses
the bit masking to change the state of external connectors. The extcon framework
should handle the state by extcon_set_cable_state_() with extcon id.Signed-off-by: Chanwoo Choi
25 Jan, 2016
1 commit
-
This patch fixes the typo in comment of extcon-gpio.c driver.
- 'interrput' -> 'interrupt'Signed-off-by: Moritz Fischer
Signed-off-by: Chanwoo Choi
30 Sep, 2015
5 commits
-
This patch uses the descriptor-based GPIO interface (gpiod_* API) instead of
legacy gpio_* API and add the internal gpio_extcon_init() to handle
all gpio-related tasks.Signed-off-by: Chanwoo Choi
-
This patch fixes the minor coding style about indentation and removes the
unused fields from struct gpio_extcon_platform_data.Signed-off-by: Chanwoo Choi
-
The commit 2a9de9c0 ("extcon: Use the unique id for external connector instead
of string") defines the unique id of each external connector to identify the
type of external connector instead of string name. So, devm_extcon_dev_allocate()
should include the second parameter (unsigned int *supported_cable). This patch
adds the supported_cable parameter which is passed by platform data.Signed-off-by: Chanwoo Choi
-
There are duplicate data between struct gpio_extcon_data and struct
gpio_extcon_platform_data. This patch removes them from struct gpio_extcon_data.
Instead, this patch add pdata field to struct gpio_extcon_data.Signed-off-by: Chanwoo Choi
-
This patch uses the resource managed function for registering
interrupt.Signed-off-by: Chanwoo Choi
10 Aug, 2015
1 commit
-
This patch removes the optional print_state() function pointer which included
in 'struct extcon_dev' because the extcon must maintain the consistent name
of extcon device on sysfs instead of inconsistent state of external connectors.Signed-off-by: Chanwoo Choi
19 May, 2015
1 commit
-
This patch removes the optional name of extcon device. Instead,
extcon_dev_register() set the device name as 'extcon[number]' naming pattern.
- /sys/class/extcon/[hardcoded device name] -> /sys/class/extcon/extcon[number]Signed-off-by: Chanwoo Choi
Acked-by: Krzysztof Kozlowski
Cc: MyungJoo Ham
Cc: Charles Keepax
Cc: Graeme Gregory
Cc: Kishon Vijay Abraham I
Cc: Krzysztof Kozlowski
Cc: Jaewon Kim
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
22 Sep, 2014
1 commit
-
This patch fixes following minor cleanup:
- Order the include files in alphabetical order.
- Fix description of state_off in extcon_gpio.h
- Add a descrition for check_on_resume in extcon_gpio.hSigned-off-by: George Cherian
[Modify the name/description of patch to keep standary codiyg style by Chanwoo Choi]
Signed-off-by: Chanwoo Choi
16 Jun, 2014
1 commit
-
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
Reported-by: Charles Keepax
Tested-by: Charles Keepax
Cc: Charles Keepax
Cc: Mark Brown
Cc: Graeme Gregory
Cc: Kishon Vijay Abraham I
Cc: Krzysztof Kozlowski
29 Apr, 2014
1 commit
-
This patch use devm_extcon_dev_allocate() to simplify the memory control
of extcon device.Signed-off-by: Chanwoo Choi
Reviewed-by: Felipe Balbi
24 Apr, 2014
1 commit
-
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
Signed-off-by: Chanwoo Choi
19 Mar, 2014
1 commit
-
Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.
Signed-off-by: Jingoo Han
Signed-off-by: Chanwoo Choi
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
1 commit
-
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
27 Sep, 2013
5 commits
-
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 -
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
05 Aug, 2013
1 commit
-
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
14 Feb, 2013
1 commit
-
Signed-off-by: Chanwoo Choi
Signed-off-by: Myungjoo Ham
Signed-off-by: Greg Kroah-Hartman
27 Nov, 2012
3 commits
-
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.Signed-off-by: Bill Pemberton
Cc: MyungJoo Ham
Cc: Chanwoo Choi
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.Signed-off-by: Bill Pemberton
Cc: MyungJoo Ham
Cc: Chanwoo Choi
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.Signed-off-by: Bill Pemberton
Cc: MyungJoo Ham
Cc: Chanwoo Choi
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman
22 Oct, 2012
1 commit
-
extcon.h header file was included twice.
Signed-off-by: Sachin Kamat
Signed-off-by: Sachin Kamat
Signed-off-by: MyungJoo Ham
27 Aug, 2012
1 commit
-
This picks up the printk fixes in 3.6-rc3 that are needed in this branch.
Signed-off-by: Greg Kroah-Hartman
17 Aug, 2012
1 commit
-
Replaced '_' with '-' in the extcon file names, which has been bogging
since new drivers have been using the standard naming.Signed-off-by: MyungJoo Ham
Signed-off-by: Greg Kroah-Hartman