mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
Merge tag 'rtc-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC updates from Alexandre Belloni: "Not much this cycle, there are multiple small fixes. Core: - use boolean values with device_init_wakeup() Drivers: - pcf2127: add BSM support - pcf85063: fix possible out of bounds write" * tag 'rtc-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: rtc: pcf2127: add BSM support rtc: Remove hpet_rtc_dropped_irq() dt-bindings: rtc: mxc: Document fsl,imx31-rtc rtc: stm32: Use syscon_regmap_lookup_by_phandle_args rtc: zynqmp: Fix optional clock name property rtc: loongson: clear TOY_MATCH0_REG in loongson_rtc_isr() rtc: pcf85063: fix potential OOB write in PCF85063 NVMEM read rtc: tps6594: Fix integer overflow on 32bit systems rtc: use boolean values with device_init_wakeup() rtc: RTC_DRV_SPEAR should not default to y when compile-testing
This commit is contained in:
@@ -14,9 +14,13 @@ maintainers:
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- fsl,imx1-rtc
|
||||
- fsl,imx21-rtc
|
||||
oneOf:
|
||||
- const: fsl,imx1-rtc
|
||||
- const: fsl,imx21-rtc
|
||||
- items:
|
||||
- enum:
|
||||
- fsl,imx31-rtc
|
||||
- const: fsl,imx21-rtc
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
@@ -84,7 +84,6 @@ extern int hpet_set_rtc_irq_bit(unsigned long bit_mask);
|
||||
extern int hpet_set_alarm_time(unsigned char hrs, unsigned char min,
|
||||
unsigned char sec);
|
||||
extern int hpet_set_periodic_freq(unsigned long freq);
|
||||
extern int hpet_rtc_dropped_irq(void);
|
||||
extern int hpet_rtc_timer_init(void);
|
||||
extern irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id);
|
||||
extern int hpet_register_irq_handler(rtc_irq_handler handler);
|
||||
|
||||
@@ -1382,12 +1382,6 @@ int hpet_set_periodic_freq(unsigned long freq)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(hpet_set_periodic_freq);
|
||||
|
||||
int hpet_rtc_dropped_irq(void)
|
||||
{
|
||||
return is_hpet_enabled();
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(hpet_rtc_dropped_irq);
|
||||
|
||||
static void hpet_rtc_timer_reinit(void)
|
||||
{
|
||||
unsigned int delta;
|
||||
|
||||
@@ -1316,7 +1316,7 @@ config RTC_DRV_SC27XX
|
||||
config RTC_DRV_SPEAR
|
||||
tristate "SPEAR ST RTC"
|
||||
depends on PLAT_SPEAR || COMPILE_TEST
|
||||
default y
|
||||
default PLAT_SPEAR
|
||||
help
|
||||
If you say Y here you will get support for the RTC found on
|
||||
spear
|
||||
|
||||
@@ -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 */
|
||||
info->rtc_dev->dev.platform_data = &pdata->rtc_wakeup;
|
||||
|
||||
device_init_wakeup(&pdev->dev, 1);
|
||||
device_init_wakeup(&pdev->dev, true);
|
||||
|
||||
return 0;
|
||||
out_rtc:
|
||||
|
||||
@@ -326,7 +326,7 @@ static int pm860x_rtc_probe(struct platform_device *pdev)
|
||||
schedule_delayed_work(&info->calib_work, VRTC_CALIB_INTERVAL);
|
||||
#endif /* VRTC_CALIBRATION */
|
||||
|
||||
device_init_wakeup(&pdev->dev, 1);
|
||||
device_init_wakeup(&pdev->dev, true);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@ static int aml_rtc_probe(struct platform_device *pdev)
|
||||
"failed to get_enable rtc sys clk\n");
|
||||
aml_rtc_init(rtc);
|
||||
|
||||
device_init_wakeup(dev, 1);
|
||||
device_init_wakeup(dev, true);
|
||||
platform_set_drvdata(pdev, rtc);
|
||||
|
||||
rtc->rtc_dev = devm_rtc_allocate_device(dev);
|
||||
@@ -391,7 +391,7 @@ static int aml_rtc_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
err_clk:
|
||||
clk_disable_unprepare(rtc->sys_clk);
|
||||
device_init_wakeup(dev, 0);
|
||||
device_init_wakeup(dev, false);
|
||||
|
||||
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);
|
||||
|
||||
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 = {
|
||||
|
||||
@@ -527,7 +527,7 @@ static __init int armada38x_rtc_probe(struct platform_device *pdev)
|
||||
platform_set_drvdata(pdev, rtc);
|
||||
|
||||
if (rtc->irq != -1)
|
||||
device_init_wakeup(&pdev->dev, 1);
|
||||
device_init_wakeup(&pdev->dev, true);
|
||||
else
|
||||
clear_bit(RTC_FEATURE_ALARM, rtc->rtc_dev->features);
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ static int as3722_rtc_probe(struct platform_device *pdev)
|
||||
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_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.
|
||||
*/
|
||||
if (!device_can_wakeup(&pdev->dev))
|
||||
device_init_wakeup(&pdev->dev, 1);
|
||||
device_init_wakeup(&pdev->dev, true);
|
||||
|
||||
if (at91_rtc_config->has_correction)
|
||||
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 */
|
||||
if (!device_can_wakeup(&pdev->dev))
|
||||
device_init_wakeup(&pdev->dev, 1);
|
||||
device_init_wakeup(&pdev->dev, true);
|
||||
|
||||
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);
|
||||
|
||||
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->ref_clk);
|
||||
|
||||
@@ -151,11 +151,6 @@ static inline int hpet_set_periodic_freq(unsigned long freq)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int hpet_rtc_dropped_irq(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int hpet_rtc_timer_init(void)
|
||||
{
|
||||
return 0;
|
||||
@@ -864,7 +859,7 @@ static void acpi_cmos_wake_setup(struct device *dev)
|
||||
dev_info(dev, "RTC can wake from S4\n");
|
||||
|
||||
/* 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,
|
||||
|
||||
@@ -295,7 +295,7 @@ static int cpcap_rtc_probe(struct platform_device *pdev)
|
||||
}
|
||||
disable_irq(rtc->update_irq);
|
||||
|
||||
err = device_init_wakeup(dev, 1);
|
||||
err = device_init_wakeup(dev, true);
|
||||
if (err) {
|
||||
dev_err(dev, "wakeup initialization failed (%d)\n", err);
|
||||
/* ignore error and continue without wakeup support */
|
||||
|
||||
@@ -337,7 +337,7 @@ static int cros_ec_rtc_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = device_init_wakeup(&pdev->dev, 1);
|
||||
ret = device_init_wakeup(&pdev->dev, true);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to initialize wakeup\n");
|
||||
return ret;
|
||||
|
||||
@@ -288,7 +288,7 @@ static int da9055_rtc_probe(struct platform_device *pdev)
|
||||
if (ret & DA9055_RTC_ALM_EN)
|
||||
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,
|
||||
&da9055_rtc_ops, THIS_MODULE);
|
||||
|
||||
@@ -508,7 +508,7 @@ static int ds3232_probe(struct device *dev, struct regmap *regmap, int irq,
|
||||
return ret;
|
||||
|
||||
if (ds3232->irq > 0)
|
||||
device_init_wakeup(dev, 1);
|
||||
device_init_wakeup(dev, true);
|
||||
|
||||
ds3232_hwmon_register(dev, name);
|
||||
|
||||
|
||||
@@ -830,7 +830,7 @@ static int isl1208_setup_irq(struct i2c_client *client, int irq)
|
||||
isl1208_driver.driver.name,
|
||||
client);
|
||||
if (!rc) {
|
||||
device_init_wakeup(&client->dev, 1);
|
||||
device_init_wakeup(&client->dev, true);
|
||||
enable_irq_wake(irq);
|
||||
} else {
|
||||
dev_err(&client->dev,
|
||||
|
||||
@@ -367,7 +367,7 @@ static int jz4740_rtc_probe(struct platform_device *pdev)
|
||||
|
||||
platform_set_drvdata(pdev, rtc);
|
||||
|
||||
device_init_wakeup(dev, 1);
|
||||
device_init_wakeup(dev, true);
|
||||
|
||||
ret = dev_pm_set_wake_irq(dev, irq);
|
||||
if (ret)
|
||||
|
||||
@@ -114,6 +114,13 @@ static irqreturn_t loongson_rtc_isr(int irq, void *id)
|
||||
struct loongson_rtc_priv *priv = (struct loongson_rtc_priv *)id;
|
||||
|
||||
rtc_update_irq(priv->rtcdev, 1, RTC_AF | RTC_IRQF);
|
||||
|
||||
/*
|
||||
* The TOY_MATCH0_REG should be cleared 0 here,
|
||||
* otherwise the interrupt cannot be cleared.
|
||||
*/
|
||||
regmap_write(priv->regmap, TOY_MATCH0_REG, 0);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
@@ -131,11 +138,7 @@ static u32 loongson_rtc_handler(void *id)
|
||||
writel(RTC_STS, priv->pm_base + PM1_STS_REG);
|
||||
spin_unlock(&priv->lock);
|
||||
|
||||
/*
|
||||
* The TOY_MATCH0_REG should be cleared 0 here,
|
||||
* otherwise the interrupt cannot be cleared.
|
||||
*/
|
||||
return regmap_write(priv->regmap, TOY_MATCH0_REG, 0);
|
||||
return ACPI_INTERRUPT_HANDLED;
|
||||
}
|
||||
|
||||
static int loongson_rtc_set_enabled(struct device *dev)
|
||||
@@ -329,7 +332,7 @@ static int loongson_rtc_probe(struct platform_device *pdev)
|
||||
alarm_irq);
|
||||
|
||||
priv->pm_base = regs - priv->config->pm_offset;
|
||||
device_init_wakeup(dev, 1);
|
||||
device_init_wakeup(dev, true);
|
||||
|
||||
if (has_acpi_companion(dev))
|
||||
acpi_install_fixed_event_handler(ACPI_EVENT_RTC,
|
||||
@@ -360,7 +363,7 @@ static void loongson_rtc_remove(struct platform_device *pdev)
|
||||
acpi_remove_fixed_event_handler(ACPI_EVENT_RTC,
|
||||
loongson_rtc_handler);
|
||||
|
||||
device_init_wakeup(dev, 0);
|
||||
device_init_wakeup(dev, false);
|
||||
loongson_rtc_alarm_irq_enable(dev, 0);
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user