Commit 3f2a1903 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'rtc-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux

Pull RTC updates from Alexandre Belloni:
 "Not much this cycle, there is the conversion to remove_new and many
  small fixes in drivers:

  Subsystem:
   - Convert to platform remove callback returning void

  Drivers:
   - meson-vrtc: fix a firmware display issue"

* tag 'rtc-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (53 commits)
  rtc: armada38x: use devm_platform_ioremap_resource_byname()
  rtc: sunplus: use devm_platform_ioremap_resource_byname()
  rtc: jz4740: Make sure clock provider gets removed
  rtc: k3: handle errors while enabling wake irq
  rtc: meson-vrtc: Use ktime_get_real_ts64() to get the current time
  dt-bindings: rtc: Drop unneeded quotes
  rtc: pcf8523: remove unnecessary OR operation
  rtc: pcf8523: fix coding-style issues
  rtc: ds1390: mark OF related data as maybe unused
  rtc: omap: include header for omap_rtc_power_off_program prototype
  rtc: sun6i: Use of_property_present() for testing DT property presence
  rtc: mpfs: convert SOC_MICROCHIP_POLARFIRE to ARCH_MICROCHIP_POLARFIRE
  rtc: zynqmp: Convert to platform remove callback returning void
  rtc: xgene: Convert to platform remove callback returning void
  rtc: wm8350: Convert to platform remove callback returning void
  rtc: vt8500: Convert to platform remove callback returning void
  rtc: twl: Convert to platform remove callback returning void
  rtc: tps6586x: Convert to platform remove callback returning void
  rtc: tegra: Convert to platform remove callback returning void
  rtc: sunplus: Convert to platform remove callback returning void
  ...
parents e0906f1f e99ab4ab
......@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Allwinner A10 RTC
allOf:
- $ref: "rtc.yaml#"
- $ref: rtc.yaml#
maintainers:
- Chen-Yu Tsai <wens@csie.org>
......
......@@ -61,7 +61,7 @@ properties:
- the Internal Oscillator, at index 2.
allOf:
- $ref: "rtc.yaml#"
- $ref: rtc.yaml#
- if:
properties:
compatible:
......
......@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Atmel AT91 RTC
allOf:
- $ref: "rtc.yaml#"
- $ref: rtc.yaml#
maintainers:
- Alexandre Belloni <alexandre.belloni@bootlin.com>
......
......@@ -8,7 +8,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Atmel AT91 RTT
allOf:
- $ref: "rtc.yaml#"
- $ref: rtc.yaml#
maintainers:
- Alexandre Belloni <alexandre.belloni@bootlin.com>
......
......@@ -15,7 +15,7 @@ description:
optionally generate RTC alarm interrupts.
allOf:
- $ref: "rtc.yaml#"
- $ref: rtc.yaml#
properties:
compatible:
......
......@@ -38,8 +38,8 @@ properties:
clock-names:
items:
- const: "PCLK"
- const: "EXTCLK"
- const: PCLK
- const: EXTCLK
required:
- compatible
......
......@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip RV-3032 RTC
allOf:
- $ref: "rtc.yaml#"
- $ref: rtc.yaml#
maintainers:
- Alexandre Belloni <alexandre.belloni@bootlin.com>
......
......@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Mstar MSC313e RTC
allOf:
- $ref: "rtc.yaml#"
- $ref: rtc.yaml#
maintainers:
- Daniel Palmer <daniel@0x0f.com>
......
......@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: NUVOTON NCT3018Y Real Time Clock
allOf:
- $ref: "rtc.yaml#"
- $ref: rtc.yaml#
maintainers:
- Medad CChien <ctcchien@nuvoton.com>
......
......@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP PCF2127 Real Time Clock
allOf:
- $ref: "rtc.yaml#"
- $ref: rtc.yaml#
maintainers:
- Alexandre Belloni <alexandre.belloni@bootlin.com>
......
......@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Real Time Clock of the i.MX SoCs
allOf:
- $ref: "rtc.yaml#"
- $ref: rtc.yaml#
maintainers:
- Philippe Reynes <tremyfr@gmail.com>
......
......@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: i.MX53 Secure Real Time Clock (SRTC)
allOf:
- $ref: "rtc.yaml#"
- $ref: rtc.yaml#
maintainers:
- Patrick Bruenn <p.bruenn@beckhoff.com>
......
......@@ -34,8 +34,8 @@ properties:
interrupt-names:
items:
- const: 'rtc 1Hz'
- const: 'rtc alarm'
- const: rtc 1Hz
- const: rtc alarm
required:
- compatible
......
......@@ -32,7 +32,7 @@ properties:
maxItems: 1
st,syscfg:
$ref: "/schemas/types.yaml#/definitions/phandle-array"
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
minItems: 3
maxItems: 3
......
......@@ -13,7 +13,7 @@ description: |
This RTC appears in the AM62x family of SoCs.
allOf:
- $ref: "rtc.yaml#"
- $ref: rtc.yaml#
properties:
compatible:
......
......@@ -15,7 +15,7 @@ description: |
possibly an interrupt line.
allOf:
- $ref: "rtc.yaml#"
- $ref: rtc.yaml#
properties:
compatible:
......
......@@ -1970,7 +1970,7 @@ config RTC_DRV_MSC313
config RTC_DRV_POLARFIRE_SOC
tristate "Microchip PolarFire SoC built-in RTC"
depends on SOC_MICROCHIP_POLARFIRE
depends on ARCH_MICROCHIP_POLARFIRE
help
If you say yes here you will get support for the
built-in RTC on Polarfire SoC.
......
......@@ -317,11 +317,10 @@ static int pm80x_rtc_probe(struct platform_device *pdev)
return ret;
}
static int pm80x_rtc_remove(struct platform_device *pdev)
static void pm80x_rtc_remove(struct platform_device *pdev)
{
struct pm80x_rtc_info *info = platform_get_drvdata(pdev);
pm80x_free_irq(info->chip, info->irq, info);
return 0;
}
static struct platform_driver pm80x_rtc_driver = {
......@@ -330,7 +329,7 @@ static struct platform_driver pm80x_rtc_driver = {
.pm = &pm80x_rtc_pm_ops,
},
.probe = pm80x_rtc_probe,
.remove = pm80x_rtc_remove,
.remove_new = pm80x_rtc_remove,
};
module_platform_driver(pm80x_rtc_driver);
......
......@@ -331,7 +331,7 @@ static int pm860x_rtc_probe(struct platform_device *pdev)
return 0;
}
static int pm860x_rtc_remove(struct platform_device *pdev)
static void pm860x_rtc_remove(struct platform_device *pdev)
{
struct pm860x_rtc_info *info = platform_get_drvdata(pdev);
......@@ -340,8 +340,6 @@ static int pm860x_rtc_remove(struct platform_device *pdev)
/* disable measurement */
pm860x_set_bits(info->i2c, PM8607_MEAS_EN2, MEAS2_VRTC, 0);
#endif /* VRTC_CALIBRATION */
return 0;
}
#ifdef CONFIG_PM_SLEEP
......@@ -373,7 +371,7 @@ static struct platform_driver pm860x_rtc_driver = {
.pm = &pm860x_rtc_pm_ops,
},
.probe = pm860x_rtc_probe,
.remove = pm860x_rtc_remove,
.remove_new = pm860x_rtc_remove,
};
module_platform_driver(pm860x_rtc_driver);
......
......@@ -392,12 +392,10 @@ static int ab8500_rtc_probe(struct platform_device *pdev)
return devm_rtc_register_device(rtc);
}
static int ab8500_rtc_remove(struct platform_device *pdev)
static void ab8500_rtc_remove(struct platform_device *pdev)
{
dev_pm_clear_wake_irq(&pdev->dev);
device_init_wakeup(&pdev->dev, false);
return 0;
}
static struct platform_driver ab8500_rtc_driver = {
......@@ -405,7 +403,7 @@ static struct platform_driver ab8500_rtc_driver = {
.name = "ab8500-rtc",
},
.probe = ab8500_rtc_probe,
.remove = ab8500_rtc_remove,
.remove_new = ab8500_rtc_remove,
.id_table = ab85xx_rtc_ids,
};
......
......@@ -613,13 +613,11 @@ static int ac100_rtc_probe(struct platform_device *pdev)
return devm_rtc_register_device(chip->rtc);
}
static int ac100_rtc_remove(struct platform_device *pdev)
static void ac100_rtc_remove(struct platform_device *pdev)
{
struct ac100_rtc_dev *chip = platform_get_drvdata(pdev);
ac100_rtc_unregister_clks(chip);
return 0;
}
static const struct of_device_id ac100_rtc_match[] = {
......@@ -630,7 +628,7 @@ MODULE_DEVICE_TABLE(of, ac100_rtc_match);
static struct platform_driver ac100_rtc_driver = {
.probe = ac100_rtc_probe,
.remove = ac100_rtc_remove,
.remove_new = ac100_rtc_remove,
.driver = {
.name = "ac100-rtc",
.of_match_table = of_match_ptr(ac100_rtc_match),
......
......@@ -491,7 +491,6 @@ MODULE_DEVICE_TABLE(of, armada38x_rtc_of_match_table);
static __init int armada38x_rtc_probe(struct platform_device *pdev)
{
struct resource *res;
struct armada38x_rtc *rtc;
rtc = devm_kzalloc(&pdev->dev, sizeof(struct armada38x_rtc),
......@@ -508,12 +507,10 @@ static __init int armada38x_rtc_probe(struct platform_device *pdev)
spin_lock_init(&rtc->lock);
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "rtc");
rtc->regs = devm_ioremap_resource(&pdev->dev, res);
rtc->regs = devm_platform_ioremap_resource_byname(pdev, "rtc");
if (IS_ERR(rtc->regs))
return PTR_ERR(rtc->regs);
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "rtc-soc");
rtc->regs_soc = devm_ioremap_resource(&pdev->dev, res);
rtc->regs_soc = devm_platform_ioremap_resource_byname(pdev, "rtc-soc");
if (IS_ERR(rtc->regs_soc))
return PTR_ERR(rtc->regs_soc);
......
......@@ -308,14 +308,13 @@ static int asm9260_rtc_probe(struct platform_device *pdev)
return ret;
}
static int asm9260_rtc_remove(struct platform_device *pdev)
static void asm9260_rtc_remove(struct platform_device *pdev)
{
struct asm9260_rtc_priv *priv = platform_get_drvdata(pdev);
/* Disable alarm matching */
iowrite32(BM_AMR_OFF, priv->iobase + HW_AMR);
clk_disable_unprepare(priv->clk);
return 0;
}
static const struct of_device_id asm9260_dt_ids[] = {
......@@ -326,7 +325,7 @@ MODULE_DEVICE_TABLE(of, asm9260_dt_ids);
static struct platform_driver asm9260_rtc_driver = {
.probe = asm9260_rtc_probe,
.remove = asm9260_rtc_remove,
.remove_new = asm9260_rtc_remove,
.driver = {
.name = "asm9260-rtc",
.of_match_table = asm9260_dt_ids,
......
......@@ -442,7 +442,7 @@ static int at91_rtc_probe(struct platform_device *pdev)
/*
* Disable and remove the RTC driver
*/
static int at91_rtc_remove(struct platform_device *pdev)
static void at91_rtc_remove(struct platform_device *pdev)
{
struct sam9_rtc *rtc = platform_get_drvdata(pdev);
u32 mr = rtt_readl(rtc, MR);
......@@ -451,8 +451,6 @@ static int at91_rtc_remove(struct platform_device *pdev)
rtt_writel(rtc, MR, mr & ~(AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN));
clk_disable_unprepare(rtc->sclk);
return 0;
}
static void at91_rtc_shutdown(struct platform_device *pdev)
......@@ -531,7 +529,7 @@ MODULE_DEVICE_TABLE(of, at91_rtc_dt_ids);
static struct platform_driver at91_rtc_driver = {
.probe = at91_rtc_probe,
.remove = at91_rtc_remove,
.remove_new = at91_rtc_remove,
.shutdown = at91_rtc_shutdown,
.driver = {
.name = "rtc-at91sam9",
......
......@@ -336,14 +336,12 @@ static int brcmstb_waketmr_probe(struct platform_device *pdev)
return ret;
}
static int brcmstb_waketmr_remove(struct platform_device *pdev)
static void brcmstb_waketmr_remove(struct platform_device *pdev)
{
struct brcmstb_waketmr *timer = dev_get_drvdata(&pdev->dev);
unregister_reboot_notifier(&timer->reboot_notifier);
clk_disable_unprepare(timer->clk);
return 0;
}
#ifdef CONFIG_PM_SLEEP
......@@ -382,7 +380,7 @@ static const __maybe_unused struct of_device_id brcmstb_waketmr_of_match[] = {
static struct platform_driver brcmstb_waketmr_driver = {
.probe = brcmstb_waketmr_probe,
.remove = brcmstb_waketmr_remove,
.remove_new = brcmstb_waketmr_remove,
.driver = {
.name = "brcmstb-waketimer",
.pm = &brcmstb_waketmr_pm_ops,
......
......@@ -354,7 +354,7 @@ static int cdns_rtc_probe(struct platform_device *pdev)
return ret;
}
static int cdns_rtc_remove(struct platform_device *pdev)
static void cdns_rtc_remove(struct platform_device *pdev)
{
struct cdns_rtc *crtc = platform_get_drvdata(pdev);
......@@ -363,8 +363,6 @@ static int cdns_rtc_remove(struct platform_device *pdev)
clk_disable_unprepare(crtc->pclk);
clk_disable_unprepare(crtc->ref_clk);
return 0;
}
#ifdef CONFIG_PM_SLEEP
......@@ -404,7 +402,7 @@ static struct platform_driver cdns_rtc_driver = {
.pm = &cdns_rtc_pm_ops,
},
.probe = cdns_rtc_probe,
.remove = cdns_rtc_remove,
.remove_new = cdns_rtc_remove,
};
module_platform_driver(cdns_rtc_driver);
......
......@@ -1489,10 +1489,9 @@ static int __init cmos_platform_probe(struct platform_device *pdev)
return cmos_do_probe(&pdev->dev, resource, irq);
}
static int cmos_platform_remove(struct platform_device *pdev)
static void cmos_platform_remove(struct platform_device *pdev)
{
cmos_do_remove(&pdev->dev);
return 0;
}
static void cmos_platform_shutdown(struct platform_device *pdev)
......@@ -1514,7 +1513,7 @@ static void cmos_platform_shutdown(struct platform_device *pdev)
MODULE_ALIAS("platform:rtc_cmos");
static struct platform_driver cmos_platform_driver = {
.remove = cmos_platform_remove,
.remove_new = cmos_platform_remove,
.shutdown = cmos_platform_shutdown,
.driver = {
.name = driver_name,
......
......@@ -371,7 +371,7 @@ static int cros_ec_rtc_probe(struct platform_device *pdev)
return 0;
}
static int cros_ec_rtc_remove(struct platform_device *pdev)
static void cros_ec_rtc_remove(struct platform_device *pdev)
{
struct cros_ec_rtc *cros_ec_rtc = platform_get_drvdata(pdev);
struct device *dev = &pdev->dev;
......@@ -382,13 +382,11 @@ static int cros_ec_rtc_remove(struct platform_device *pdev)
&cros_ec_rtc->notifier);
if (ret)
dev_err(dev, "failed to unregister notifier\n");
return 0;
}
static struct platform_driver cros_ec_rtc_driver = {
.probe = cros_ec_rtc_probe,
.remove = cros_ec_rtc_remove,
.remove_new = cros_ec_rtc_remove,
.driver = {
.name = DRV_NAME,
.pm = &cros_ec_rtc_pm_ops,
......
......@@ -213,7 +213,7 @@ static int ds1390_probe(struct spi_device *spi)
return res;
}
static const struct of_device_id ds1390_of_match[] = {
static const struct of_device_id ds1390_of_match[] __maybe_unused = {
{ .compatible = "dallas,ds1390" },
{}
};
......
......@@ -1322,7 +1322,7 @@ ds1685_rtc_probe(struct platform_device *pdev)
* ds1685_rtc_remove - removes rtc driver.
* @pdev: pointer to platform_device structure.
*/
static int
static void
ds1685_rtc_remove(struct platform_device *pdev)
{
struct ds1685_priv *rtc = platform_get_drvdata(pdev);
......@@ -1344,8 +1344,6 @@ ds1685_rtc_remove(struct platform_device *pdev)
rtc->write(rtc, RTC_EXT_CTRL_4A,
(rtc->read(rtc, RTC_EXT_CTRL_4A) &
~(RTC_CTRL_4A_RWK_MASK)));
return 0;
}
/*
......@@ -1356,7 +1354,7 @@ static struct platform_driver ds1685_rtc_driver = {
.name = "rtc-ds1685",
},
.probe = ds1685_rtc_probe,
.remove = ds1685_rtc_remove,
.remove_new = ds1685_rtc_remove,
};
module_platform_driver(ds1685_rtc_driver);
/* ----------------------------------------------------------------------- */
......
......@@ -191,7 +191,7 @@ static int ftrtc010_rtc_probe(struct platform_device *pdev)
return ret;
}
static int ftrtc010_rtc_remove(struct platform_device *pdev)
static void ftrtc010_rtc_remove(struct platform_device *pdev)
{
struct ftrtc010_rtc *rtc = platform_get_drvdata(pdev);
......@@ -199,8 +199,6 @@ static int ftrtc010_rtc_remove(struct platform_device *pdev)
clk_disable_unprepare(rtc->extclk);
if (!IS_ERR(rtc->pclk))
clk_disable_unprepare(rtc->pclk);
return 0;
}
static const struct of_device_id ftrtc010_rtc_dt_match[] = {
......@@ -216,7 +214,7 @@ static struct platform_driver ftrtc010_rtc_driver = {
.of_match_table = ftrtc010_rtc_dt_match,
},
.probe = ftrtc010_rtc_probe,
.remove = ftrtc010_rtc_remove,
.remove_new = ftrtc010_rtc_remove,
};
module_platform_driver_probe(ftrtc010_rtc_driver, ftrtc010_rtc_probe);
......@@ -296,14 +296,12 @@ static int hid_time_probe(struct platform_device *pdev)
return ret;
}
static int hid_time_remove(struct platform_device *pdev)
static void hid_time_remove(struct platform_device *pdev)
{
struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev);
sensor_hub_device_close(hsdev);
sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_TIME);
return 0;
}
static const struct platform_device_id hid_time_ids[] = {
......@@ -321,7 +319,7 @@ static struct platform_driver hid_time_platform_driver = {
.name = KBUILD_MODNAME,
},
.probe = hid_time_probe,
.remove = hid_time_remove,
.remove_new = hid_time_remove,
};
module_platform_driver(hid_time_platform_driver);
......
......@@ -414,7 +414,8 @@ static int jz4740_rtc_probe(struct platform_device *pdev)
return dev_err_probe(dev, ret,
"Unable to register clk32k clock\n");
ret = of_clk_add_hw_provider(np, of_clk_hw_simple_get, &rtc->clk32k);
ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get,
&rtc->clk32k);
if (ret)
return dev_err_probe(dev, ret,
"Unable to register clk32k clock provider\n");
......
......@@ -264,7 +264,7 @@ static int lpc24xx_rtc_probe(struct platform_device *pdev)
return ret;
}
static int lpc24xx_rtc_remove(struct platform_device *pdev)
static void lpc24xx_rtc_remove(struct platform_device *pdev)
{
struct lpc24xx_rtc *rtc = platform_get_drvdata(pdev);
......@@ -276,8 +276,6 @@ static int lpc24xx_rtc_remove(struct platform_device *pdev)
clk_disable_unprepare(rtc->clk_rtc);
clk_disable_unprepare(rtc->clk_reg);
return 0;
}
static const struct of_device_id lpc24xx_rtc_match[] = {
......@@ -288,7 +286,7 @@ MODULE_DEVICE_TABLE(of, lpc24xx_rtc_match);
static struct platform_driver lpc24xx_rtc_driver = {
.probe = lpc24xx_rtc_probe,
.remove = lpc24xx_rtc_remove,
.remove_new = lpc24xx_rtc_remove,
.driver = {
.name = "lpc24xx-rtc",
.of_match_table = lpc24xx_rtc_match,
......
......@@ -806,14 +806,12 @@ static int max77686_rtc_probe(struct platform_device *pdev)
return ret;
}
static int max77686_rtc_remove(struct platform_device *pdev)
static void max77686_rtc_remove(struct platform_device *pdev)
{
struct max77686_rtc_info *info = platform_get_drvdata(pdev);
free_irq(info->virq, info);
regmap_del_irq_chip(info->rtc_irq, info->rtc_irq_data);
return 0;
}
#ifdef CONFIG_PM_SLEEP
......@@ -877,7 +875,7 @@ static struct platform_driver max77686_rtc_driver = {
.pm = &max77686_rtc_pm_ops,
},
.probe = max77686_rtc_probe,
.remove = max77686_rtc_remove,
.remove_new = max77686_rtc_remove,
.id_table = rtc_id,
};
......
......@@ -324,7 +324,7 @@ static int __init mc13xxx_rtc_probe(struct platform_device *pdev)
return ret;
}
static int mc13xxx_rtc_remove(struct platform_device *pdev)
static void mc13xxx_rtc_remove(struct platform_device *pdev)
{
struct mc13xxx_rtc *priv = platform_get_drvdata(pdev);
......@@ -334,8 +334,6 @@ static int mc13xxx_rtc_remove(struct platform_device *pdev)
mc13xxx_irq_free(priv->mc13xxx, MC13XXX_IRQ_RTCRST, priv);
mc13xxx_unlock(priv->mc13xxx);
return 0;
}
static const struct platform_device_id mc13xxx_rtc_idtable[] = {
......@@ -352,7 +350,7 @@ MODULE_DEVICE_TABLE(platform, mc13xxx_rtc_idtable);
static struct platform_driver mc13xxx_rtc_driver = {
.id_table = mc13xxx_rtc_idtable,
.remove = mc13xxx_rtc_remove,
.remove_new = mc13xxx_rtc_remove,
.driver = {
.name = DRIVER_NAME,
},
......
......@@ -23,7 +23,7 @@ static int meson_vrtc_read_time(struct device *dev, struct rtc_time *tm)
struct timespec64 time;
dev_dbg(dev, "%s\n", __func__);
ktime_get_raw_ts64(&time);
ktime_get_real_ts64(&time);
rtc_time64_to_tm(time.tv_sec, tm);
return 0;
......@@ -96,7 +96,7 @@ static int __maybe_unused meson_vrtc_suspend(struct device *dev)
long alarm_secs;
struct timespec64 time;
ktime_get_raw_ts64(&time);
ktime_get_real_ts64(&time);
local_time = time.tv_sec;
dev_dbg(dev, "alarm_time = %lus, local_time=%lus\n",
......
......@@ -372,7 +372,7 @@ static int mpc5121_rtc_probe(struct platform_device *op)
return err;
}
static int mpc5121_rtc_remove(struct platform_device *op)
static void mpc5121_rtc_remove(struct platform_device *op)
{
struct mpc5121_rtc_data *rtc = platform_get_drvdata(op);
struct mpc5121_rtc_regs __iomem *regs = rtc->regs;
......@@ -383,8 +383,6 @@ static int mpc5121_rtc_remove(struct platform_device *op)
irq_dispose_mapping(rtc->irq);
irq_dispose_mapping(rtc->irq_periodic);
return 0;
}
#ifdef CONFIG_OF
......@@ -402,7 +400,7 @@ static struct platform_driver mpc5121_rtc_driver = {
.of_match_table = of_match_ptr(mpc5121_rtc_match),
},
.probe = mpc5121_rtc_probe,
.remove = mpc5121_rtc_remove,
.remove_new = mpc5121_rtc_remove,
};
module_platform_driver(mpc5121_rtc_driver);
......
......@@ -274,11 +274,9 @@ static int mpfs_rtc_probe(struct platform_device *pdev)
return devm_rtc_register_device(rtcdev->rtc);
}
static int mpfs_rtc_remove(struct platform_device *pdev)
static void mpfs_rtc_remove(struct platform_device *pdev)
{
dev_pm_clear_wake_irq(&pdev->dev);
return 0;
}
static const struct of_device_id mpfs_rtc_of_match[] = {
......@@ -290,7 +288,7 @@ MODULE_DEVICE_TABLE(of, mpfs_rtc_of_match);
static struct platform_driver mpfs_rtc_driver = {
.probe = mpfs_rtc_probe,
.remove = mpfs_rtc_remove,
.remove_new = mpfs_rtc_remove,
.driver = {
.name = "mpfs_rtc",
.of_match_table = mpfs_rtc_of_match,
......
......@@ -357,13 +357,11 @@ static int mtk_rtc_probe(struct platform_device *pdev)
return ret;
}
static int mtk_rtc_remove(struct platform_device *pdev)
static void mtk_rtc_remove(struct platform_device *pdev)
{
struct mtk_rtc *hw = platform_get_drvdata(pdev);
clk_disable_unprepare(hw->clk);
return 0;
}
#ifdef CONFIG_PM_SLEEP
......@@ -396,7 +394,7 @@ static SIMPLE_DEV_PM_OPS(mtk_rtc_pm_ops, mtk_rtc_suspend, mtk_rtc_resume);
static struct platform_driver mtk_rtc_driver = {
.probe = mtk_rtc_probe,
.remove = mtk_rtc_remove,
.remove_new = mtk_rtc_remove,
.driver = {
.name = MTK_RTC_DEV,
.of_match_table = mtk_rtc_match,
......
......@@ -362,12 +362,11 @@ static int mxc_rtc_probe(struct platform_device *pdev)
return ret;
}
static int mxc_rtc_remove(struct platform_device *pdev)
static void mxc_rtc_remove(struct platform_device *pdev)
{
struct mxc_rtc_data *pdata = platform_get_drvdata(pdev);
clk_disable_unprepare(pdata->clk);
return 0;
}
static const struct of_device_id mxc_ids[] = {
......@@ -382,7 +381,7 @@ static struct platform_driver mxc_rtc_driver = {
.of_match_table = mxc_ids,
},
.probe = mxc_rtc_probe,
.remove = mxc_rtc_remove,
.remove_new = mxc_rtc_remove,
};
module_platform_driver(mxc_rtc_driver);
......
......@@ -25,6 +25,7 @@
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/rtc.h>
#include <linux/rtc/rtc-omap.h>
/*
* The OMAP RTC is a year/month/day/hours/minutes/seconds BCD clock
......@@ -910,7 +911,7 @@ static int omap_rtc_probe(struct platform_device *pdev)
return ret;
}
static int omap_rtc_remove(struct platform_device *pdev)
static void omap_rtc_remove(struct platform_device *pdev)
{
struct omap_rtc *rtc = platform_get_drvdata(pdev);
u8 reg;
......@@ -941,8 +942,6 @@ static int omap_rtc_remove(struct platform_device *pdev)
/* Disable the clock/module */
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
return 0;
}
static int __maybe_unused omap_rtc_suspend(struct device *dev)
......@@ -1017,7 +1016,7 @@ static void omap_rtc_shutdown(struct platform_device *pdev)
static struct platform_driver omap_rtc_driver = {
.probe = omap_rtc_probe,
.remove = omap_rtc_remove,
.remove_new = omap_rtc_remove,
.shutdown = omap_rtc_shutdown,
.driver = {
.name = "omap_rtc",
......
......@@ -308,10 +308,9 @@ static int palmas_rtc_probe(struct platform_device *pdev)
return 0;
}
static int palmas_rtc_remove(struct platform_device *pdev)
static void palmas_rtc_remove(struct platform_device *pdev)
{
palmas_rtc_alarm_irq_enable(&pdev->dev, 0);
return 0;
}
#ifdef CONFIG_PM_SLEEP
......@@ -347,7 +346,7 @@ MODULE_DEVICE_TABLE(of, of_palmas_rtc_match);
static struct platform_driver palmas_rtc_driver = {
.probe = palmas_rtc_probe,
.remove = palmas_rtc_remove,
.remove_new = palmas_rtc_remove,
.driver = {
.name = "palmas-rtc",
.pm = &palmas_rtc_pm_ops,
......
......@@ -260,14 +260,12 @@ static int pcf50633_rtc_probe(struct platform_device *pdev)
return 0;
}
static int pcf50633_rtc_remove(struct platform_device *pdev)
static void pcf50633_rtc_remove(struct platform_device *pdev)
{
struct pcf50633_rtc *rtc;
rtc = platform_get_drvdata(pdev);
pcf50633_free_irq(rtc->pcf, PCF50633_IRQ_ALARM);
return 0;
}
static struct platform_driver pcf50633_rtc_driver = {
......@@ -275,7 +273,7 @@ static struct platform_driver pcf50633_rtc_driver = {
.name = "pcf50633-rtc",
},
.probe = pcf50633_rtc_probe,
.remove = pcf50633_rtc_remove,
.remove_new = pcf50633_rtc_remove,
};
module_platform_driver(pcf50633_rtc_driver);
......
......@@ -21,7 +21,7 @@
#define PCF8523_CONTROL2_AF BIT(3)
#define PCF8523_REG_CONTROL3 0x02
#define PCF8523_CONTROL3_PM GENMASK(7,5)
#define PCF8523_CONTROL3_PM GENMASK(7, 5)
#define PCF8523_PM_STANDBY 0x7
#define PCF8523_CONTROL3_BLF BIT(2) /* battery low bit, read-only */
#define PCF8523_CONTROL3_BSF BIT(3)
......@@ -65,7 +65,7 @@ static int pcf8523_load_capacitance(struct pcf8523 *pcf8523, struct device_node
load);
fallthrough;
case 12500:
value |= PCF8523_CONTROL1_CAP_SEL;
value = PCF8523_CONTROL1_CAP_SEL;
break;
case 7000:
break;
......@@ -234,8 +234,7 @@ static int pcf8523_param_get(struct device *dev, struct rtc_param *param)
int ret;
u32 value;
switch(param->param) {
switch (param->param) {
case RTC_PARAM_BACKUP_SWITCH_MODE:
ret = regmap_read(pcf8523->regmap, PCF8523_REG_CONTROL3, &value);
if (ret < 0)
......@@ -243,7 +242,7 @@ static int pcf8523_param_get(struct device *dev, struct rtc_param *param)
value = FIELD_GET(PCF8523_CONTROL3_PM, value);
switch(value) {
switch (value) {
case 0x0:
case 0x4:
param->uvalue = RTC_BSM_LEVEL;
......@@ -273,7 +272,7 @@ static int pcf8523_param_set(struct device *dev, struct rtc_param *param)
struct pcf8523 *pcf8523 = dev_get_drvdata(dev);
u8 mode;
switch(param->param) {
switch (param->param) {
case RTC_PARAM_BACKUP_SWITCH_MODE:
switch (param->uvalue) {
case RTC_BSM_DISABLED:
......
......@@ -284,15 +284,13 @@ static void pic32_rtc_enable(struct pic32_rtc_dev *pdata, int en)
clk_disable(pdata->clk);
}
static int pic32_rtc_remove(struct platform_device *pdev)
static void pic32_rtc_remove(struct platform_device *pdev)
{
struct pic32_rtc_dev *pdata = platform_get_drvdata(pdev);
pic32_rtc_setaie(&pdev->dev, 0);
clk_unprepare(pdata->clk);
pdata->clk = NULL;
return 0;
}
static int pic32_rtc_probe(struct platform_device *pdev)
......@@ -373,7 +371,7 @@ MODULE_DEVICE_TABLE(of, pic32_rtc_dt_ids);
static struct platform_driver pic32_rtc_driver = {
.probe = pic32_rtc_probe,
.remove = pic32_rtc_remove,
.remove_new = pic32_rtc_remove,
.driver = {
.name = "pic32-rtc",
.of_match_table = of_match_ptr(pic32_rtc_dt_ids),
......
......@@ -530,15 +530,14 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev)
return 0;
}
static int pm8xxx_remove(struct platform_device *pdev)
static void pm8xxx_remove(struct platform_device *pdev)
{
dev_pm_clear_wake_irq(&pdev->dev);
return 0;
}
static struct platform_driver pm8xxx_rtc_driver = {
.probe = pm8xxx_rtc_probe,
.remove = pm8xxx_remove,
.remove_new = pm8xxx_remove,
.driver = {
.name = "rtc-pm8xxx",
.of_match_table = pm8xxx_id_table,
......
......@@ -262,12 +262,11 @@ static int rc5t583_rtc_probe(struct platform_device *pdev)
* Disable rc5t583 RTC interrupts.
* Sets status flag to free.
*/
static int rc5t583_rtc_remove(struct platform_device *pdev)
static void rc5t583_rtc_remove(struct platform_device *pdev)
{
struct rc5t583_rtc *rc5t583_rtc = platform_get_drvdata(pdev);
rc5t583_rtc_alarm_irq_enable(&rc5t583_rtc->rtc->dev, 0);
return 0;
}
#ifdef CONFIG_PM_SLEEP
......@@ -299,7 +298,7 @@ static SIMPLE_DEV_PM_OPS(rc5t583_rtc_pm_ops, rc5t583_rtc_suspend,
static struct platform_driver rc5t583_rtc_driver = {
.probe = rc5t583_rtc_probe,
.remove = rc5t583_rtc_remove,
.remove_new = rc5t583_rtc_remove,
.driver = {
.name = "rtc-rc5t583",
.pm = &rc5t583_rtc_pm_ops,
......
......@@ -216,7 +216,7 @@ static int rtd119x_rtc_probe(struct platform_device *pdev)
return 0;
}
static int rtd119x_rtc_remove(struct platform_device *pdev)
static void rtd119x_rtc_remove(struct platform_device *pdev)
{
struct rtd119x_rtc *data = platform_get_drvdata(pdev);
......@@ -224,13 +224,11 @@ static int rtd119x_rtc_remove(struct platform_device *pdev)
clk_disable_unprepare(data->clk);
clk_put(data->clk);
return 0;
}
static struct platform_driver rtd119x_rtc_driver = {
.probe = rtd119x_rtc_probe,
.remove = rtd119x_rtc_remove,
.remove_new = rtd119x_rtc_remove,
.driver = {
.name = "rtd1295-rtc",
.of_match_table = rtd119x_rtc_dt_ids,
......
......@@ -391,11 +391,9 @@ static int rzn1_rtc_probe(struct platform_device *pdev)
return ret;
}
static int rzn1_rtc_remove(struct platform_device *pdev)
static void rzn1_rtc_remove(struct platform_device *pdev)
{
pm_runtime_put(&pdev->dev);
return 0;
}
static const struct of_device_id rzn1_rtc_of_match[] = {
......@@ -406,7 +404,7 @@ MODULE_DEVICE_TABLE(of, rzn1_rtc_of_match);
static struct platform_driver rzn1_rtc_driver = {
.probe = rzn1_rtc_probe,
.remove = rzn1_rtc_remove,
.remove_new = rzn1_rtc_remove,
.driver = {
.name = "rzn1-rtc",
.of_match_table = rzn1_rtc_of_match,
......
......@@ -385,7 +385,7 @@ static void s3c6410_rtc_disable(struct s3c_rtc *info)
writew(con, info->base + S3C2410_RTCCON);
}
static int s3c_rtc_remove(struct platform_device *pdev)
static void s3c_rtc_remove(struct platform_device *pdev)
{
struct s3c_rtc *info = platform_get_drvdata(pdev);
......@@ -394,8 +394,6 @@ static int s3c_rtc_remove(struct platform_device *pdev)
if (info->data->needs_src_clk)
clk_unprepare(info->rtc_src_clk);
clk_unprepare(info->rtc_clk);
return 0;
}
static int s3c_rtc_probe(struct platform_device *pdev)
......@@ -600,7 +598,7 @@ MODULE_DEVICE_TABLE(of, s3c_rtc_dt_match);
static struct platform_driver s3c_rtc_driver = {
.probe = s3c_rtc_probe,
.remove = s3c_rtc_remove,
.remove_new = s3c_rtc_remove,
.driver = {
.name = "s3c-rtc",
.pm = &s3c_rtc_pm_ops,
......
......@@ -297,7 +297,7 @@ static int sa1100_rtc_probe(struct platform_device *pdev)
return sa1100_rtc_init(pdev, info);
}
static int sa1100_rtc_remove(struct platform_device *pdev)
static void sa1100_rtc_remove(struct platform_device *pdev)
{
struct sa1100_rtc *info = platform_get_drvdata(pdev);
......@@ -307,8 +307,6 @@ static int sa1100_rtc_remove(struct platform_device *pdev)
spin_unlock_irq(&info->lock);
clk_disable_unprepare(info->clk);
}
return 0;
}
#ifdef CONFIG_PM_SLEEP
......@@ -343,7 +341,7 @@ MODULE_DEVICE_TABLE(of, sa1100_rtc_dt_ids);
static struct platform_driver sa1100_rtc_driver = {
.probe = sa1100_rtc_probe,
.remove = sa1100_rtc_remove,
.remove_new = sa1100_rtc_remove,
.driver = {
.name = "sa1100-rtc",
.pm = &sa1100_rtc_pm_ops,
......
......@@ -405,15 +405,13 @@ static int spear_rtc_probe(struct platform_device *pdev)
return status;
}
static int spear_rtc_remove(struct platform_device *pdev)
static void spear_rtc_remove(struct platform_device *pdev)
{
struct spear_rtc_config *config = platform_get_drvdata(pdev);
spear_rtc_disable_interrupt(config);
clk_disable_unprepare(config->clk);
device_init_wakeup(&pdev->dev, 0);
return 0;
}
#ifdef CONFIG_PM_SLEEP
......@@ -477,7 +475,7 @@ MODULE_DEVICE_TABLE(of, spear_rtc_id_table);
static struct platform_driver spear_rtc_driver = {
.probe = spear_rtc_probe,
.remove = spear_rtc_remove,
.remove_new = spear_rtc_remove,
.shutdown = spear_rtc_shutdown,
.driver = {
.name = "rtc-spear",
......
......@@ -846,7 +846,7 @@ static int stm32_rtc_probe(struct platform_device *pdev)
return ret;
}
static int stm32_rtc_remove(struct platform_device *pdev)
static void stm32_rtc_remove(struct platform_device *pdev)
{
struct stm32_rtc *rtc = platform_get_drvdata(pdev);
const struct stm32_rtc_registers *regs = &rtc->data->regs;
......@@ -869,8 +869,6 @@ static int stm32_rtc_remove(struct platform_device *pdev)
dev_pm_clear_wake_irq(&pdev->dev);
device_init_wakeup(&pdev->dev, false);
return 0;
}
#ifdef CONFIG_PM_SLEEP
......@@ -917,7 +915,7 @@ static SIMPLE_DEV_PM_OPS(stm32_rtc_pm_ops,
static struct platform_driver stm32_rtc_driver = {
.probe = stm32_rtc_probe,
.remove = stm32_rtc_remove,
.remove_new = stm32_rtc_remove,
.driver = {
.name = DRIVER_NAME,
.pm = &stm32_rtc_pm_ops,
......
......@@ -232,17 +232,15 @@ static const struct rtc_class_ops stmp3xxx_rtc_ops = {
.set_alarm = stmp3xxx_rtc_set_alarm,
};
static int stmp3xxx_rtc_remove(struct platform_device *pdev)
static void stmp3xxx_rtc_remove(struct platform_device *pdev)
{
struct stmp3xxx_rtc_data *rtc_data = platform_get_drvdata(pdev);
if (!rtc_data)
return 0;
return;
writel(STMP3XXX_RTC_CTRL_ALARM_IRQ_EN,
rtc_data->io + STMP3XXX_RTC_CTRL + STMP_OFFSET_REG_CLR);
return 0;
}
static int stmp3xxx_rtc_probe(struct platform_device *pdev)
......@@ -406,7 +404,7 @@ MODULE_DEVICE_TABLE(of, rtc_dt_ids);
static struct platform_driver stmp3xxx_rtcdrv = {
.probe = stmp3xxx_rtc_probe,
.remove = stmp3xxx_rtc_remove,
.remove_new = stmp3xxx_rtc_remove,
.driver = {
.name = "stmp3xxx-rtc",
.pm = &stmp3xxx_rtc_pm_ops,
......
......@@ -260,7 +260,7 @@ static void __init sun6i_rtc_clk_init(struct device_node *node,
}
/* Switch to the external, more precise, oscillator, if present */
if (of_get_property(node, "clocks", NULL)) {
if (of_property_present(node, "clocks")) {
reg |= SUN6I_LOSC_CTRL_EXT_OSC;
if (rtc->data->has_losc_en)
reg |= SUN6I_LOSC_CTRL_EXT_LOSC_EN;
......
......@@ -235,8 +235,7 @@ static int sp_rtc_probe(struct platform_device *plat_dev)
if (!sp_rtc)
return -ENOMEM;
sp_rtc->res = platform_get_resource_byname(plat_dev, IORESOURCE_MEM, RTC_REG_NAME);
sp_rtc->reg_base = devm_ioremap_resource(&plat_dev->dev, sp_rtc->res);
sp_rtc->reg_base = devm_platform_ioremap_resource_byname(plat_dev, RTC_REG_NAME);
if (IS_ERR(sp_rtc->reg_base))
return dev_err_probe(&plat_dev->dev, PTR_ERR(sp_rtc->reg_base),
"%s devm_ioremap_resource fail\n", RTC_REG_NAME);
......@@ -304,15 +303,13 @@ static int sp_rtc_probe(struct platform_device *plat_dev)
return ret;
}
static int sp_rtc_remove(struct platform_device *plat_dev)
static void sp_rtc_remove(struct platform_device *plat_dev)
{
struct sunplus_rtc *sp_rtc = dev_get_drvdata(&plat_dev->dev);
device_init_wakeup(&plat_dev->dev, 0);
reset_control_assert(sp_rtc->rstc);
clk_disable_unprepare(sp_rtc->rtcclk);
return 0;
}
#ifdef CONFIG_PM_SLEEP
......@@ -347,7 +344,7 @@ static SIMPLE_DEV_PM_OPS(sp_rtc_pm_ops, sp_rtc_suspend, sp_rtc_resume);
static struct platform_driver sp_rtc_driver = {
.probe = sp_rtc_probe,
.remove = sp_rtc_remove,
.remove_new = sp_rtc_remove,
.driver = {
.name = "sp7021-rtc",
.of_match_table = sp_rtc_of_match,
......
......@@ -342,13 +342,11 @@ static int tegra_rtc_probe(struct platform_device *pdev)
return ret;
}
static int tegra_rtc_remove(struct platform_device *pdev)
static void tegra_rtc_remove(struct platform_device *pdev)
{
struct tegra_rtc_info *info = platform_get_drvdata(pdev);
clk_disable_unprepare(info->clk);
return 0;
}
#ifdef CONFIG_PM_SLEEP
......@@ -401,7 +399,7 @@ static void tegra_rtc_shutdown(struct platform_device *pdev)
static struct platform_driver tegra_rtc_driver = {
.probe = tegra_rtc_probe,
.remove = tegra_rtc_remove,
.remove_new = tegra_rtc_remove,
.shutdown = tegra_rtc_shutdown,
.driver = {
.name = "tegra_rtc",
......
......@@ -632,7 +632,8 @@ static int __maybe_unused ti_k3_rtc_suspend(struct device *dev)
struct ti_k3_rtc *priv = dev_get_drvdata(dev);
if (device_may_wakeup(dev))
enable_irq_wake(priv->irq);
return enable_irq_wake(priv->irq);
return 0;
}
......
......@@ -279,13 +279,12 @@ static int tps6586x_rtc_probe(struct platform_device *pdev)
return ret;
};
static int tps6586x_rtc_remove(struct platform_device *pdev)
static void tps6586x_rtc_remove(struct platform_device *pdev)
{
struct device *tps_dev = to_tps6586x_dev(&pdev->dev);
tps6586x_update(tps_dev, RTC_CTRL, 0,
RTC_ENABLE | OSC_SRC_SEL | PRE_BYPASS | CL_SEL_MASK);
return 0;
}
#ifdef CONFIG_PM_SLEEP
......@@ -317,7 +316,7 @@ static struct platform_driver tps6586x_rtc_driver = {
.pm = &tps6586x_pm_ops,
},
.probe = tps6586x_rtc_probe,
.remove = tps6586x_rtc_remove,
.remove_new = tps6586x_rtc_remove,
};
module_platform_driver(tps6586x_rtc_driver);
......
......@@ -586,7 +586,7 @@ static int twl_rtc_probe(struct platform_device *pdev)
* Disable all TWL RTC module interrupts.
* Sets status flag to free.
*/
static int twl_rtc_remove(struct platform_device *pdev)
static void twl_rtc_remove(struct platform_device *pdev)
{
struct twl_rtc *twl_rtc = platform_get_drvdata(pdev);
......@@ -599,8 +599,6 @@ static int twl_rtc_remove(struct platform_device *pdev)
twl6030_interrupt_mask(TWL6030_RTC_INT_MASK,
REG_INT_MSK_STS_A);
}
return 0;
}
static void twl_rtc_shutdown(struct platform_device *pdev)
......@@ -642,7 +640,7 @@ MODULE_DEVICE_TABLE(of, twl_rtc_of_match);
static struct platform_driver twl4030rtc_driver = {
.probe = twl_rtc_probe,
.remove = twl_rtc_remove,
.remove_new = twl_rtc_remove,
.shutdown = twl_rtc_shutdown,
.driver = {
.name = "twl_rtc",
......
......@@ -235,14 +235,12 @@ static int vt8500_rtc_probe(struct platform_device *pdev)
return devm_rtc_register_device(vt8500_rtc->rtc);
}
static int vt8500_rtc_remove(struct platform_device *pdev)
static void vt8500_rtc_remove(struct platform_device *pdev)
{
struct vt8500_rtc *vt8500_rtc = platform_get_drvdata(pdev);
/* Disable alarm matching */
writel(0, vt8500_rtc->regbase + VT8500_RTC_IS);
return 0;
}
static const struct of_device_id wmt_dt_ids[] = {
......@@ -253,7 +251,7 @@ MODULE_DEVICE_TABLE(of, wmt_dt_ids);
static struct platform_driver vt8500_rtc_driver = {
.probe = vt8500_rtc_probe,
.remove = vt8500_rtc_remove,
.remove_new = vt8500_rtc_remove,
.driver = {
.name = "vt8500-rtc",
.of_match_table = wmt_dt_ids,
......
......@@ -451,14 +451,12 @@ static int wm8350_rtc_probe(struct platform_device *pdev)
return 0;
}
static int wm8350_rtc_remove(struct platform_device *pdev)
static void wm8350_rtc_remove(struct platform_device *pdev)
{
struct wm8350 *wm8350 = platform_get_drvdata(pdev);
wm8350_free_irq(wm8350, WM8350_IRQ_RTC_SEC, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_RTC_ALM, wm8350);
return 0;
}
static SIMPLE_DEV_PM_OPS(wm8350_rtc_pm_ops, wm8350_rtc_suspend,
......@@ -466,7 +464,7 @@ static SIMPLE_DEV_PM_OPS(wm8350_rtc_pm_ops, wm8350_rtc_suspend,
static struct platform_driver wm8350_rtc_driver = {
.probe = wm8350_rtc_probe,
.remove = wm8350_rtc_remove,
.remove_new = wm8350_rtc_remove,
.driver = {
.name = "wm8350-rtc",
.pm = &wm8350_rtc_pm_ops,
......
......@@ -192,14 +192,13 @@ static int xgene_rtc_probe(struct platform_device *pdev)
return 0;
}
static int xgene_rtc_remove(struct platform_device *pdev)
static void xgene_rtc_remove(struct platform_device *pdev)
{
struct xgene_rtc_dev *pdata = platform_get_drvdata(pdev);
xgene_rtc_alarm_irq_enable(&pdev->dev, 0);
device_init_wakeup(&pdev->dev, 0);
clk_disable_unprepare(pdata->clk);
return 0;
}
static int __maybe_unused xgene_rtc_suspend(struct device *dev)
......@@ -264,7 +263,7 @@ MODULE_DEVICE_TABLE(of, xgene_rtc_of_match);
static struct platform_driver xgene_rtc_driver = {
.probe = xgene_rtc_probe,
.remove = xgene_rtc_remove,
.remove_new = xgene_rtc_remove,
.driver = {
.name = "xgene-rtc",
.pm = &xgene_rtc_pm_ops,
......
......@@ -342,12 +342,10 @@ static int xlnx_rtc_probe(struct platform_device *pdev)
return devm_rtc_register_device(xrtcdev->rtc);
}
static int xlnx_rtc_remove(struct platform_device *pdev)
static void xlnx_rtc_remove(struct platform_device *pdev)
{
xlnx_rtc_alarm_irq_enable(&pdev->dev, 0);
device_init_wakeup(&pdev->dev, 0);
return 0;
}
static int __maybe_unused xlnx_rtc_suspend(struct device *dev)
......@@ -384,7 +382,7 @@ MODULE_DEVICE_TABLE(of, xlnx_rtc_of_match);
static struct platform_driver xlnx_rtc_driver = {
.probe = xlnx_rtc_probe,
.remove = xlnx_rtc_remove,
.remove_new = xlnx_rtc_remove,
.driver = {
.name = KBUILD_MODNAME,
.pm = &xlnx_rtc_pm_ops,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment