Skip to content

Commit

Permalink
Merge tag 'rtc-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/…
Browse files Browse the repository at this point in the history
…abelloni/linux

Pull RTC updates from Alexandre Belloni:
 "Subsystem wide cleanups:
   - Use IS_ENABLED() instead of checking for built-in or module
   - remove useless DRV_VERSION
   - remove CLK_IS_ROOT
   - remove UIE signaling

  Drivers:
   - ds1302: rewritten to be a proper SPI device driver
   - m41t80: huge cleanup, alarm, wakelarm ans oscialltor failure
     detection support
   - rv3029: switch to regmap to handle rv3049, alarm support, fixes
   - zynqmp: enable switching to battery power, fixes
   - small fixes for at91sam9, da9053, ds1307, ds1685, ds3232, r2025,
     sa1100, snvs, stmp3xxx, tps6586x"

* tag 'rtc-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (40 commits)
  rtc: tps6586x: rename so module can be autoloaded
  rtc: rv3029: hide unused i2c device table
  rtc: rs5c372: r2025: fix check for 'oscillator halted' condition
  rtc: rv3029: add alarm IRQ
  rtc: rv3029: fix set_time function
  rtc: rv3029: fix alarm support
  rtc: rv3029: Remove some checks and warnings
  rtc: rv3029: Add support of RV3049
  rtc: rv3029: convert to use regmap
  rtc: rv3029: remove 'i2c' in functions names
  rtc: stmp3xxx: print message on error
  rtc: Use IS_ENABLED() instead of checking for built-in or module
  rtc: ds3232: fix call trace when rtc->ops_lock is used as NULL
  rtc: snvs: return error in case enable_irq_wake fails
  rtc: zynqmp: Update seconds time programming logic
  rtc: sa1100: DT spelling s/interrupt-name/interrupt-names/
  rtc: mc13xxx: remove UIE signaling
  rtc: mxc: remove UIE signaling
  rtc: ds1307: Remove CLK_IS_ROOT
  rtc: hym8563: Remove CLK_IS_ROOT
  ...
  • Loading branch information
torvalds committed May 21, 2016
2 parents 10cd715 + b9ba1eb commit 63d222b
Show file tree
Hide file tree
Showing 43 changed files with 1,019 additions and 735 deletions.
46 changes: 46 additions & 0 deletions Documentation/devicetree/bindings/rtc/maxim-ds1302.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
* Maxim/Dallas Semiconductor DS-1302 RTC

Simple device which could be used to store date/time between reboots.

The device uses the standard MicroWire half-duplex transfer timing.
Master output is set on low clock and sensed by the RTC on the rising
edge. Master input is set by the RTC on the trailing edge and is sensed
by the master on low clock.

Required properties:

- compatible : Should be "maxim,ds1302"

Required SPI properties:

- reg : Should be address of the device chip select within
the controller.

- spi-max-frequency : DS-1302 has 500 kHz if powered at 2.2V,
and 2MHz if powered at 5V.

- spi-3wire : The device has a shared signal IN/OUT line.

- spi-lsb-first : DS-1302 requires least significant bit first
transfers.

- spi-cs-high: DS-1302 has active high chip select line. This is
required unless inverted in hardware.

Example:

spi@901c {
#address-cells = <1>;
#size-cells = <0>;
compatible = "icpdas,lp8841-spi-rtc";
reg = <0x901c 0x1>;

rtc@0 {
compatible = "maxim,ds1302";
reg = <0>;
spi-max-frequency = <500000>;
spi-3wire;
spi-lsb-first;
spi-cs-high;
};
};
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/rtc/sa1100-rtc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ Example:
compatible = "mrvl,mmp-rtc";
reg = <0xd4010000 0x1000>;
interrupts = <5>, <6>;
interrupt-name = "rtc 1Hz", "rtc alarm";
interrupt-names = "rtc 1Hz", "rtc alarm";
};
52 changes: 28 additions & 24 deletions drivers/rtc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -573,24 +573,6 @@ config RTC_DRV_EM3027
This driver can also be built as a module. If so, the module
will be called rtc-em3027.

config RTC_DRV_RV3029C2
tristate "Micro Crystal RV3029"
help
If you say yes here you get support for the Micro Crystal
RV3029 RTC chips.

This driver can also be built as a module. If so, the module
will be called rtc-rv3029c2.

config RTC_DRV_RV3029_HWMON
bool "HWMON support for RV3029"
depends on RTC_DRV_RV3029C2 && HWMON
depends on !(RTC_DRV_RV3029C2=y && HWMON=m)
default y
help
Say Y here if you want to expose temperature sensor data on
rtc-rv3029.

config RTC_DRV_RV8803
tristate "Micro Crystal RV8803"
help
Expand Down Expand Up @@ -634,6 +616,15 @@ config RTC_DRV_M41T94
This driver can also be built as a module. If so, the module
will be called rtc-m41t94.

config RTC_DRV_DS1302
tristate "Dallas/Maxim DS1302"
depends on SPI
help
If you say yes here you get support for the Dallas DS1302 RTC chips.

This driver can also be built as a module. If so, the module
will be called rtc-ds1302.

config RTC_DRV_DS1305
tristate "Dallas/Maxim DS1305/DS1306"
help
Expand Down Expand Up @@ -777,6 +768,25 @@ config RTC_DRV_PCF2127
This driver can also be built as a module. If so, the module
will be called rtc-pcf2127.

config RTC_DRV_RV3029C2
tristate "Micro Crystal RV3029/3049"
depends on RTC_I2C_AND_SPI
help
If you say yes here you get support for the Micro Crystal
RV3029 and RV3049 RTC chips.

This driver can also be built as a module. If so, the module
will be called rtc-rv3029c2.

config RTC_DRV_RV3029_HWMON
bool "HWMON support for RV3029/3049"
depends on RTC_DRV_RV3029C2 && HWMON
depends on !(RTC_DRV_RV3029C2=y && HWMON=m)
default y
help
Say Y here if you want to expose temperature sensor data on
rtc-rv3029.

comment "Platform RTC drivers"

# this 'CMOS' RTC driver is arch dependent because <asm-generic/rtc.h>
Expand Down Expand Up @@ -834,12 +844,6 @@ config RTC_DRV_DS1286
help
If you say yes here you get support for the Dallas DS1286 RTC chips.

config RTC_DRV_DS1302
tristate "Dallas DS1302"
depends on SH_SECUREEDGE5410
help
If you say yes here you get support for the Dallas DS1302 RTC chips.

config RTC_DRV_DS1511
tristate "Dallas DS1511"
depends on HAS_IOMEM
Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-at91sam9.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static int at91_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
static int at91_rtc_proc(struct device *dev, struct seq_file *seq)
{
struct sam9_rtc *rtc = dev_get_drvdata(dev);
u32 mr = mr = rtt_readl(rtc, MR);
u32 mr = rtt_readl(rtc, MR);

seq_printf(seq, "update_IRQ\t: %s\n",
(mr & AT91_RTT_RTTINCIEN) ? "yes" : "no");
Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-cmos.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled)
return 0;
}

#if defined(CONFIG_RTC_INTF_PROC) || defined(CONFIG_RTC_INTF_PROC_MODULE)
#if IS_ENABLED(CONFIG_RTC_INTF_PROC)

static int cmos_procfs(struct device *dev, struct seq_file *seq)
{
Expand Down
13 changes: 8 additions & 5 deletions drivers/rtc/rtc-da9052.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,18 +302,21 @@ static int da9052_rtc_probe(struct platform_device *pdev)
if (ret != 0)
rtc_err(rtc, "Failed to disable TICKS: %d\n", ret);

device_init_wakeup(&pdev->dev, true);
rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
&da9052_rtc_ops, THIS_MODULE);

if (IS_ERR(rtc->rtc))
return PTR_ERR(rtc->rtc);

ret = da9052_request_irq(rtc->da9052, DA9052_IRQ_ALARM, "ALM",
da9052_rtc_irq, rtc);
if (ret != 0) {
rtc_err(rtc, "irq registration failed: %d\n", ret);
return ret;
}

device_init_wakeup(&pdev->dev, true);

rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
&da9052_rtc_ops, THIS_MODULE);
return PTR_ERR_OR_ZERO(rtc->rtc);
return 0;
}

static struct platform_driver da9052_rtc_driver = {
Expand Down
3 changes: 0 additions & 3 deletions drivers/rtc/rtc-ds1216.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#include <linux/bcd.h>
#include <linux/slab.h>

#define DRV_VERSION "0.2"

struct ds1216_regs {
u8 tsec;
u8 sec;
Expand Down Expand Up @@ -176,5 +174,4 @@ module_platform_driver_probe(ds1216_rtc_platform_driver, ds1216_rtc_probe);
MODULE_AUTHOR("Thomas Bogendoerfer <[email protected]>");
MODULE_DESCRIPTION("DS1216 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
MODULE_ALIAS("platform:rtc-ds1216");
3 changes: 0 additions & 3 deletions drivers/rtc/rtc-ds1286.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#include <linux/io.h>
#include <linux/slab.h>

#define DRV_VERSION "1.0"

struct ds1286_priv {
struct rtc_device *rtc;
u32 __iomem *rtcregs;
Expand Down Expand Up @@ -363,5 +361,4 @@ module_platform_driver(ds1286_platform_driver);
MODULE_AUTHOR("Thomas Bogendoerfer <[email protected]>");
MODULE_DESCRIPTION("DS1286 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
MODULE_ALIAS("platform:rtc-ds1286");
Loading

0 comments on commit 63d222b

Please sign in to comment.