aboutsummaryrefslogtreecommitdiff
path: root/drivers/extcon
AgeCommit message (Collapse)AuthorFilesLines
2016-09-10extcon: Add the extcon_type to gather each connector into five categoryChanwoo Choi1-29/+130
This patch adds the new extcon type to group the each connecotr into following five category. This type would be used to handle the connectors as a group unit instead of a connector unit. - EXTCON_TYPE_USB : USB connector - EXTCON_TYPE_CHG : Charger connector - EXTCON_TYPE_JACK : Jack connector - EXTCON_TYPE_DISP : Display connector - EXTCON_TYPE_MISC : Miscellaneous connector Also, each external connector is possible to belong to one more extcon type. In caes of EXTCON_CHG_USB_SDP, it have the EXTCON_TYPE_CHG and EXTCON_TYPE_USB. Signed-off-by: Chanwoo Choi <[email protected]> Tested-by: Chris Zhong <[email protected]> Tested-by: Guenter Roeck <[email protected]> Signed-off-by: MyungJoo Ham <[email protected]> Reviewed-by: Guenter Roeck <[email protected]>
2016-09-10extcon: Fix compile time warningManinder Singh1-1/+1
This patch fixes below compilation warning:- drivers/extcon/extcon.c: In function extcon_register_notifier: drivers/extcon/extcon.c:455:6: warning: idx may be used uninitialized in this function [-Wmaybe-uninitialized] if (idx >= 0) { Signed-off-by: Vaneet Narang <[email protected]> Signed-off-by: Maninder Singh <[email protected]> [cw00.choi : Modify the patch title using the a captical letter for first char] Signed-off-by: Chanwoo Choi <[email protected]>
2016-09-10extcon: Block the bit masking operation for cable state except for extcon coreChanwoo Choi1-19/+1
This patch restrict the usage of extcon_update_state() in the extcon core because the extcon_update_state() use the bit masking to change the state of external connector. When this function is used in device drivers, it may occur the probelm with the handling mistake of bit masking. Also, this patch removes the extcon_get/set_state() functions because these functions use the bit masking which is reluctant way. Instead, extcon provides the extcon_set/get_cable_state_() functions. Signed-off-by: Chanwoo Choi <[email protected]>
2016-09-10extcon: Remove the state_store() to prevent the wrong accessChanwoo Choi1-20/+1
This patch removes the state_store() which change the state of external connectors with bit masking on user-space. It is wrong access to modify the change the state of external connectors. Signed-off-by: Chanwoo Choi <[email protected]>
2016-09-10extcon: gpio: Remove the usage of extcon_set_state()Chanwoo Choi1-1/+1
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 <[email protected]>
2016-09-10extcon: adc-jack: Remove the usage of extcon_set_state()Chanwoo Choi1-12/+14
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/get_cable_state_() with extcon id. Signed-off-by: Chanwoo Choi <[email protected]>
2016-09-10extcon: arizona: Remove the usage of extcon_update_state()Chanwoo Choi1-4/+7
This patch remvoes the usage of extcon_update_state() because the extcon_update_state() use directly the bit masking calculation to change the state of external connector without the unique id of external connector. It makes the code diffcult to read it. So, this patch uses the extcon_set_cable_state_() instead. Signed-off-by: Chanwoo Choi <[email protected]> Acked-by: Charles Keepax <[email protected]>
2016-09-10extcon: arizona: Remove unneeded semi-colonCharles Keepax1-1/+1
There is no need for a semi-colon at the end of a switch statement so remove it. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2016-09-10extcon: Move extcon_get_edev_by_phandle() errors to dbg levelStephen Boyd1-2/+2
Sometimes drivers may call this API and expect it to fail because the extcon they're looking for is optional. Let's move these prints to debug level so it doesn't look like there's a problem when there isn't one. Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2016-09-10extcon: adc-jack: update cable state during bootVenkat Reddy Talla1-0/+1
Update cable state during boot to avoid any missing external cable events occurred before driver initialisation. Signed-off-by: Venkat Reddy Talla <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2016-08-08extcon: Add new EXTCON_CHG_WPT for Wireless Power Transfer deviceChanwoo Choi1-0/+5
This patchs add the new EXTCON_CHG_WPT for Wireless Power Transfer[1]. The Wireless Power Transfer is the transmission of electronical energy from a power source. The EXTCON_CHG_WPT has the EXTCON_TYPE_CHG. [1] https://en.wikipedia.org/wiki/Wireless_power_transfer Signed-off-by: Chanwoo Choi <[email protected]>
2016-08-08extcon: Add new EXTCON_DISP_HMD for Head-mounted Display deviceChanwoo Choi1-0/+5
This patch adds the new EXTCON_DISP_HMD id for Head-mounted Display[1] device. The HMD device is usually for USB connector type So, the HMD connector has the two extcon types of both EXTCON_TYPE_DISP and EXTCON_TYPE_USB. [1] https://en.wikipedia.org/wiki/Head-mounted_display Signed-off-by: Chanwoo Choi <[email protected]>
2016-08-08extcon: Add EXTCON_DISP_DP and the property for USB Type-CChris Zhong1-0/+5
Add EXTCON_DISP_DP for the Display external connector. For Type-C connector the DisplayPort can work as an Alternate Mode(VESA DisplayPort Alt Mode on USB Type-C Standard). The Type-C support both normal and flipped orientation, so add a property to extcon. Signed-off-by: Chris Zhong <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]> Tested-by: Chris Zhong <[email protected]> Tested-by: Guenter Roeck <[email protected]> Reviewed-by: Guenter Roeck <[email protected]>
2016-08-08extcon: Add the synchronization extcon APIs to support the notificationChanwoo Choi1-75/+135
This patch adds the synchronization extcon APIs to support the notifications for both state and property. When extcon_*_sync() functions is called, the extcon informs the information from extcon provider to extcon client. The extcon driver may need to change the both state and multiple properties at the same time. After setting the data of a external connector, the extcon send the notification to client driver with the extcon_*_sync(). The list of new extcon APIs as following: - extcon_sync() : Send the notification for each external connector to synchronize the information between extcon provider driver and extcon client driver. - extcon_set_state_sync() : Set the state of external connector with noti. - extcon_set_property_sync() : Set the property of external connector with noti. For example, case 1, change the state of external connector and synchronized the data. extcon_set_state_sync(edev, EXTCON_USB, 1); case 2, change both the state and property of external connector and synchronized the data. extcon_set_state(edev, EXTCON_USB, 1); extcon_set_property(edev, EXTCON_USB, EXTCON_PROP_USB_VBUS 1); extcon_sync(edev, EXTCON_USB); case 3, change the property of external connector and synchronized the data. extcon_set_property(edev, EXTCON_USB, EXTCON_PROP_USB_VBUS, 0); extcon_sync(edev, EXTCON_USB); case 4, change the property of external connector and synchronized the data. extcon_set_property_sync(edev, EXTCON_USB, EXTCON_PROP_USB_VBUS, 0); Signed-off-by: Chanwoo Choi <[email protected]> Tested-by: Chris Zhong <[email protected]> Tested-by: Guenter Roeck <[email protected]> Reviewed-by: Guenter Roeck <[email protected]>
2016-08-08extcon: Rename the extcon_set/get_state() to maintain the function naming ↵Chanwoo Choi1-15/+13
pattern This patch just renames the existing extcon_get/set_cable_state_() as following because of maintaining the function naming pattern like as extcon APIs for property. - extcon_set_cable_state_() -> extcon_set_state() - extcon_get_cable_state_() -> extcon_get_state() But, this patch remains the old extcon_set/get_cable_state_() functions to prevent the build break. After altering new APIs, remove the old APIs. Signed-off-by: Chanwoo Choi <[email protected]> Tested-by: Chris Zhong <[email protected]> Tested-by: Guenter Roeck <[email protected]> Reviewed-by: Guenter Roeck <[email protected]>
2016-08-08extcon: Add the support for the capability of each propertyChanwoo Choi1-0/+140
This patch adds the support of the property capability setting. This function decides the supported properties of each external connector on extcon provider driver. Ths list of new extcon APIs to get/set the capability of property as following: - int extcon_get_property_capability(struct extcon_dev *edev, unsigned int id, unsigned int prop); - int extcon_set_property_capability(struct extcon_dev *edev, unsigned int id, unsigned int prop); Signed-off-by: Chanwoo Choi <[email protected]> Tested-by: Chris Zhong <[email protected]> Tested-by: Guenter Roeck <[email protected]> Reviewed-by: Guenter Roeck <[email protected]>
2016-08-08extcon: Add the support for extcon property according to extcon typeChanwoo Choi1-1/+200
This patch support the extcon property for the external connector because each external connector might have the property according to the H/W design and the specific characteristics. - EXTCON_PROP_USB_[property name] - EXTCON_PROP_CHG_[property name] - EXTCON_PROP_JACK_[property name] - EXTCON_PROP_DISP_[property name] Add the new extcon APIs to get/set the property value as following: - int extcon_get_property(struct extcon_dev *edev, unsigned int id, unsigned int prop, union extcon_property_value *prop_val) - int extcon_set_property(struct extcon_dev *edev, unsigned int id, unsigned int prop, union extcon_property_value prop_val) Signed-off-by: Chanwoo Choi <[email protected]> Tested-by: Chris Zhong <[email protected]> Tested-by: Guenter Roeck <[email protected]> Reviewed-by: Guenter Roeck <[email protected]>
2016-08-08extcon: Add the extcon_type to gather each connector into five categoryChanwoo Choi1-29/+130
This patch adds the new extcon type to group the each connecotr into following five category. This type would be used to handle the connectors as a group unit instead of a connector unit. - EXTCON_TYPE_USB : USB connector - EXTCON_TYPE_CHG : Charger connector - EXTCON_TYPE_JACK : Jack connector - EXTCON_TYPE_DISP : Display connector - EXTCON_TYPE_MISC : Miscellaneous connector Also, each external connector is possible to belong to one more extcon type. In caes of EXTCON_CHG_USB_SDP, it have the EXTCON_TYPE_CHG and EXTCON_TYPE_USB. Signed-off-by: Chanwoo Choi <[email protected]> Tested-by: Chris Zhong <[email protected]> Tested-by: Guenter Roeck <[email protected]> Signed-off-by: MyungJoo Ham <[email protected]> Reviewed-by: Guenter Roeck <[email protected]>
2016-08-08extcon: Fix compile time warningManinder Singh1-1/+1
This patch fixes below compilation warning:- drivers/extcon/extcon.c: In function extcon_register_notifier: drivers/extcon/extcon.c:455:6: warning: idx may be used uninitialized in this function [-Wmaybe-uninitialized] if (idx >= 0) { Signed-off-by: Vaneet Narang <[email protected]> Signed-off-by: Maninder Singh <[email protected]> [cw00.choi : Modify the patch title using the a captical letter for first char] Signed-off-by: Chanwoo Choi <[email protected]>
2016-08-08extcon: Block the bit masking operation for cable state except for extcon coreChanwoo Choi1-19/+1
This patch restrict the usage of extcon_update_state() in the extcon core because the extcon_update_state() use the bit masking to change the state of external connector. When this function is used in device drivers, it may occur the probelm with the handling mistake of bit masking. Also, this patch removes the extcon_get/set_state() functions because these functions use the bit masking which is reluctant way. Instead, extcon provides the extcon_set/get_cable_state_() functions. Signed-off-by: Chanwoo Choi <[email protected]>
2016-08-08extcon: Remove the state_store() to prevent the wrong accessChanwoo Choi1-20/+1
This patch removes the state_store() which change the state of external connectors with bit masking on user-space. It is wrong access to modify the change the state of external connectors. Signed-off-by: Chanwoo Choi <[email protected]>
2016-08-08extcon: gpio: Remove the usage of extcon_set_state()Chanwoo Choi1-1/+1
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 <[email protected]>
2016-08-08extcon: adc-jack: Remove the usage of extcon_set_state()Chanwoo Choi1-12/+14
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/get_cable_state_() with extcon id. Signed-off-by: Chanwoo Choi <[email protected]>
2016-08-08extcon: arizona: Remove the usage of extcon_update_state()Chanwoo Choi1-4/+7
This patch remvoes the usage of extcon_update_state() because the extcon_update_state() use directly the bit masking calculation to change the state of external connector without the unique id of external connector. It makes the code diffcult to read it. So, this patch uses the extcon_set_cable_state_() instead. Signed-off-by: Chanwoo Choi <[email protected]> Acked-by: Charles Keepax <[email protected]>
2016-08-08extcon: arizona: Remove unneeded semi-colonCharles Keepax1-1/+1
There is no need for a semi-colon at the end of a switch statement so remove it. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2016-08-08extcon: Move extcon_get_edev_by_phandle() errors to dbg levelStephen Boyd1-2/+2
Sometimes drivers may call this API and expect it to fail because the extcon they're looking for is optional. Let's move these prints to debug level so it doesn't look like there's a problem when there isn't one. Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2016-08-08extcon: adc-jack: update cable state during bootVenkat Reddy Talla1-0/+1
Update cable state during boot to avoid any missing external cable events occurred before driver initialisation. Signed-off-by: Venkat Reddy Talla <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2016-07-02extcon: adc-jack: add suspend/resume supportVenkat Reddy Talla1-0/+34
adding suspend and resume funtionality for extcon-adc-jack driver to configure system wake up for extcon events, also adding support to enable/disable system wakeup through flag wakeup_source based on platform requirement. Signed-off-by: Venkat Reddy Talla <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2016-07-02extcon: add missing of_node_put after calling of_parse_phandlePeter Chen1-0/+2
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2016-06-30extcon: link devres into core moduleArnd Bergmann1-1/+2
Splitting the resource-managed functions into a separate module means that the extcon core now fails to build because the internal "extcon_dev_allocate" symbol is not exported: ERROR: extcon_dev_allocate [drivers/extcon/devres.ko] undefined! My guess is that the intention was not to have two separate modules (which could be fixed by adding an export, plus the normal MODULE_AUTHOR/MODULE_LICENSE/... fields), but have two source files in the same module. This fixes the Makefile accordingly, making the name of the module extcon_core.ko, which is created from building both extcon.c and devres.c. Fixes: b225d00f3ad2 ("extcon: Split out the resource-managed functions from extcon core") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2016-06-27extcon: Add resource-managed functions to register extcon notifierChanwoo Choi1-0/+73
This patch adds the resource-managed functions for register/unregister the extcon notifier with the id of each external connector. This function will make it easy to handle the extcon notifier. - int devm_extcon_register_notifier(struct device *dev, struct extcon_dev *edev, unsigned int id, struct notifier_block *nb); - void devm_extcon_unregister_notifier(struct device *dev, struct extcon_dev *edev, unsigned int id, struct notifier_block *nb); Signed-off-by: Chanwoo Choi <[email protected]>
2016-06-27extcon: Split out the resource-managed functions from extcon coreChanwoo Choi3-118/+144
This patch split out the resource-managed related functions from extcon core driver. Signed-off-by: Chanwoo Choi <[email protected]>
2016-06-27extcon: Move struct extcon_cable from header file to coreChanwoo Choi1-0/+20
This patch moves the struct extcon_cable because that should be only handled by extcon core. There are no reason to publish the internal structure. Signed-off-by: Chanwoo Choi <[email protected]>
2016-06-23extcon: Check for incorrect connection type in notifier registerStephen Boyd1-0/+4
If we call extcon_register_notifier() with the wrong cable type, it blows up with an oops instead of returning an error code. Let's be nice and fail gracefully given that the consumer might not know if the cable is supported by the extcon provider. Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2016-06-21Merge branch 'ib-extcon-powersupply-4.8' into extcon-nextChanwoo Choi1-177/+24
2016-06-21extcon: usb-gpio: add support for ACPI gpio interfaceLu Baolu1-1/+2
GPIO resource could be retrieved through APCI as well. Signed-off-by: Lu Baolu <[email protected]> Reviewed-by: Felipe Balbi <[email protected]> Acked-by: Chanwoo Choi <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2016-06-21extcon: usb-gpio: add device binding for platform deviceLu Baolu1-0/+7
This is needed to handle the GPIO connected USB ID pin found on Intel Baytrail devices. Signed-off-by: Lu Baolu <[email protected]> Reviewed-by: Felipe Balbi <[email protected]> Acked-by: Chanwoo Choi <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2016-06-21extcon: usb-gpio: Don't miss event during suspend/resumeRoger Quadros1-0/+3
Pin state might have changed during suspend/resume while our interrupts were disabled and if device doesn't support wakeup. Scan for change during resume for such case. Signed-off-by: Roger Quadros <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2016-06-21extcon: usb-gpio: switch to use pm wakeirq apisGrygorii Strashko1-13/+6
Switch to use PM wakeirq APIs which automates wakeup IRQs enabling/disabling and so allows to make code simpler. Signed-off-by: Grygorii Strashko <[email protected]> Acked-by: Tony Lindgren <[email protected]> Acked-by: Roger Quadros <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2016-06-15extcon: palmas: Fix boot up state of VBUS when using GPIO detectionRoger Quadros1-0/+2
If USB cable is connected prior to boot, we don't get any interrupts so we must manually check the VBUS state and report it during probe. If we don't do it then USB controller will never know that peripheral cable was connected till the user unplugs and replugs the cable. Fixes: b7aad8e2685b ("extcon: palmas: Add the support for VBUS detection by using GPIO") Cc: [email protected] Signed-off-by: Roger Quadros <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2016-06-10extcon: Remove the deprecated extcon functionsChanwoo Choi1-177/+24
This patch removes the deprecated extcon functions using string type to identify the type of external connector. The Commit 2a9de9c0f08d61 ("extcon: Use the unique id for external connector instead of string) uses the unique id to separate the type of external connector instead of string name. - extcon_register_interest() - extcon_unregister_interest() - extcon_set_cable_state() - extcon_get_cable_state() And, extcon_register_interest() finds the first extcon device to include the requested external connector from extcon client device and then register the notifier if extcon device argument is NULL. Instead, extcon_register_notifier() supports this feature. But, this patch remains the deprecatd function definition to prevent the build break. Signed-off-by: Chanwoo Choi <[email protected]>
2016-04-04extcon: palmas: Drop stray IRQF_EARLY_RESUME flagNishanth Menon1-2/+1
Palmas extcon IRQs are nested threaded and wired to the Palmas interrupt controller. So, this flag is not required for nested IRQs anymore, since commit 3c646f2c6aa9 ("genirq: Don't suspend nested_thread irqs over system suspend") was merged. However, the fix in commit ae64e42cc2b3 ("extcon: palmas: Drop IRQF_EARLY_RESUME flag") missed a stray flag causing the following crash on resume on BeagleBoard-X15 platform: [ 53.670141] Unhandled fault: imprecise external abort (0x1406) at 0x00000000 [..] [ 53.670141] [<c04ae734>] (omap_set_gpio_triggering) from [<c04aeb94>] (omap_gpio_unmask_irq+0xc0/0xc4) [ 53.670141] [<c04aeb94>] (omap_gpio_unmask_irq) from [<c01a0b88>] (irq_enable+0x30/0x44) [ 53.670141] [<c01a0b88>] (irq_enable) from [<c019ebd8>] (__enable_irq+0x54/0x78) [ 53.670141] [<c019ebd8>] (__enable_irq) from [<c01a4e60>] (resume_irqs+0xe8/0x100) [ 53.670141] [<c01a4e60>] (resume_irqs) from [<c0514840>] (syscore_resume+0x94/0x298) [ 53.670141] [<c0514840>] (syscore_resume) from [<c01981cc>] (suspend_devices_and_enter+0x790/0x9e4) [ 53.670141] [<c01981cc>] (suspend_devices_and_enter) from [<c0198a60>] (pm_suspend+0x640/0x75c) [ 53.670141] [<c0198a60>] (pm_suspend) from [<c0196bec>] (state_store+0x64/0xb8) [ 53.670141] [<c0196bec>] (state_store) from [<c0307944>] (kernfs_fop_write+0xc0/0x1bc) [ 53.670141] [<c0307944>] (kernfs_fop_write) from [<c028acb0>] (__vfs_write+0x1c/0xd8) [ 53.670141] [<c028acb0>] (__vfs_write) from [<c028bba0>] (vfs_write+0x90/0x16c) [ 53.670141] [<c028bba0>] (vfs_write) from [<c028c8c0>] (SyS_write+0x44/0x9c) [ 53.670141] [<c028c8c0>] (SyS_write) from [<c0107840>] (ret_fast_syscall+0x0/0x1c) [..] Fixes: ae64e42cc2b3 ("extcon: palmas: Drop IRQF_EARLY_RESUME flag") Cc: Grygorii Strashko <[email protected]> Cc: MyungJoo Ham <[email protected]> Cc: Chanwoo Choi <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Lee Jones <[email protected]> Cc: Roger Quadros <[email protected]> Reviewed-by: Grygorii Strashko <[email protected]> Signed-off-by: Nishanth Menon <[email protected]> Acked-by: Roger Quadros <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2016-02-29extcon: palmas: Drop IRQF_EARLY_RESUME flagGrygorii Strashko1-2/+2
Palams extcon IRQs are nested threaded and wired to the Palmas inerrupt controller. So, this flag is not required for nested irqs anymore, since commit 3c646f2c6aa9 ("genirq: Don't suspend nested_thread irqs over system suspend") was merged. Cc: MyungJoo Ham <[email protected]> Cc: Chanwoo Choi <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Lee Jones <[email protected]> Cc: Roger Quadros <[email protected]> Cc: Nishanth Menon <[email protected]> Signed-off-by: Grygorii Strashko <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2016-02-05extcon: palmas: Add the support for VBUS detection by using GPIOFelipe Balbi1-0/+50
This patch support for VBUS detection by using GPIO pin. Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]> Acked-by: Lee Jones <[email protected]>
2016-02-05extcon: max77843: Use correct size for reading the interrupt registerDan Carpenter1-1/+1
The info->status[] array has 3 elements. We are using size MAX77843_MUIC_IRQ_NUM (16) instead of MAX77843_MUIC_STATUS_NUM (3) as intended. Fixes: 135d9f7d135a ('extcon: max77843: Clear IRQ bits state before request IRQ') Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Jaewon Kim <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> [cw00.choi: Modify the patch title] Signed-off-by: Chanwoo Choi <[email protected]>
2016-01-25extcon: arizona: Use DAPM mutex helper functionsCharles Keepax1-2/+2
We should be using the helper functions to lock the DAPM mutex not accessing it directly. There are no ill effects of this as the moment but it is best practice, and the implementation could be changed in the future. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2016-01-25extcon: Add the EXTCON_CHG_USB_SDP to support SDP charing portChanwoo Choi6-1/+28
This patch adds the new EXTCON_CHG_USB_SDP connector to support SDP (Standard Downstream Port) USB charging port. The commit 11eecf910bd8 ("extcon: Modify the id and name of external connector") add the new EXTCON_CHG_USB_SDP connector which support the both data transfer and usb charging at the same time. Signed-off-by: Chanwoo Choi <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]>
2016-01-25extcon: gpio: Fix typo in commentMoritz Fischer1-1/+1
This patch fixes the typo in comment of extcon-gpio.c driver. - 'interrput' -> 'interrupt' Signed-off-by: Moritz Fischer <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2016-01-25extcon: Use to_i2c_client for both rt8973a and sm5502Geliang Tang2-4/+4
Use to_i2c_client() instead of open-coding it. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2015-12-21extcon: add Maxim MAX3355 driverSergei Shtylyov3-0/+156
Maxim Integrated MAX3355E chip integrates a charge pump and comparators to enable a system with an integrated USB OTG dual-role transceiver to function as an USB OTG dual-role device. In addition to sensing/controlling Vbus, the chip also passes thru the ID signal from the USB OTG connector. On some Renesas boards, this signal is just fed into the SoC thru a GPIO pin -- there's no real OTG controller, only host and gadget USB controllers sharing the same USB bus; however, we'd like to allow host or gadget drivers to be loaded depending on the cable type, hence the need for the MAX3355 extcon driver. The Vbus status signals are also wired to GPIOs (however, we aren't currently interested in them), the OFFVBUS# signal is controlled by the host controllers, there's also the SHDN# signal wired to a GPIO, it should be driven high for the normal operation. Signed-off-by: Sergei Shtylyov <[email protected]> Acked-by: Chanwoo Choi <[email protected]> Acked-by: Rob Herring <[email protected]> [cw00.choi: Add the GPIOLIB dependency] Signed-off-by: Chanwoo Choi <[email protected]>