Commit 336d8cd9 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

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

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

Chanwoo writes:

Update extcon next for v6.10

Detailed description for this pull request:
- Covert to platform remove callback with .remove_new ops
: extcon-adc-jack.c/extcon-intel-cht-wc.c/extcon-intel-mrfld.c
: extcon-max3355.c/extcon-max77843.c/extcon-usb-gpio.c/extcon-usbc-cros-ec.c

- Switch to use dev_err_prove() on extcon-intel-mrfld.c

- Remove unused of_gpio.h on extcon-rtk-type-c.c

- Select IRQ_DOMAIN config instead of dependency for extcon-max8997.c

- Use returned error instead of -ENOMEM for extcon-intel-mrfld.c

* tag 'extcon-next-for-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon:
  extcon: adc-jack: Document missing struct members
  extcon: realtek: Remove unused of_gpio.h
  extcon: usbc-cros-ec: Convert to platform remove callback returning void
  extcon: usb-gpio: Convert to platform remove callback returning void
  extcon: max77843: Convert to platform remove callback returning void
  extcon: max3355: Convert to platform remove callback returning void
  extcon: intel-mrfld: Convert to platform remove callback returning void
  extcon: intel-cht-wc: Convert to platform remove callback returning void
  extcon: adc-jack: Convert to platform remove callback returning void
  extcon: intel-mrfld: Don't shadow error from devm_extcon_dev_allocate()
  extcon: max8997: select IRQ_DOMAIN instead of depending on it
  extcon: intel-mrfld: Switch to use dev_err_probe()
parents ed63ba15 3e8e45b6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -116,7 +116,8 @@ config EXTCON_MAX77843

config EXTCON_MAX8997
	tristate "Maxim MAX8997 EXTCON Support"
	depends on MFD_MAX8997 && IRQ_DOMAIN
	depends on MFD_MAX8997
	select IRQ_DOMAIN
	help
	  If you say yes here you get support for the MUIC device of
	  Maxim MAX8997 PMIC. The MAX8997 MUIC is a USB port accessory
+4 −4
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@

/**
 * struct adc_jack_data - internal data for adc_jack device driver
 * @dev:		The device structure associated with the adc_jack.
 * @edev:		extcon device.
 * @cable_names:	list of supported cables.
 * @adc_conditions:	list of adc value conditions.
@@ -35,6 +36,7 @@
 *			handling at handling_delay jiffies.
 * @handler:		extcon event handler called by interrupt handler.
 * @chan:		iio channel being queried.
 * @wakeup_source:	Indicates if the device can wake up the system.
 */
struct adc_jack_data {
	struct device *dev;
@@ -158,14 +160,12 @@ static int adc_jack_probe(struct platform_device *pdev)
	return 0;
}

static int adc_jack_remove(struct platform_device *pdev)
static void adc_jack_remove(struct platform_device *pdev)
{
	struct adc_jack_data *data = platform_get_drvdata(pdev);

	free_irq(data->irq, data);
	cancel_work_sync(&data->handler.work);

	return 0;
}

#ifdef CONFIG_PM_SLEEP
@@ -196,7 +196,7 @@ static SIMPLE_DEV_PM_OPS(adc_jack_pm_ops,

static struct platform_driver adc_jack_driver = {
	.probe          = adc_jack_probe,
	.remove         = adc_jack_remove,
	.remove_new     = adc_jack_remove,
	.driver         = {
		.name   = "adc-jack",
		.pm = &adc_jack_pm_ops,
+2 −4
Original line number Diff line number Diff line
@@ -617,13 +617,11 @@ static int cht_wc_extcon_probe(struct platform_device *pdev)
	return ret;
}

static int cht_wc_extcon_remove(struct platform_device *pdev)
static void cht_wc_extcon_remove(struct platform_device *pdev)
{
	struct cht_wc_extcon_data *ext = platform_get_drvdata(pdev);

	cht_wc_extcon_sw_control(ext, false);

	return 0;
}

static const struct platform_device_id cht_wc_extcon_table[] = {
@@ -634,7 +632,7 @@ MODULE_DEVICE_TABLE(platform, cht_wc_extcon_table);

static struct platform_driver cht_wc_extcon_driver = {
	.probe = cht_wc_extcon_probe,
	.remove = cht_wc_extcon_remove,
	.remove_new = cht_wc_extcon_remove,
	.id_table = cht_wc_extcon_table,
	.driver = {
		.name = "cht_wcove_pwrsrc",
+9 −17
Original line number Diff line number Diff line
@@ -214,27 +214,21 @@ static int mrfld_extcon_probe(struct platform_device *pdev)

	data->edev = devm_extcon_dev_allocate(dev, mrfld_extcon_cable);
	if (IS_ERR(data->edev))
		return -ENOMEM;
		return PTR_ERR(data->edev);

	ret = devm_extcon_dev_register(dev, data->edev);
	if (ret < 0) {
		dev_err(dev, "can't register extcon device: %d\n", ret);
		return ret;
	}
	if (ret < 0)
		return dev_err_probe(dev, ret, "can't register extcon device\n");

	ret = devm_request_threaded_irq(dev, irq, NULL, mrfld_extcon_interrupt,
					IRQF_ONESHOT | IRQF_SHARED, pdev->name,
					data);
	if (ret) {
		dev_err(dev, "can't register IRQ handler: %d\n", ret);
		return ret;
	}
	if (ret)
		return dev_err_probe(dev, ret, "can't register IRQ handler\n");

	ret = regmap_read(regmap, BCOVE_ID, &id);
	if (ret) {
		dev_err(dev, "can't read PMIC ID: %d\n", ret);
		return ret;
	}
	if (ret)
		return dev_err_probe(dev, ret, "can't read PMIC ID\n");

	data->id = id;

@@ -263,13 +257,11 @@ static int mrfld_extcon_probe(struct platform_device *pdev)
	return 0;
}

static int mrfld_extcon_remove(struct platform_device *pdev)
static void mrfld_extcon_remove(struct platform_device *pdev)
{
	struct mrfld_extcon_data *data = platform_get_drvdata(pdev);

	mrfld_extcon_sw_control(data, false);

	return 0;
}

static const struct platform_device_id mrfld_extcon_id_table[] = {
@@ -283,7 +275,7 @@ static struct platform_driver mrfld_extcon_driver = {
		.name	= "mrfld_bcove_pwrsrc",
	},
	.probe		= mrfld_extcon_probe,
	.remove		= mrfld_extcon_remove,
	.remove_new	= mrfld_extcon_remove,
	.id_table	= mrfld_extcon_id_table,
};
module_platform_driver(mrfld_extcon_driver);
+2 −4
Original line number Diff line number Diff line
@@ -112,13 +112,11 @@ static int max3355_probe(struct platform_device *pdev)
	return 0;
}

static int max3355_remove(struct platform_device *pdev)
static void max3355_remove(struct platform_device *pdev)
{
	struct max3355_data *data = platform_get_drvdata(pdev);

	gpiod_set_value_cansleep(data->shdn_gpiod, 0);

	return 0;
}

static const struct of_device_id max3355_match_table[] = {
@@ -129,7 +127,7 @@ MODULE_DEVICE_TABLE(of, max3355_match_table);

static struct platform_driver max3355_driver = {
	.probe		= max3355_probe,
	.remove		= max3355_remove,
	.remove_new	= max3355_remove,
	.driver		= {
		.name	= "extcon-max3355",
		.of_match_table = max3355_match_table,
Loading