Commit 77fda29f authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

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

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

Chanwoo writes:

Update extcon for 5.4

Detailed description for this pull request:
1. Clean up the and fix the minor issue of extcon provider driver
- extcon-arizona/max77843 replace the helper function
  with more correct helper function without operation changes.
- extcon-fsa9480 supports the FSA880 variant by adding the compatible name.
- extcon-arizona updates the dt-binding file for the readability.
- extcon-gpio initializes the interrupt flags according to active-low state.
- Clean up extcon-sm5502/axp288/adc-jack

* tag 'extcon-next-for-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon:
  extcon: adc-jack: Remove dev_err() usage after platform_get_irq()
  extcon: axp288: Use for_each_set_bit() in axp288_extcon_log_rsi()
  extcon: axp288: Add missed error check
  extcon: sm5502: Add IRQ_ONESHOT
  extcon: gpio: Request reasonable interrupts
  extcon: arizona: Update binding example to use available defines
  extcon: fsa9480: Support the FSA880 variant
  extcon: extcon-max77843: convert to i2c_new_dummy_device
  extcon: arizona: Switch to use device_property_count_u32()
parents 99097a21 a3fc5723
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -72,5 +72,5 @@ codec: wm8280@0 {
		1 2 1 /* MICDET2 MICBIAS2 GPIO=high */
	>;

	wlf,gpsw = <0>;
	wlf,gpsw = <ARIZONA_GPSW_OPEN>;
};
+3 −1
Original line number Diff line number Diff line
@@ -5,7 +5,9 @@ controlled using I2C and enables USB data, stereo and mono audio, video,
microphone, and UART data to use a common connector port.

Required properties:
 - compatible : Must be "fcs,fsa9480"
 - compatible : Must be one of
   "fcs,fsa9480"
   "fcs,fsa880"
 - reg : Specifies i2c slave address. Must be 0x25.
 - interrupts : Should contain one entry specifying interrupt signal of
   interrupt parent to which interrupt pin of the chip is connected.
+1 −3
Original line number Diff line number Diff line
@@ -140,10 +140,8 @@ static int adc_jack_probe(struct platform_device *pdev)
		return err;

	data->irq = platform_get_irq(pdev, 0);
	if (data->irq < 0) {
		dev_err(&pdev->dev, "platform_get_irq failed\n");
	if (data->irq < 0)
		return -ENODEV;
	}

	err = request_any_context_irq(data->irq, adc_jack_irq_thread,
			pdata->irq_flags, pdata->name, data);
+1 −1
Original line number Diff line number Diff line
@@ -1253,7 +1253,7 @@ static int arizona_extcon_get_micd_configs(struct device *dev,
	int i, j;
	u32 *vals;

	nconfs = device_property_read_u32_array(arizona->dev, prop, NULL, 0);
	nconfs = device_property_count_u32(arizona->dev, prop);
	if (nconfs <= 0)
		return 0;

+9 −7
Original line number Diff line number Diff line
@@ -121,7 +121,6 @@ static const char * const axp288_pwr_up_down_info[] = {
	"Last shutdown caused by PMIC UVLO threshold",
	"Last shutdown caused by SOC initiated cold off",
	"Last shutdown caused by user pressing the power button",
	NULL,
};

/*
@@ -130,18 +129,21 @@ static const char * const axp288_pwr_up_down_info[] = {
 */
static void axp288_extcon_log_rsi(struct axp288_extcon_info *info)
{
	const char * const *rsi;
	unsigned int val, i, clear_mask = 0;
	unsigned long bits;
	int ret;

	ret = regmap_read(info->regmap, AXP288_PS_BOOT_REASON_REG, &val);
	for (i = 0, rsi = axp288_pwr_up_down_info; *rsi; rsi++, i++) {
		if (val & BIT(i)) {
			dev_dbg(info->dev, "%s\n", *rsi);
			clear_mask |= BIT(i);
		}
	if (ret < 0) {
		dev_err(info->dev, "failed to read reset source indicator\n");
		return;
	}

	bits = val & GENMASK(ARRAY_SIZE(axp288_pwr_up_down_info) - 1, 0);
	for_each_set_bit(i, &bits, ARRAY_SIZE(axp288_pwr_up_down_info))
		dev_dbg(info->dev, "%s\n", axp288_pwr_up_down_info[i]);
	clear_mask = bits;

	/* Clear the register value for next reboot (write 1 to clear bit) */
	regmap_write(info->regmap, AXP288_PS_BOOT_REASON_REG, clear_mask);
}
Loading