Update extcon for v4.3
This patchset include the function update of extcon drivers without critical update and fix minor issue of extcon drivers. Detailed description for patchset: 1. Update the extcon drivers: - Update the logic of microphone detection for extcon-arizona driver - Support GPIO based USB ID detection of extcon-palmas driver 2. Fix minor issues: - Clean code and remove the opitonal print_state() function pointer from extcon core driver - Clear interrupt bit state before requesting irq on extcon-max778433 driver - Fix signedness bugs of extcon core driver -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJVzIaXAAoJEJzN3yze689T9AYP+wSjsZuqVetmuwchzCrhKBJf wLisDyBKyuZ1OdBS0114pFxjrT11ULGQv9kk1kLQgSCVbnKZvMrRdZkkg9lPA2ut y9PH/1atvB1lSDZaU73I6Hof+7GEt8U38Hk5Ter69xqvhwn2Txg449+HZvwva+RB yrAEDSxeOUPpCGwI/qd913q7918LvUgNvM1IIHHBuJE3NAfAqpec2Pxo1iJLBlac dHOSrxLfVo/xRKUghv3VcP3tzxpznN/xYqYf7t8Q4n0p4pV4FIscqOCMk0jjYISu jP/kdEurzAxqIi1qDIRIcbHGSLMyzlD2qk/uvB+i6Vjf/6N5aFXjTasC5SvbLeVq jZvuoOmtCG412FnwAZNusMf64R8JLWgEQoc9txtOqB4LORD3uObUB0+IKDQmWWW0 lySUFO4CZFhhxlSIQSwjESnxAuhxXSTWJIFn8ZJebmorvZgnnyO4mLo2FNuxT9yO nURvLZK2FbOo60EGYiwHvv4f7eOV7GuxYpUtunYBwjWmRE8yf5ofRFaHpmi9ynA8 y1IJKjyF7znPvwABl9wsthkK5Pt/pJTaVyfPDldJAveK5JjBFOHMp3QLmx74FSlw Z9TmJ/VIoFg6tZINT997lMpKerGBFU2TlNpJFCb0fRUurd9xNfMCjhIqhDyRvVhJ 6BOMAHTxLjH7eXYarEp8 =Cd4Z -----END PGP SIGNATURE----- Merge tag 'extcon-next-for-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-testing Chanwoo writes: Update extcon for v4.3 This patchset include the function update of extcon drivers without critical update and fix minor issue of extcon drivers. Detailed description for patchset: 1. Update the extcon drivers: - Update the logic of microphone detection for extcon-arizona driver - Support GPIO based USB ID detection of extcon-palmas driver 2. Fix minor issues: - Clean code and remove the opitonal print_state() function pointer from extcon core driver - Clear interrupt bit state before requesting irq on extcon-max778433 driver - Fix signedness bugs of extcon core driver
This commit is contained in:
commit
672cfeeb93
11 changed files with 255 additions and 77 deletions
|
|
@ -27,8 +27,6 @@
|
|||
#define __LINUX_EXTCON_H__
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/sysfs.h>
|
||||
|
||||
/*
|
||||
* Define the unique id of supported external connectors
|
||||
|
|
@ -77,8 +75,6 @@ struct extcon_cable;
|
|||
* be attached simulataneously. {0x7, 0} is equivalent to
|
||||
* {0x3, 0x6, 0x5, 0}. If it is {0xFFFFFFFF, 0}, there
|
||||
* can be no simultaneous connections.
|
||||
* @print_state: An optional callback to override the method to print the
|
||||
* status of the extcon device.
|
||||
* @dev: Device of this extcon.
|
||||
* @state: Attach/detach state of this extcon. Do not provide at
|
||||
* register-time.
|
||||
|
|
@ -102,9 +98,6 @@ struct extcon_dev {
|
|||
const unsigned int *supported_cable;
|
||||
const u32 *mutually_exclusive;
|
||||
|
||||
/* Optional callbacks to override class functions */
|
||||
ssize_t (*print_state)(struct extcon_dev *edev, char *buf);
|
||||
|
||||
/* Internal data. Please do not set. */
|
||||
struct device dev;
|
||||
struct raw_notifier_head *nh;
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include <linux/regmap.h>
|
||||
#include <linux/regulator/driver.h>
|
||||
#include <linux/extcon.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/usb/phy_companion.h>
|
||||
|
||||
#define PALMAS_NUM_CLIENTS 3
|
||||
|
|
@ -551,10 +552,16 @@ struct palmas_usb {
|
|||
int vbus_otg_irq;
|
||||
int vbus_irq;
|
||||
|
||||
int gpio_id_irq;
|
||||
struct gpio_desc *id_gpiod;
|
||||
unsigned long sw_debounce_jiffies;
|
||||
struct delayed_work wq_detectid;
|
||||
|
||||
enum palmas_usb_state linkstat;
|
||||
int wakeup;
|
||||
bool enable_vbus_detection;
|
||||
bool enable_id_detection;
|
||||
bool enable_gpio_id_detection;
|
||||
};
|
||||
|
||||
#define comparator_to_palmas(x) container_of((x), struct palmas_usb, comparator)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue