Skip to content

Commit

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

Pull RTC updates from Alexandre Belloni:
 "Core:
   - Coding style and whitespace fixes (interface, Makefile and Kconfig)
   - New rtc_tm_sub() helper
   - New CONFIG_RTC_SYSTOHC_DEVICE option
   - Removed rtc_set_mmss()

  New drivers:
   - Mediatek MT6397
   - Cortina Gemini

  Drivers:
   - Year 2106 fixes for isl1208, pcf8563 and sunxi
   - update author email for at32ap700x and efi
   - ds1307: alarm fix
   - efi: use correct EFI 'epoch'
   - hym8563: make irq optional
   - imxdi: cleanups and better handling of the security/tamper monitoring
   - snvs: fix wakealarm
   - Compilation fixes or warning removal for gemini, mt6397, palmas, pfc8563
   - Trivial cleanups for ab8500, ds1216, ds1286, ds1672, ep93xx,
     hid-sensor-time, max6900, max8998, max77686, max77802, mc13xxx, mv,
     mxc, s3c, spear, v3020
   - Kconfig fixes for stmp3xxx and xgene"

* tag 'rtc-v4.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (48 commits)
  rtc: remove useless I2C dependencies
  rtc: whitespace fixes
  rtc: Properly sort Makefile
  MAINTAINERS: Add RTC subsystem repository
  rtc: pfc8563: fix uninitialized variable warning
  rtc: ds1307: Enable the mcp794xx alarm after programming time
  rtc: hym8563: make the irq optional
  rtc: gemini: fix cocci warnings
  rtc: mv: correct 24 hour error message
  rtc: mv: use BIT()
  rtc: efi: use correct EFI 'epoch'
  rtc: interface: Remove rtc_set_mmss()
  sparc: time: Replace update_persistent_clock() with CONFIG_RTC_SYSTOHC
  rtc: NTP: Add CONFIG_RTC_SYSTOHC_DEVICE for NTP synchronization
  rtc: sunxi: Replace deprecated rtc_tm_to_time()
  rtc: isl1208: Replace deprecated rtc_tm_to_time()
  rtc: Introduce rtc_tm_sub() helper function
  rtc: pcf8563: Replace deprecated rtc_time_to_tm() and rtc_tm_to_time()
  rtc: palmas: Initialise bb_charging flag before using it
  rtc: simplify use of devm_ioremap_resource
  ...
  • Loading branch information
torvalds committed Jun 26, 2015
2 parents 2486748 + 3783055 commit c13c810
Show file tree
Hide file tree
Showing 39 changed files with 1,197 additions and 367 deletions.
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ as well as a clock output of up to 32kHz.
Required properties:
- compatible: should be: "haoyu,hym8563"
- reg: i2c address
- interrupts: rtc alarm/event interrupt
- #clock-cells: the value should be 0

Optional properties:
- clock-output-names: From common clock binding
- interrupts: rtc alarm/event interrupt

Example:

Expand Down
9 changes: 9 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,7 @@ L: [email protected] (moderated for non-subscribers)
T: git git://github.com/ulli-kroll/linux.git
S: Maintained
F: arch/arm/mach-gemini/
F: drivers/rtc/rtc-gemini.c

ARM/CSR SIRFPRIMA2 MACHINE SUPPORT
M: Barry Song <[email protected]>
Expand Down Expand Up @@ -1243,6 +1244,13 @@ W: http://www.digriz.org.uk/ts78xx/kernel
S: Maintained
F: arch/arm/mach-orion5x/ts78xx-*

ARM/Mediatek RTC DRIVER
M: Eddie Huang <[email protected]>
L: [email protected] (moderated for non-subscribers)
L: [email protected] (moderated for non-subscribers)
S: Maintained
F: drivers/rtc/rtc-mt6397.c

ARM/Mediatek SoC support
M: Matthias Brugger <[email protected]>
L: [email protected] (moderated for non-subscribers)
Expand Down Expand Up @@ -8380,6 +8388,7 @@ M: Alessandro Zummo <[email protected]>
M: Alexandre Belloni <[email protected]>
L: [email protected]
Q: http://patchwork.ozlabs.org/project/rtc-linux/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git
S: Maintained
F: Documentation/rtc.txt
F: drivers/rtc/
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ config SPARC
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
select RTC_CLASS
select RTC_DRV_M48T59
select RTC_SYSTOHC
select HAVE_DMA_ATTRS
select HAVE_DMA_API_DEBUG
select HAVE_ARCH_JUMP_LABEL if SPARC64
Expand All @@ -35,7 +36,6 @@ config SPARC
select HAVE_BPF_JIT
select HAVE_DEBUG_BUGVERBOSE
select GENERIC_SMP_IDLE_THREAD
select GENERIC_CMOS_UPDATE
select GENERIC_CLOCKEVENTS
select GENERIC_STRNCPY_FROM_USER
select GENERIC_STRNLEN_USER
Expand Down
21 changes: 0 additions & 21 deletions arch/sparc/kernel/time_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/time.h>
#include <linux/rtc.h>
#include <linux/rtc/m48t59.h>
#include <linux/timex.h>
#include <linux/clocksource.h>
Expand Down Expand Up @@ -65,8 +64,6 @@ DEFINE_PER_CPU(struct clock_event_device, sparc32_clockevent);
DEFINE_SPINLOCK(rtc_lock);
EXPORT_SYMBOL(rtc_lock);

static int set_rtc_mmss(unsigned long);

unsigned long profile_pc(struct pt_regs *regs)
{
extern char __copy_user_begin[], __copy_user_end[];
Expand All @@ -87,11 +84,6 @@ EXPORT_SYMBOL(profile_pc);

volatile u32 __iomem *master_l10_counter;

int update_persistent_clock(struct timespec now)
{
return set_rtc_mmss(now.tv_sec);
}

irqreturn_t notrace timer_interrupt(int dummy, void *dev_id)
{
if (timer_cs_enabled) {
Expand Down Expand Up @@ -362,16 +354,3 @@ void __init time_init(void)
sbus_time_init();
}


static int set_rtc_mmss(unsigned long secs)
{
struct rtc_device *rtc = rtc_class_open("rtc0");
int err = -1;

if (rtc) {
err = rtc_set_mmss(rtc, secs);
rtc_class_close(rtc);
}

return err;
}
14 changes: 0 additions & 14 deletions arch/sparc/kernel/time_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <linux/cpufreq.h>
#include <linux/percpu.h>
#include <linux/miscdevice.h>
#include <linux/rtc.h>
#include <linux/rtc/m48t59.h>
#include <linux/kernel_stat.h>
#include <linux/clockchips.h>
Expand Down Expand Up @@ -394,19 +393,6 @@ static struct sparc64_tick_ops hbtick_operations __read_mostly = {

static unsigned long timer_ticks_per_nsec_quotient __read_mostly;

int update_persistent_clock(struct timespec now)
{
struct rtc_device *rtc = rtc_class_open("rtc0");
int err = -1;

if (rtc) {
err = rtc_set_mmss(rtc, now.tv_sec);
rtc_class_close(rtc);
}

return err;
}

unsigned long cmos_regs;
EXPORT_SYMBOL(cmos_regs);

Expand Down
18 changes: 18 additions & 0 deletions drivers/mfd/mt6397-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,27 @@
#include <linux/mfd/mt6397/core.h>
#include <linux/mfd/mt6397/registers.h>

#define MT6397_RTC_BASE 0xe000
#define MT6397_RTC_SIZE 0x3e

static const struct resource mt6397_rtc_resources[] = {
{
.start = MT6397_RTC_BASE,
.end = MT6397_RTC_BASE + MT6397_RTC_SIZE,
.flags = IORESOURCE_MEM,
},
{
.start = MT6397_IRQ_RTC,
.end = MT6397_IRQ_RTC,
.flags = IORESOURCE_IRQ,
},
};

static const struct mfd_cell mt6397_devs[] = {
{
.name = "mt6397-rtc",
.num_resources = ARRAY_SIZE(mt6397_rtc_resources),
.resources = mt6397_rtc_resources,
.of_compatible = "mediatek,mt6397-rtc",
}, {
.name = "mt6397-regulator",
Expand Down
104 changes: 67 additions & 37 deletions drivers/rtc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ menuconfig RTC_CLASS
select RTC_LIB
help
Generic RTC class support. If you say yes here, you will
be allowed to plug one or more RTCs to your system. You will
be allowed to plug one or more RTCs to your system. You will
probably want to enable one or more of the interfaces below.

if RTC_CLASS
Expand All @@ -25,17 +25,9 @@ config RTC_HCTOSYS
the value read from a specified RTC device. This is useful to avoid
unnecessary fsck runs at boot time, and to network better.

config RTC_SYSTOHC
bool "Set the RTC time based on NTP synchronization"
default y
help
If you say yes here, the system time (wall clock) will be stored
in the RTC specified by RTC_HCTOSYS_DEVICE approximately every 11
minutes if userspace reports synchronized NTP status.

config RTC_HCTOSYS_DEVICE
string "RTC used to set the system time"
depends on RTC_HCTOSYS = y || RTC_SYSTOHC = y
depends on RTC_HCTOSYS
default "rtc0"
help
The RTC device that will be used to (re)initialize the system
Expand All @@ -56,6 +48,25 @@ config RTC_HCTOSYS_DEVICE
sleep states. Do not specify an RTC here unless it stays powered
during all this system's supported sleep states.

config RTC_SYSTOHC
bool "Set the RTC time based on NTP synchronization"
default y
help
If you say yes here, the system time (wall clock) will be stored
in the RTC specified by RTC_HCTOSYS_DEVICE approximately every 11
minutes if userspace reports synchronized NTP status.

config RTC_SYSTOHC_DEVICE
string "RTC used to synchronize NTP adjustment"
depends on RTC_SYSTOHC
default RTC_HCTOSYS_DEVICE if RTC_HCTOSYS
default "rtc0"
help
The RTC device used for NTP synchronization. The main difference
between RTC_HCTOSYS_DEVICE and RTC_SYSTOHC_DEVICE is that this
one can sleep when setting time, because it runs in the workqueue
context.

config RTC_DEBUG
bool "RTC debug support"
help
Expand Down Expand Up @@ -135,7 +146,7 @@ if I2C

config RTC_DRV_88PM860X
tristate "Marvell 88PM860x"
depends on I2C && MFD_88PM860X
depends on MFD_88PM860X
help
If you say yes here you get support for RTC function in Marvell
88PM860x chips.
Expand All @@ -145,7 +156,7 @@ config RTC_DRV_88PM860X

config RTC_DRV_88PM80X
tristate "Marvell 88PM80x"
depends on I2C && MFD_88PM800
depends on MFD_88PM800
help
If you say yes here you get support for RTC function in Marvell
88PM80x chips.
Expand All @@ -154,10 +165,9 @@ config RTC_DRV_88PM80X
will be called rtc-88pm80x.

config RTC_DRV_ABB5ZES3
depends on I2C
select REGMAP_I2C
tristate "Abracon AB-RTCMC-32.768kHz-B5ZE-S3"
help
select REGMAP_I2C
tristate "Abracon AB-RTCMC-32.768kHz-B5ZE-S3"
help
If you say yes here you get support for the Abracon
AB-RTCMC-32.768kHz-B5ZE-S3 I2C RTC chip.

Expand Down Expand Up @@ -204,7 +214,6 @@ config RTC_DRV_DS1307

config RTC_DRV_DS1374
tristate "Dallas/Maxim DS1374"
depends on I2C
help
If you say yes here you get support for Dallas Semiconductor
DS1374 real-time clock chips. If an interrupt is associated
Expand Down Expand Up @@ -232,7 +241,6 @@ config RTC_DRV_DS1672

config RTC_DRV_DS3232
tristate "Dallas/Maxim DS3232"
depends on I2C
help
If you say yes here you get support for Dallas Semiconductor
DS3232 real-time clock chips. If an interrupt is associated
Expand All @@ -243,7 +251,7 @@ config RTC_DRV_DS3232

config RTC_DRV_HYM8563
tristate "Haoyu Microelectronics HYM8563"
depends on I2C && OF
depends on OF
help
Say Y to enable support for the HYM8563 I2C RTC chip. Apart
from the usual rtc functions it provides a clock output of
Expand Down Expand Up @@ -365,10 +373,9 @@ config RTC_DRV_ISL12022
will be called rtc-isl12022.

config RTC_DRV_ISL12057
depends on I2C
select REGMAP_I2C
tristate "Intersil ISL12057"
help
select REGMAP_I2C
tristate "Intersil ISL12057"
help
If you say yes here you get support for the Intersil ISL12057
I2C RTC chip.

Expand Down Expand Up @@ -603,13 +610,13 @@ comment "SPI RTC drivers"
if SPI_MASTER

config RTC_DRV_M41T93
tristate "ST M41T93"
help
If you say yes here you will get support for the
ST M41T93 SPI RTC chip.
tristate "ST M41T93"
help
If you say yes here you will get support for the
ST M41T93 SPI RTC chip.

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

config RTC_DRV_M41T94
tristate "ST M41T94"
Expand Down Expand Up @@ -1200,7 +1207,7 @@ config RTC_DRV_SH
Say Y here to enable support for the on-chip RTC found in
most SuperH processors.

To compile this driver as a module, choose M here: the
To compile this driver as a module, choose M here: the
module will be called rtc-sh.

config RTC_DRV_VR41XX
Expand Down Expand Up @@ -1299,14 +1306,14 @@ config RTC_DRV_GENERIC
just say Y.

config RTC_DRV_PXA
tristate "PXA27x/PXA3xx"
depends on ARCH_PXA
help
If you say Y here you will get access to the real time clock
built into your PXA27x or PXA3xx CPU.
tristate "PXA27x/PXA3xx"
depends on ARCH_PXA
help
If you say Y here you will get access to the real time clock
built into your PXA27x or PXA3xx CPU.

This RTC driver uses PXA RTC registers available since pxa27x
series (RDxR, RYxR) instead of legacy RCNR, RTAR.
This RTC driver uses PXA RTC registers available since pxa27x
series (RDxR, RYxR) instead of legacy RCNR, RTAR.

config RTC_DRV_VT8500
tristate "VIA/WonderMedia 85xx SoC RTC"
Expand Down Expand Up @@ -1372,6 +1379,17 @@ config RTC_DRV_ARMADA38X
This driver can also be built as a module. If so, the module
will be called armada38x-rtc.

config RTC_DRV_GEMINI
tristate "Gemini SoC RTC"
depends on ARCH_GEMINI || COMPILE_TEST
depends on HAS_IOMEM
help
If you say Y here you will get support for the
RTC found on Gemini SoC's.

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

config RTC_DRV_PS3
tristate "PS3 RTC"
depends on PPC_PS3
Expand All @@ -1396,6 +1414,7 @@ config RTC_DRV_COH901331
config RTC_DRV_STMP
tristate "Freescale STMP3xxx/i.MX23/i.MX28 RTC"
depends on ARCH_MXS
select STMP_DEVICE
help
If you say yes here you will get support for the onboard
STMP3xxx/i.MX23/i.MX28 RTC.
Expand Down Expand Up @@ -1541,9 +1560,20 @@ config RTC_DRV_MOXART
This driver can also be built as a module. If so, the module
will be called rtc-moxart

config RTC_DRV_MT6397
tristate "Mediatek Real Time Clock driver"
depends on MFD_MT6397 || COMPILE_TEST
help
This selects the Mediatek(R) RTC driver. RTC is part of Mediatek
MT6397 PMIC. You should enable MT6397 PMIC MFD before select
Mediatek(R) RTC driver.

If you want to use Mediatek(R) RTC interface, select Y or M here.

config RTC_DRV_XGENE
tristate "APM X-Gene RTC"
depends on HAS_IOMEM
depends on ARCH_XGENE || COMPILE_TEST
help
If you say yes here you get support for the APM X-Gene SoC real time
clock.
Expand Down
Loading

0 comments on commit c13c810

Please sign in to comment.