mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00
rtc: use boolean values with device_init_wakeup()
device_init_wakeup() second argument is a bool type. Use proper boolean values when calling it to match the type and to produce unambiguous code which is easier to understand. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Link: https://lore.kernel.org/r/20241217071331.3607-2-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
7158c61afd
commit
8c28c4993f
|
@ -308,7 +308,7 @@ static int pm80x_rtc_probe(struct platform_device *pdev)
|
||||||
/* remember whether this power up is caused by PMIC RTC or not */
|
/* remember whether this power up is caused by PMIC RTC or not */
|
||||||
info->rtc_dev->dev.platform_data = &pdata->rtc_wakeup;
|
info->rtc_dev->dev.platform_data = &pdata->rtc_wakeup;
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
out_rtc:
|
out_rtc:
|
||||||
|
|
|
@ -326,7 +326,7 @@ static int pm860x_rtc_probe(struct platform_device *pdev)
|
||||||
schedule_delayed_work(&info->calib_work, VRTC_CALIB_INTERVAL);
|
schedule_delayed_work(&info->calib_work, VRTC_CALIB_INTERVAL);
|
||||||
#endif /* VRTC_CALIBRATION */
|
#endif /* VRTC_CALIBRATION */
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -361,7 +361,7 @@ static int aml_rtc_probe(struct platform_device *pdev)
|
||||||
"failed to get_enable rtc sys clk\n");
|
"failed to get_enable rtc sys clk\n");
|
||||||
aml_rtc_init(rtc);
|
aml_rtc_init(rtc);
|
||||||
|
|
||||||
device_init_wakeup(dev, 1);
|
device_init_wakeup(dev, true);
|
||||||
platform_set_drvdata(pdev, rtc);
|
platform_set_drvdata(pdev, rtc);
|
||||||
|
|
||||||
rtc->rtc_dev = devm_rtc_allocate_device(dev);
|
rtc->rtc_dev = devm_rtc_allocate_device(dev);
|
||||||
|
@ -391,7 +391,7 @@ static int aml_rtc_probe(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
err_clk:
|
err_clk:
|
||||||
clk_disable_unprepare(rtc->sys_clk);
|
clk_disable_unprepare(rtc->sys_clk);
|
||||||
device_init_wakeup(dev, 0);
|
device_init_wakeup(dev, false);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -426,7 +426,7 @@ static void aml_rtc_remove(struct platform_device *pdev)
|
||||||
struct aml_rtc_data *rtc = dev_get_drvdata(&pdev->dev);
|
struct aml_rtc_data *rtc = dev_get_drvdata(&pdev->dev);
|
||||||
|
|
||||||
clk_disable_unprepare(rtc->sys_clk);
|
clk_disable_unprepare(rtc->sys_clk);
|
||||||
device_init_wakeup(&pdev->dev, 0);
|
device_init_wakeup(&pdev->dev, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct aml_rtc_config a5_rtc_config = {
|
static const struct aml_rtc_config a5_rtc_config = {
|
||||||
|
|
|
@ -527,7 +527,7 @@ static __init int armada38x_rtc_probe(struct platform_device *pdev)
|
||||||
platform_set_drvdata(pdev, rtc);
|
platform_set_drvdata(pdev, rtc);
|
||||||
|
|
||||||
if (rtc->irq != -1)
|
if (rtc->irq != -1)
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
else
|
else
|
||||||
clear_bit(RTC_FEATURE_ALARM, rtc->rtc_dev->features);
|
clear_bit(RTC_FEATURE_ALARM, rtc->rtc_dev->features);
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,7 @@ static int as3722_rtc_probe(struct platform_device *pdev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
as3722_rtc->rtc = devm_rtc_device_register(&pdev->dev, "as3722-rtc",
|
as3722_rtc->rtc = devm_rtc_device_register(&pdev->dev, "as3722-rtc",
|
||||||
&as3722_rtc_ops, THIS_MODULE);
|
&as3722_rtc_ops, THIS_MODULE);
|
||||||
|
|
|
@ -528,7 +528,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
|
||||||
* being wake-capable; if it didn't, do that here.
|
* being wake-capable; if it didn't, do that here.
|
||||||
*/
|
*/
|
||||||
if (!device_can_wakeup(&pdev->dev))
|
if (!device_can_wakeup(&pdev->dev))
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
if (at91_rtc_config->has_correction)
|
if (at91_rtc_config->has_correction)
|
||||||
rtc->ops = &sama5d4_rtc_ops;
|
rtc->ops = &sama5d4_rtc_ops;
|
||||||
|
|
|
@ -353,7 +353,7 @@ static int at91_rtc_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
/* platform setup code should have handled this; sigh */
|
/* platform setup code should have handled this; sigh */
|
||||||
if (!device_can_wakeup(&pdev->dev))
|
if (!device_can_wakeup(&pdev->dev))
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
platform_set_drvdata(pdev, rtc);
|
platform_set_drvdata(pdev, rtc);
|
||||||
|
|
||||||
|
|
|
@ -359,7 +359,7 @@ static void cdns_rtc_remove(struct platform_device *pdev)
|
||||||
struct cdns_rtc *crtc = platform_get_drvdata(pdev);
|
struct cdns_rtc *crtc = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
cdns_rtc_alarm_irq_enable(&pdev->dev, 0);
|
cdns_rtc_alarm_irq_enable(&pdev->dev, 0);
|
||||||
device_init_wakeup(&pdev->dev, 0);
|
device_init_wakeup(&pdev->dev, false);
|
||||||
|
|
||||||
clk_disable_unprepare(crtc->pclk);
|
clk_disable_unprepare(crtc->pclk);
|
||||||
clk_disable_unprepare(crtc->ref_clk);
|
clk_disable_unprepare(crtc->ref_clk);
|
||||||
|
|
|
@ -864,7 +864,7 @@ static void acpi_cmos_wake_setup(struct device *dev)
|
||||||
dev_info(dev, "RTC can wake from S4\n");
|
dev_info(dev, "RTC can wake from S4\n");
|
||||||
|
|
||||||
/* RTC always wakes from S1/S2/S3, and often S4/STD */
|
/* RTC always wakes from S1/S2/S3, and often S4/STD */
|
||||||
device_init_wakeup(dev, 1);
|
device_init_wakeup(dev, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cmos_check_acpi_rtc_status(struct device *dev,
|
static void cmos_check_acpi_rtc_status(struct device *dev,
|
||||||
|
|
|
@ -295,7 +295,7 @@ static int cpcap_rtc_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
disable_irq(rtc->update_irq);
|
disable_irq(rtc->update_irq);
|
||||||
|
|
||||||
err = device_init_wakeup(dev, 1);
|
err = device_init_wakeup(dev, true);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_err(dev, "wakeup initialization failed (%d)\n", err);
|
dev_err(dev, "wakeup initialization failed (%d)\n", err);
|
||||||
/* ignore error and continue without wakeup support */
|
/* ignore error and continue without wakeup support */
|
||||||
|
|
|
@ -337,7 +337,7 @@ static int cros_ec_rtc_probe(struct platform_device *pdev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = device_init_wakeup(&pdev->dev, 1);
|
ret = device_init_wakeup(&pdev->dev, true);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "failed to initialize wakeup\n");
|
dev_err(&pdev->dev, "failed to initialize wakeup\n");
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -288,7 +288,7 @@ static int da9055_rtc_probe(struct platform_device *pdev)
|
||||||
if (ret & DA9055_RTC_ALM_EN)
|
if (ret & DA9055_RTC_ALM_EN)
|
||||||
rtc->alarm_enable = 1;
|
rtc->alarm_enable = 1;
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
|
rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
|
||||||
&da9055_rtc_ops, THIS_MODULE);
|
&da9055_rtc_ops, THIS_MODULE);
|
||||||
|
|
|
@ -508,7 +508,7 @@ static int ds3232_probe(struct device *dev, struct regmap *regmap, int irq,
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (ds3232->irq > 0)
|
if (ds3232->irq > 0)
|
||||||
device_init_wakeup(dev, 1);
|
device_init_wakeup(dev, true);
|
||||||
|
|
||||||
ds3232_hwmon_register(dev, name);
|
ds3232_hwmon_register(dev, name);
|
||||||
|
|
||||||
|
|
|
@ -830,7 +830,7 @@ static int isl1208_setup_irq(struct i2c_client *client, int irq)
|
||||||
isl1208_driver.driver.name,
|
isl1208_driver.driver.name,
|
||||||
client);
|
client);
|
||||||
if (!rc) {
|
if (!rc) {
|
||||||
device_init_wakeup(&client->dev, 1);
|
device_init_wakeup(&client->dev, true);
|
||||||
enable_irq_wake(irq);
|
enable_irq_wake(irq);
|
||||||
} else {
|
} else {
|
||||||
dev_err(&client->dev,
|
dev_err(&client->dev,
|
||||||
|
|
|
@ -367,7 +367,7 @@ static int jz4740_rtc_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
platform_set_drvdata(pdev, rtc);
|
platform_set_drvdata(pdev, rtc);
|
||||||
|
|
||||||
device_init_wakeup(dev, 1);
|
device_init_wakeup(dev, true);
|
||||||
|
|
||||||
ret = dev_pm_set_wake_irq(dev, irq);
|
ret = dev_pm_set_wake_irq(dev, irq);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
|
@ -329,7 +329,7 @@ static int loongson_rtc_probe(struct platform_device *pdev)
|
||||||
alarm_irq);
|
alarm_irq);
|
||||||
|
|
||||||
priv->pm_base = regs - priv->config->pm_offset;
|
priv->pm_base = regs - priv->config->pm_offset;
|
||||||
device_init_wakeup(dev, 1);
|
device_init_wakeup(dev, true);
|
||||||
|
|
||||||
if (has_acpi_companion(dev))
|
if (has_acpi_companion(dev))
|
||||||
acpi_install_fixed_event_handler(ACPI_EVENT_RTC,
|
acpi_install_fixed_event_handler(ACPI_EVENT_RTC,
|
||||||
|
@ -360,7 +360,7 @@ static void loongson_rtc_remove(struct platform_device *pdev)
|
||||||
acpi_remove_fixed_event_handler(ACPI_EVENT_RTC,
|
acpi_remove_fixed_event_handler(ACPI_EVENT_RTC,
|
||||||
loongson_rtc_handler);
|
loongson_rtc_handler);
|
||||||
|
|
||||||
device_init_wakeup(dev, 0);
|
device_init_wakeup(dev, false);
|
||||||
loongson_rtc_alarm_irq_enable(dev, 0);
|
loongson_rtc_alarm_irq_enable(dev, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -293,7 +293,7 @@ static int lp8788_rtc_probe(struct platform_device *pdev)
|
||||||
rtc->alarm = lp->pdata ? lp->pdata->alarm_sel : DEFAULT_ALARM_SEL;
|
rtc->alarm = lp->pdata ? lp->pdata->alarm_sel : DEFAULT_ALARM_SEL;
|
||||||
platform_set_drvdata(pdev, rtc);
|
platform_set_drvdata(pdev, rtc);
|
||||||
|
|
||||||
device_init_wakeup(dev, 1);
|
device_init_wakeup(dev, true);
|
||||||
|
|
||||||
rtc->rdev = devm_rtc_device_register(dev, "lp8788_rtc",
|
rtc->rdev = devm_rtc_device_register(dev, "lp8788_rtc",
|
||||||
&lp8788_rtc_ops, THIS_MODULE);
|
&lp8788_rtc_ops, THIS_MODULE);
|
||||||
|
|
|
@ -257,7 +257,7 @@ static int lpc32xx_rtc_probe(struct platform_device *pdev)
|
||||||
dev_warn(&pdev->dev, "Can't request interrupt.\n");
|
dev_warn(&pdev->dev, "Can't request interrupt.\n");
|
||||||
rtc->irq = -1;
|
rtc->irq = -1;
|
||||||
} else {
|
} else {
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -770,7 +770,7 @@ static int max77686_rtc_probe(struct platform_device *pdev)
|
||||||
goto err_rtc;
|
goto err_rtc;
|
||||||
}
|
}
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
info->rtc_dev = devm_rtc_device_register(&pdev->dev, id->name,
|
info->rtc_dev = devm_rtc_device_register(&pdev->dev, id->name,
|
||||||
&max77686_rtc_ops, THIS_MODULE);
|
&max77686_rtc_ops, THIS_MODULE);
|
||||||
|
|
|
@ -270,7 +270,7 @@ static int max8925_rtc_probe(struct platform_device *pdev)
|
||||||
/* XXX - isn't this redundant? */
|
/* XXX - isn't this redundant? */
|
||||||
platform_set_drvdata(pdev, info);
|
platform_set_drvdata(pdev, info);
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
info->rtc_dev = devm_rtc_device_register(&pdev->dev, "max8925-rtc",
|
info->rtc_dev = devm_rtc_device_register(&pdev->dev, "max8925-rtc",
|
||||||
&max8925_rtc_ops, THIS_MODULE);
|
&max8925_rtc_ops, THIS_MODULE);
|
||||||
|
|
|
@ -473,7 +473,7 @@ static int max8997_rtc_probe(struct platform_device *pdev)
|
||||||
max8997_rtc_enable_wtsr(info, true);
|
max8997_rtc_enable_wtsr(info, true);
|
||||||
max8997_rtc_enable_smpl(info, true);
|
max8997_rtc_enable_smpl(info, true);
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
info->rtc_dev = devm_rtc_device_register(&pdev->dev, "max8997-rtc",
|
info->rtc_dev = devm_rtc_device_register(&pdev->dev, "max8997-rtc",
|
||||||
&max8997_rtc_ops, THIS_MODULE);
|
&max8997_rtc_ops, THIS_MODULE);
|
||||||
|
|
|
@ -74,7 +74,7 @@ static int meson_vrtc_probe(struct platform_device *pdev)
|
||||||
if (IS_ERR(vrtc->io_alarm))
|
if (IS_ERR(vrtc->io_alarm))
|
||||||
return PTR_ERR(vrtc->io_alarm);
|
return PTR_ERR(vrtc->io_alarm);
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
platform_set_drvdata(pdev, vrtc);
|
platform_set_drvdata(pdev, vrtc);
|
||||||
|
|
||||||
|
|
|
@ -303,7 +303,7 @@ static int mpc5121_rtc_probe(struct platform_device *op)
|
||||||
return PTR_ERR(rtc->regs);
|
return PTR_ERR(rtc->regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
device_init_wakeup(&op->dev, 1);
|
device_init_wakeup(&op->dev, true);
|
||||||
|
|
||||||
platform_set_drvdata(op, rtc);
|
platform_set_drvdata(op, rtc);
|
||||||
|
|
||||||
|
|
|
@ -286,7 +286,7 @@ static int mtk_rtc_probe(struct platform_device *pdev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
rtc->rtc_dev->ops = &mtk_rtc_ops;
|
rtc->rtc_dev->ops = &mtk_rtc_ops;
|
||||||
rtc->rtc_dev->range_min = RTC_TIMESTAMP_BEGIN_1900;
|
rtc->rtc_dev->range_min = RTC_TIMESTAMP_BEGIN_1900;
|
||||||
|
|
|
@ -264,7 +264,7 @@ static int __init mv_rtc_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pdata->irq >= 0)
|
if (pdata->irq >= 0)
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
else
|
else
|
||||||
clear_bit(RTC_FEATURE_ALARM, pdata->rtc->features);
|
clear_bit(RTC_FEATURE_ALARM, pdata->rtc->features);
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ static void __exit mv_rtc_remove(struct platform_device *pdev)
|
||||||
struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
|
struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
if (pdata->irq >= 0)
|
if (pdata->irq >= 0)
|
||||||
device_init_wakeup(&pdev->dev, 0);
|
device_init_wakeup(&pdev->dev, false);
|
||||||
|
|
||||||
if (!IS_ERR(pdata->clk))
|
if (!IS_ERR(pdata->clk))
|
||||||
clk_disable_unprepare(pdata->clk);
|
clk_disable_unprepare(pdata->clk);
|
||||||
|
|
|
@ -377,7 +377,7 @@ static int mxc_rtc_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pdata->irq >= 0) {
|
if (pdata->irq >= 0) {
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
ret = dev_pm_set_wake_irq(&pdev->dev, pdata->irq);
|
ret = dev_pm_set_wake_irq(&pdev->dev, pdata->irq);
|
||||||
if (ret)
|
if (ret)
|
||||||
dev_err(&pdev->dev, "failed to enable irq wake\n");
|
dev_err(&pdev->dev, "failed to enable irq wake\n");
|
||||||
|
|
|
@ -302,7 +302,7 @@ static int mxc_rtc_probe(struct platform_device *pdev)
|
||||||
if (pdata->irq < 0)
|
if (pdata->irq < 0)
|
||||||
return pdata->irq;
|
return pdata->irq;
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
ret = dev_pm_set_wake_irq(&pdev->dev, pdata->irq);
|
ret = dev_pm_set_wake_irq(&pdev->dev, pdata->irq);
|
||||||
if (ret)
|
if (ret)
|
||||||
dev_err(&pdev->dev, "failed to enable irq wake\n");
|
dev_err(&pdev->dev, "failed to enable irq wake\n");
|
||||||
|
|
|
@ -920,7 +920,7 @@ static void omap_rtc_remove(struct platform_device *pdev)
|
||||||
omap_rtc_power_off_rtc = NULL;
|
omap_rtc_power_off_rtc = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 0);
|
device_init_wakeup(&pdev->dev, false);
|
||||||
|
|
||||||
if (!IS_ERR(rtc->clk))
|
if (!IS_ERR(rtc->clk))
|
||||||
clk_disable_unprepare(rtc->clk);
|
clk_disable_unprepare(rtc->clk);
|
||||||
|
|
|
@ -287,7 +287,7 @@ static int palmas_rtc_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
palmas_rtc->irq = platform_get_irq(pdev, 0);
|
palmas_rtc->irq = platform_get_irq(pdev, 0);
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
palmas_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
|
palmas_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
|
||||||
&palmas_rtc_ops, THIS_MODULE);
|
&palmas_rtc_ops, THIS_MODULE);
|
||||||
if (IS_ERR(palmas_rtc->rtc)) {
|
if (IS_ERR(palmas_rtc->rtc)) {
|
||||||
|
|
|
@ -330,7 +330,7 @@ static int pic32_rtc_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
pic32_rtc_enable(pdata, 1);
|
pic32_rtc_enable(pdata, 1);
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
pdata->rtc->ops = &pic32_rtcops;
|
pdata->rtc->ops = &pic32_rtcops;
|
||||||
pdata->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
|
pdata->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
|
||||||
|
|
|
@ -503,7 +503,7 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
platform_set_drvdata(pdev, rtc_dd);
|
platform_set_drvdata(pdev, rtc_dd);
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
rtc_dd->rtc = devm_rtc_allocate_device(&pdev->dev);
|
rtc_dd->rtc = devm_rtc_allocate_device(&pdev->dev);
|
||||||
if (IS_ERR(rtc_dd->rtc))
|
if (IS_ERR(rtc_dd->rtc))
|
||||||
|
|
|
@ -360,7 +360,7 @@ static int __init pxa_rtc_probe(struct platform_device *pdev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
device_init_wakeup(dev, 1);
|
device_init_wakeup(dev, true);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,7 +245,7 @@ static int rc5t583_rtc_probe(struct platform_device *pdev)
|
||||||
dev_err(&pdev->dev, "IRQ is not free.\n");
|
dev_err(&pdev->dev, "IRQ is not free.\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
ricoh_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
|
ricoh_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
|
||||||
&rc5t583_rtc_ops, THIS_MODULE);
|
&rc5t583_rtc_ops, THIS_MODULE);
|
||||||
|
|
|
@ -414,7 +414,7 @@ static int rc5t619_rtc_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* enable wake */
|
/* enable wake */
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
enable_irq_wake(rtc->irq);
|
enable_irq_wake(rtc->irq);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -768,7 +768,7 @@ static int rtca3_probe(struct platform_device *pdev)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
priv->rtc_dev = devm_rtc_allocate_device(&pdev->dev);
|
priv->rtc_dev = devm_rtc_allocate_device(&pdev->dev);
|
||||||
if (IS_ERR(priv->rtc_dev))
|
if (IS_ERR(priv->rtc_dev))
|
||||||
|
|
|
@ -418,7 +418,7 @@ static int rk808_rtc_probe(struct platform_device *pdev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
rk808_rtc->rtc = devm_rtc_allocate_device(&pdev->dev);
|
rk808_rtc->rtc = devm_rtc_allocate_device(&pdev->dev);
|
||||||
if (IS_ERR(rk808_rtc->rtc))
|
if (IS_ERR(rk808_rtc->rtc))
|
||||||
|
|
|
@ -456,7 +456,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
|
||||||
dev_dbg(&pdev->dev, "s3c2410_rtc: RTCCON=%02x\n",
|
dev_dbg(&pdev->dev, "s3c2410_rtc: RTCCON=%02x\n",
|
||||||
readw(info->base + S3C2410_RTCCON));
|
readw(info->base + S3C2410_RTCCON));
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
info->rtc = devm_rtc_allocate_device(&pdev->dev);
|
info->rtc = devm_rtc_allocate_device(&pdev->dev);
|
||||||
if (IS_ERR(info->rtc)) {
|
if (IS_ERR(info->rtc)) {
|
||||||
|
|
|
@ -729,7 +729,7 @@ static int s5m_rtc_probe(struct platform_device *pdev)
|
||||||
info->irq, ret);
|
info->irq, ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return devm_rtc_register_device(info->rtc_dev);
|
return devm_rtc_register_device(info->rtc_dev);
|
||||||
|
|
|
@ -292,7 +292,7 @@ static int sa1100_rtc_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_set_drvdata(pdev, info);
|
platform_set_drvdata(pdev, info);
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
return sa1100_rtc_init(pdev, info);
|
return sa1100_rtc_init(pdev, info);
|
||||||
}
|
}
|
||||||
|
|
|
@ -613,14 +613,14 @@ static int sprd_rtc_probe(struct platform_device *pdev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
rtc->rtc->ops = &sprd_rtc_ops;
|
rtc->rtc->ops = &sprd_rtc_ops;
|
||||||
rtc->rtc->range_min = 0;
|
rtc->rtc->range_min = 0;
|
||||||
rtc->rtc->range_max = 5662310399LL;
|
rtc->rtc->range_max = 5662310399LL;
|
||||||
ret = devm_rtc_register_device(rtc->rtc);
|
ret = devm_rtc_register_device(rtc->rtc);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
device_init_wakeup(&pdev->dev, 0);
|
device_init_wakeup(&pdev->dev, false);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -611,7 +611,7 @@ static int __init sh_rtc_probe(struct platform_device *pdev)
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_unmap;
|
goto err_unmap;
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_unmap:
|
err_unmap:
|
||||||
|
|
|
@ -395,7 +395,7 @@ static int spear_rtc_probe(struct platform_device *pdev)
|
||||||
goto err_disable_clock;
|
goto err_disable_clock;
|
||||||
|
|
||||||
if (!device_can_wakeup(&pdev->dev))
|
if (!device_can_wakeup(&pdev->dev))
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -411,7 +411,7 @@ static void spear_rtc_remove(struct platform_device *pdev)
|
||||||
|
|
||||||
spear_rtc_disable_interrupt(config);
|
spear_rtc_disable_interrupt(config);
|
||||||
clk_disable_unprepare(config->clk);
|
clk_disable_unprepare(config->clk);
|
||||||
device_init_wakeup(&pdev->dev, 0);
|
device_init_wakeup(&pdev->dev, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM_SLEEP
|
#ifdef CONFIG_PM_SLEEP
|
||||||
|
|
|
@ -826,7 +826,7 @@ static int sun6i_rtc_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
clk_prepare_enable(chip->losc);
|
clk_prepare_enable(chip->losc);
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
chip->rtc = devm_rtc_allocate_device(&pdev->dev);
|
chip->rtc = devm_rtc_allocate_device(&pdev->dev);
|
||||||
if (IS_ERR(chip->rtc))
|
if (IS_ERR(chip->rtc))
|
||||||
|
|
|
@ -269,7 +269,7 @@ static int sp_rtc_probe(struct platform_device *plat_dev)
|
||||||
if (ret)
|
if (ret)
|
||||||
goto free_reset_assert;
|
goto free_reset_assert;
|
||||||
|
|
||||||
device_init_wakeup(&plat_dev->dev, 1);
|
device_init_wakeup(&plat_dev->dev, true);
|
||||||
dev_set_drvdata(&plat_dev->dev, sp_rtc);
|
dev_set_drvdata(&plat_dev->dev, sp_rtc);
|
||||||
|
|
||||||
sp_rtc->rtc = devm_rtc_allocate_device(&plat_dev->dev);
|
sp_rtc->rtc = devm_rtc_allocate_device(&plat_dev->dev);
|
||||||
|
@ -307,7 +307,7 @@ static void sp_rtc_remove(struct platform_device *plat_dev)
|
||||||
{
|
{
|
||||||
struct sunplus_rtc *sp_rtc = dev_get_drvdata(&plat_dev->dev);
|
struct sunplus_rtc *sp_rtc = dev_get_drvdata(&plat_dev->dev);
|
||||||
|
|
||||||
device_init_wakeup(&plat_dev->dev, 0);
|
device_init_wakeup(&plat_dev->dev, false);
|
||||||
reset_control_assert(sp_rtc->rstc);
|
reset_control_assert(sp_rtc->rstc);
|
||||||
clk_disable_unprepare(sp_rtc->rtcclk);
|
clk_disable_unprepare(sp_rtc->rtcclk);
|
||||||
}
|
}
|
||||||
|
|
|
@ -319,7 +319,7 @@ static int tegra_rtc_probe(struct platform_device *pdev)
|
||||||
writel(0xffffffff, info->base + TEGRA_RTC_REG_INTR_STATUS);
|
writel(0xffffffff, info->base + TEGRA_RTC_REG_INTR_STATUS);
|
||||||
writel(0, info->base + TEGRA_RTC_REG_INTR_MASK);
|
writel(0, info->base + TEGRA_RTC_REG_INTR_MASK);
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
ret = devm_request_irq(&pdev->dev, info->irq, tegra_rtc_irq_handler,
|
ret = devm_request_irq(&pdev->dev, info->irq, tegra_rtc_irq_handler,
|
||||||
IRQF_TRIGGER_HIGH, dev_name(&pdev->dev),
|
IRQF_TRIGGER_HIGH, dev_name(&pdev->dev),
|
||||||
|
|
|
@ -132,7 +132,7 @@ static int test_probe(struct platform_device *plat_dev)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
rtd->rtc->ops = &test_rtc_ops;
|
rtd->rtc->ops = &test_rtc_ops;
|
||||||
device_init_wakeup(&plat_dev->dev, 1);
|
device_init_wakeup(&plat_dev->dev, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
timer_setup(&rtd->alarm, test_rtc_alarm_handler, 0);
|
timer_setup(&rtd->alarm, test_rtc_alarm_handler, 0);
|
||||||
|
|
|
@ -241,7 +241,7 @@ static int tps6586x_rtc_probe(struct platform_device *pdev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
platform_set_drvdata(pdev, rtc);
|
platform_set_drvdata(pdev, rtc);
|
||||||
rtc->rtc = devm_rtc_allocate_device(&pdev->dev);
|
rtc->rtc = devm_rtc_allocate_device(&pdev->dev);
|
||||||
|
|
|
@ -418,7 +418,7 @@ static int tps65910_rtc_probe(struct platform_device *pdev)
|
||||||
tps_rtc->irq = irq;
|
tps_rtc->irq = irq;
|
||||||
if (irq != -1) {
|
if (irq != -1) {
|
||||||
if (device_property_present(tps65910->dev, "wakeup-source"))
|
if (device_property_present(tps65910->dev, "wakeup-source"))
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
else
|
else
|
||||||
device_set_wakeup_capable(&pdev->dev, 1);
|
device_set_wakeup_capable(&pdev->dev, 1);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -572,7 +572,7 @@ static int twl_rtc_probe(struct platform_device *pdev)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
platform_set_drvdata(pdev, twl_rtc);
|
platform_set_drvdata(pdev, twl_rtc);
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
twl_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
|
twl_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
|
||||||
&twl_rtc_ops, THIS_MODULE);
|
&twl_rtc_ops, THIS_MODULE);
|
||||||
|
|
|
@ -420,7 +420,7 @@ static int wm831x_rtc_probe(struct platform_device *pdev)
|
||||||
if (ret & WM831X_RTC_ALM_ENA)
|
if (ret & WM831X_RTC_ALM_ENA)
|
||||||
wm831x_rtc->alarm_enabled = 1;
|
wm831x_rtc->alarm_enabled = 1;
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
wm831x_rtc->rtc = devm_rtc_allocate_device(&pdev->dev);
|
wm831x_rtc->rtc = devm_rtc_allocate_device(&pdev->dev);
|
||||||
if (IS_ERR(wm831x_rtc->rtc))
|
if (IS_ERR(wm831x_rtc->rtc))
|
||||||
|
|
|
@ -420,7 +420,7 @@ static int wm8350_rtc_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
wm_rtc->rtc = devm_rtc_device_register(&pdev->dev, "wm8350",
|
wm_rtc->rtc = devm_rtc_device_register(&pdev->dev, "wm8350",
|
||||||
&wm8350_rtc_ops, THIS_MODULE);
|
&wm8350_rtc_ops, THIS_MODULE);
|
||||||
|
|
|
@ -174,7 +174,7 @@ static int xgene_rtc_probe(struct platform_device *pdev)
|
||||||
/* Turn on the clock and the crystal */
|
/* Turn on the clock and the crystal */
|
||||||
writel(RTC_CCR_EN, pdata->csr_base + RTC_CCR);
|
writel(RTC_CCR_EN, pdata->csr_base + RTC_CCR);
|
||||||
|
|
||||||
ret = device_init_wakeup(&pdev->dev, 1);
|
ret = device_init_wakeup(&pdev->dev, true);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
clk_disable_unprepare(pdata->clk);
|
clk_disable_unprepare(pdata->clk);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -197,7 +197,7 @@ static void xgene_rtc_remove(struct platform_device *pdev)
|
||||||
struct xgene_rtc_dev *pdata = platform_get_drvdata(pdev);
|
struct xgene_rtc_dev *pdata = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
xgene_rtc_alarm_irq_enable(&pdev->dev, 0);
|
xgene_rtc_alarm_irq_enable(&pdev->dev, 0);
|
||||||
device_init_wakeup(&pdev->dev, 0);
|
device_init_wakeup(&pdev->dev, false);
|
||||||
clk_disable_unprepare(pdata->clk);
|
clk_disable_unprepare(pdata->clk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -337,7 +337,7 @@ static int xlnx_rtc_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
xlnx_init_rtc(xrtcdev);
|
xlnx_init_rtc(xrtcdev);
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 1);
|
device_init_wakeup(&pdev->dev, true);
|
||||||
|
|
||||||
return devm_rtc_register_device(xrtcdev->rtc);
|
return devm_rtc_register_device(xrtcdev->rtc);
|
||||||
}
|
}
|
||||||
|
@ -345,7 +345,7 @@ static int xlnx_rtc_probe(struct platform_device *pdev)
|
||||||
static void xlnx_rtc_remove(struct platform_device *pdev)
|
static void xlnx_rtc_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
xlnx_rtc_alarm_irq_enable(&pdev->dev, 0);
|
xlnx_rtc_alarm_irq_enable(&pdev->dev, 0);
|
||||||
device_init_wakeup(&pdev->dev, 0);
|
device_init_wakeup(&pdev->dev, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __maybe_unused xlnx_rtc_suspend(struct device *dev)
|
static int __maybe_unused xlnx_rtc_suspend(struct device *dev)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user