Commit 1660557b authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge tag 'extcon-next-for-5.6' of...

Merge tag 'extcon-next-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next

Chanwoo writes:

Update extcon for 5.6

Detailed description for this pull request:
1. Remove unneeded 'extern' keyword from extcon.h header file
2. Clean-up the extcon provider
- Clean-up the code for readability of extcon-arizona/sm5502.c

* tag 'extcon-next-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon:
  extcon: Remove unneeded extern keyword from extcon.h
  extcon: sm5502: Remove unneeded semicolon
  extcon: arizona: Factor out microphone and button detection
  extcon: arizona: Factor out microphone impedance into a function
  extcon: arizona: Invert logic of check in arizona_hpdet_do_id
  extcon: arizona: Remove excessive WARN_ON
  extcon: arizona: Remove unnecessary sets of ACCDET_MODE
  extcon: arizona: Tidy up transition from mic to headphone detect
  extcon: arizona: Clear jack status regardless of detection type
  extcon: arizona: Move pdata extraction to probe
  extcon: arizona: Make rev A register sequences atomic
  extcon: arizona: Correct clean up if arizona_identify_headphone fails
parents 40ce9798 b7365587
This diff is collapsed.
...@@ -249,7 +249,7 @@ static int sm5502_muic_set_path(struct sm5502_muic_info *info, ...@@ -249,7 +249,7 @@ static int sm5502_muic_set_path(struct sm5502_muic_info *info,
dev_err(info->dev, "Unknown DM_CON/DP_CON switch type (%d)\n", dev_err(info->dev, "Unknown DM_CON/DP_CON switch type (%d)\n",
con_sw); con_sw);
return -EINVAL; return -EINVAL;
}; }
switch (vbus_sw) { switch (vbus_sw) {
case VBUSIN_SWITCH_OPEN: case VBUSIN_SWITCH_OPEN:
...@@ -268,7 +268,7 @@ static int sm5502_muic_set_path(struct sm5502_muic_info *info, ...@@ -268,7 +268,7 @@ static int sm5502_muic_set_path(struct sm5502_muic_info *info,
default: default:
dev_err(info->dev, "Unknown VBUS switch type (%d)\n", vbus_sw); dev_err(info->dev, "Unknown VBUS switch type (%d)\n", vbus_sw);
return -EINVAL; return -EINVAL;
}; }
return 0; return 0;
} }
...@@ -357,13 +357,13 @@ static unsigned int sm5502_muic_get_cable_type(struct sm5502_muic_info *info) ...@@ -357,13 +357,13 @@ static unsigned int sm5502_muic_get_cable_type(struct sm5502_muic_info *info)
"cannot identify the cable type: adc(0x%x)\n", "cannot identify the cable type: adc(0x%x)\n",
adc); adc);
return -EINVAL; return -EINVAL;
}; }
break; break;
default: default:
dev_err(info->dev, dev_err(info->dev,
"failed to identify the cable type: adc(0x%x)\n", adc); "failed to identify the cable type: adc(0x%x)\n", adc);
return -EINVAL; return -EINVAL;
}; }
return cable_type; return cable_type;
} }
...@@ -405,7 +405,7 @@ static int sm5502_muic_cable_handler(struct sm5502_muic_info *info, ...@@ -405,7 +405,7 @@ static int sm5502_muic_cable_handler(struct sm5502_muic_info *info,
dev_dbg(info->dev, dev_dbg(info->dev,
"cannot handle this cable_type (0x%x)\n", cable_type); "cannot handle this cable_type (0x%x)\n", cable_type);
return 0; return 0;
}; }
/* Change internal hardware path(DM_CON/DP_CON, VBUSIN) */ /* Change internal hardware path(DM_CON/DP_CON, VBUSIN) */
ret = sm5502_muic_set_path(info, con_sw, vbus_sw, attached); ret = sm5502_muic_set_path(info, con_sw, vbus_sw, attached);
......
...@@ -170,7 +170,7 @@ struct extcon_dev; ...@@ -170,7 +170,7 @@ struct extcon_dev;
* Following APIs get the connected state of each external connector. * Following APIs get the connected state of each external connector.
* The 'id' argument indicates the defined external connector. * The 'id' argument indicates the defined external connector.
*/ */
extern int extcon_get_state(struct extcon_dev *edev, unsigned int id); int extcon_get_state(struct extcon_dev *edev, unsigned int id);
/* /*
* Following APIs get the property of each external connector. * Following APIs get the property of each external connector.
...@@ -181,10 +181,10 @@ extern int extcon_get_state(struct extcon_dev *edev, unsigned int id); ...@@ -181,10 +181,10 @@ extern int extcon_get_state(struct extcon_dev *edev, unsigned int id);
* for each external connector. They are used to get the capability of the * for each external connector. They are used to get the capability of the
* property of each external connector based on the id and property. * property of each external connector based on the id and property.
*/ */
extern int extcon_get_property(struct extcon_dev *edev, unsigned int id, int extcon_get_property(struct extcon_dev *edev, unsigned int id,
unsigned int prop, unsigned int prop,
union extcon_property_value *prop_val); union extcon_property_value *prop_val);
extern int extcon_get_property_capability(struct extcon_dev *edev, int extcon_get_property_capability(struct extcon_dev *edev,
unsigned int id, unsigned int prop); unsigned int id, unsigned int prop);
/* /*
...@@ -196,38 +196,38 @@ extern int extcon_get_property_capability(struct extcon_dev *edev, ...@@ -196,38 +196,38 @@ extern int extcon_get_property_capability(struct extcon_dev *edev,
* extcon_register_notifier_all(*edev, *nb) : Register a notifier block * extcon_register_notifier_all(*edev, *nb) : Register a notifier block
* for all supported external connectors of the extcon. * for all supported external connectors of the extcon.
*/ */
extern int extcon_register_notifier(struct extcon_dev *edev, unsigned int id, int extcon_register_notifier(struct extcon_dev *edev, unsigned int id,
struct notifier_block *nb); struct notifier_block *nb);
extern int extcon_unregister_notifier(struct extcon_dev *edev, unsigned int id, int extcon_unregister_notifier(struct extcon_dev *edev, unsigned int id,
struct notifier_block *nb); struct notifier_block *nb);
extern int devm_extcon_register_notifier(struct device *dev, int devm_extcon_register_notifier(struct device *dev,
struct extcon_dev *edev, unsigned int id, struct extcon_dev *edev, unsigned int id,
struct notifier_block *nb); struct notifier_block *nb);
extern void devm_extcon_unregister_notifier(struct device *dev, void devm_extcon_unregister_notifier(struct device *dev,
struct extcon_dev *edev, unsigned int id, struct extcon_dev *edev, unsigned int id,
struct notifier_block *nb); struct notifier_block *nb);
extern int extcon_register_notifier_all(struct extcon_dev *edev, int extcon_register_notifier_all(struct extcon_dev *edev,
struct notifier_block *nb); struct notifier_block *nb);
extern int extcon_unregister_notifier_all(struct extcon_dev *edev, int extcon_unregister_notifier_all(struct extcon_dev *edev,
struct notifier_block *nb); struct notifier_block *nb);
extern int devm_extcon_register_notifier_all(struct device *dev, int devm_extcon_register_notifier_all(struct device *dev,
struct extcon_dev *edev, struct extcon_dev *edev,
struct notifier_block *nb); struct notifier_block *nb);
extern void devm_extcon_unregister_notifier_all(struct device *dev, void devm_extcon_unregister_notifier_all(struct device *dev,
struct extcon_dev *edev, struct extcon_dev *edev,
struct notifier_block *nb); struct notifier_block *nb);
/* /*
* Following APIs get the extcon_dev from devicetree or by through extcon name. * Following APIs get the extcon_dev from devicetree or by through extcon name.
*/ */
extern struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name); struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name);
extern struct extcon_dev *extcon_find_edev_by_node(struct device_node *node); struct extcon_dev *extcon_find_edev_by_node(struct device_node *node);
extern struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev,
int index); int index);
/* Following API get the name of extcon device. */ /* Following API get the name of extcon device. */
extern const char *extcon_get_edev_name(struct extcon_dev *edev); const char *extcon_get_edev_name(struct extcon_dev *edev);
#else /* CONFIG_EXTCON */ #else /* CONFIG_EXTCON */
static inline int extcon_get_state(struct extcon_dev *edev, unsigned int id) static inline int extcon_get_state(struct extcon_dev *edev, unsigned int id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment