mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 14:40:12 -04:00
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()
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -928,7 +928,7 @@ static int max77843_muic_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int max77843_muic_remove(struct platform_device *pdev)
|
||||
static void max77843_muic_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct max77843_muic_info *info = platform_get_drvdata(pdev);
|
||||
struct max77693_dev *max77843 = info->max77843;
|
||||
@@ -936,8 +936,6 @@ static int max77843_muic_remove(struct platform_device *pdev)
|
||||
cancel_work_sync(&info->irq_work);
|
||||
regmap_del_irq_chip(max77843->irq, max77843->irq_data_muic);
|
||||
i2c_unregister_device(max77843->i2c_muic);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct platform_device_id max77843_muic_id[] = {
|
||||
@@ -958,7 +956,7 @@ static struct platform_driver max77843_muic_driver = {
|
||||
.of_match_table = of_max77843_muic_dt_match,
|
||||
},
|
||||
.probe = max77843_muic_probe,
|
||||
.remove = max77843_muic_remove,
|
||||
.remove_new = max77843_muic_remove,
|
||||
.id_table = max77843_muic_id,
|
||||
};
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/syscalls.h>
|
||||
|
||||
@@ -193,14 +193,12 @@ static int usb_extcon_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int usb_extcon_remove(struct platform_device *pdev)
|
||||
static void usb_extcon_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct usb_extcon_info *info = platform_get_drvdata(pdev);
|
||||
|
||||
cancel_delayed_work_sync(&info->wq_detcable);
|
||||
device_init_wakeup(&pdev->dev, false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
@@ -281,7 +279,7 @@ MODULE_DEVICE_TABLE(platform, usb_extcon_platform_ids);
|
||||
|
||||
static struct platform_driver usb_extcon_driver = {
|
||||
.probe = usb_extcon_probe,
|
||||
.remove = usb_extcon_remove,
|
||||
.remove_new = usb_extcon_remove,
|
||||
.driver = {
|
||||
.name = "extcon-usb-gpio",
|
||||
.pm = &usb_extcon_pm_ops,
|
||||
|
||||
@@ -480,14 +480,12 @@ static int extcon_cros_ec_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int extcon_cros_ec_remove(struct platform_device *pdev)
|
||||
static void extcon_cros_ec_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct cros_ec_extcon_info *info = platform_get_drvdata(pdev);
|
||||
|
||||
blocking_notifier_chain_unregister(&info->ec->event_notifier,
|
||||
&info->notifier);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
@@ -531,7 +529,7 @@ static struct platform_driver extcon_cros_ec_driver = {
|
||||
.of_match_table = of_match_ptr(extcon_cros_ec_of_match),
|
||||
.pm = DEV_PM_OPS,
|
||||
},
|
||||
.remove = extcon_cros_ec_remove,
|
||||
.remove_new = extcon_cros_ec_remove,
|
||||
.probe = extcon_cros_ec_probe,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user