RTC for 4.8

Cleanups:
  - huge cleanup of rtc-generic and char/genrtc this allowed to cleanup rtc-cmos,
   rtc-sh, rtc-m68k, rtc-powerpc and rtc-parisc
  - move mn10300 to rtc-cmos
 
 Subsystem:
  - fix wakealarms after hibernate
  - multiples fixes for rctest
  - simplify implementations of .read_alarm
 
 New drivers:
  - Maxim MAX6916
 
 Drivers:
  - ds1307: fix weekday
  - m41t80: add wakeup support
  - pcf85063: add support for PCF85063A variant
  - rv8803: extend i2c fix and other fixes
  - s35390a: fix alarm reading, this fixes instant reboot after shutdown for QNAP
    TS-41x
  - s3c: clock fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCgAGBQJXokhIAAoJENiigzvaE+LCZqQP+wWzintN/N1u3dKiVB7iSdwq
 +S/jAXD9wW8OK9PI60/YUGRYeUXmZW9t4XYg1VKCxU9KpVC17LgOtDyXD8BufP1V
 uREJEzZw9O7zCCjeHp/ICFjBkc62Net6ZDOO+ZyXPNfddpS1Xq1uUgXLZc/202UR
 ID/kewu0pJRDnoxyqznWn9+8D33w/ygXs2slY2Ive0ONtjdgxGcsj2rNbb2RYn2z
 OP7br3lLg7qkFh4TtXb61eh/9GYIk6wzP/CrX5l/jH4SjQnrIk5g/X/Cd1qQ/qso
 JZzFoonOKvIp5Gw/+fZ9NP3YFcnkoRMv4NjZV8PAmsYLds+ibRiBcoB8u6FmiJV7
 WW5uopgPkfCGN5BV3+QHwJDVe+WlgnlzaT5zPUCcP5KWusDts4fWIgzP7vrtAzf4
 3OJLrgSGdBeOqWnJD21nxKUD27JOseX7D+BFtwxR4lMsXHqlHJfETpZ8gts1ZGH3
 2U353j/jkZvGWmc6dMcuxOXT2K4VqpYeIIqs0IcLu6hM9crtR89zPR2Iu1AilfDW
 h2NroF+Q//SgMMzWoTEG6Tn7RAc7MthgA/tRCFZF9CBMzNs988w0CTHnKsIHmjpU
 UKkMeJGAC9YrPYIcqrg0oYsmLUWXc8JuZbGJBnei3BzbaMTlcwIN9qj36zfq6xWc
 TMLpbWEoIsgFIZMP/hAP
 =rpGB
 -----END PGP SIGNATURE-----

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

Pull RTC updates from Alexandre Belloni:
 "RTC for 4.8

  Cleanups:
   - huge cleanup of rtc-generic and char/genrtc this allowed to cleanup
     rtc-cmos, rtc-sh, rtc-m68k, rtc-powerpc and rtc-parisc
   - move mn10300 to rtc-cmos

  Subsystem:
   - fix wakealarms after hibernate
   - multiples fixes for rctest
   - simplify implementations of .read_alarm

  New drivers:
   - Maxim MAX6916

  Drivers:
   - ds1307: fix weekday
   - m41t80: add wakeup support
   - pcf85063: add support for PCF85063A variant
   - rv8803: extend i2c fix and other fixes
   - s35390a: fix alarm reading, this fixes instant reboot after
     shutdown for QNAP TS-41x
   - s3c: clock fixes"

* tag 'rtc-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (65 commits)
  rtc: rv8803: Clear V1F when setting the time
  rtc: rv8803: Stop the clock while setting the time
  rtc: rv8803: Always apply the I²C workaround
  rtc: rv8803: Fix read day of week
  rtc: rv8803: Remove the check for valid time
  rtc: rv8803: Kconfig: Indicate rx8900 support
  rtc: asm9260: remove .owner field for driver
  rtc: at91sam9: Fix missing spin_lock_init()
  rtc: m41t80: add suspend handlers for alarm IRQ
  rtc: m41t80: make it a real error message
  rtc: pcf85063: Add support for the PCF85063A device
  rtc: pcf85063: fix year range
  rtc: hym8563: in .read_alarm set .tm_sec to 0 to signal minute accuracy
  rtc: explicitly set tm_sec = 0 for drivers with minute accurancy
  rtc: s3c: Add s3c_rtc_{enable/disable}_clk in s3c_rtc_setfreq()
  rtc: s3c: Remove unnecessary call to disable already disabled clock
  rtc: abx80x: use devm_add_action_or_reset()
  rtc: m41t80: use devm_add_action_or_reset()
  rtc: fix a typo and reduce three empty lines to one
  rtc: s35390a: improve two comments in .set_alarm
  ...
This commit is contained in:
Linus Torvalds 2016-08-05 09:48:22 -04:00
commit 6c84239d59
105 changed files with 848 additions and 1580 deletions

View file

@ -1,66 +0,0 @@
/*
* ds17287rtc.h - register definitions for the ds1728[57] RTC / CMOS RAM
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* (C) 2003 Guido Guenther <agx@sigxcpu.org>
*/
#ifndef __LINUX_DS17287RTC_H
#define __LINUX_DS17287RTC_H
#include <linux/rtc.h> /* get the user-level API */
#include <linux/mc146818rtc.h>
/* Register A */
#define DS_REGA_DV2 0x40 /* countdown chain */
#define DS_REGA_DV1 0x20 /* oscillator enable */
#define DS_REGA_DV0 0x10 /* bank select */
/* bank 1 registers */
#define DS_B1_MODEL 0x40 /* model number byte */
#define DS_B1_SN1 0x41 /* serial number byte 1 */
#define DS_B1_SN2 0x42 /* serial number byte 2 */
#define DS_B1_SN3 0x43 /* serial number byte 3 */
#define DS_B1_SN4 0x44 /* serial number byte 4 */
#define DS_B1_SN5 0x45 /* serial number byte 5 */
#define DS_B1_SN6 0x46 /* serial number byte 6 */
#define DS_B1_CRC 0x47 /* CRC byte */
#define DS_B1_CENTURY 0x48 /* Century byte */
#define DS_B1_DALARM 0x49 /* date alarm */
#define DS_B1_XCTRL4A 0x4a /* extendec control register 4a */
#define DS_B1_XCTRL4B 0x4b /* extendec control register 4b */
#define DS_B1_RTCADDR2 0x4e /* rtc address 2 */
#define DS_B1_RTCADDR3 0x4f /* rtc address 3 */
#define DS_B1_RAMLSB 0x50 /* extended ram LSB */
#define DS_B1_RAMMSB 0x51 /* extended ram MSB */
#define DS_B1_RAMDPORT 0x53 /* extended ram data port */
/* register details */
/* extended control register 4a */
#define DS_XCTRL4A_VRT2 0x80 /* valid ram and time */
#define DS_XCTRL4A_INCR 0x40 /* increment progress status */
#define DS_XCTRL4A_BME 0x20 /* burst mode enable */
#define DS_XCTRL4A_PAB 0x08 /* power active bar ctrl */
#define DS_XCTRL4A_RF 0x04 /* ram clear flag */
#define DS_XCTRL4A_WF 0x02 /* wake up alarm flag */
#define DS_XCTRL4A_KF 0x01 /* kickstart flag */
/* interrupt causes */
#define DS_XCTRL4A_IFS (DS_XCTRL4A_RF|DS_XCTRL4A_WF|DS_XCTRL4A_KF)
/* extended control register 4b */
#define DS_XCTRL4B_ABE 0x80 /* auxiliary battery enable */
#define DS_XCTRL4B_E32K 0x40 /* enable 32.768 kHz Output */
#define DS_XCTRL4B_CS 0x20 /* crystal select */
#define DS_XCTRL4B_RCE 0x10 /* ram clear enable */
#define DS_XCTRL4B_PRS 0x08 /* PAB resec select */
#define DS_XCTRL4B_RIE 0x04 /* ram clear interrupt enable */
#define DS_XCTRL4B_WFE 0x02 /* wake up alarm interrupt enable */
#define DS_XCTRL4B_KFE 0x01 /* kickstart interrupt enable */
/* interrupt enable bits */
#define DS_XCTRL4B_IFES (DS_XCTRL4B_RIE|DS_XCTRL4B_WFE|DS_XCTRL4B_KFE)
#endif /* __LINUX_DS17287RTC_H */

View file

@ -14,6 +14,8 @@
#include <asm/io.h>
#include <linux/rtc.h> /* get the user-level API */
#include <asm/mc146818rtc.h> /* register access macros */
#include <linux/bcd.h>
#include <linux/delay.h>
#ifdef __KERNEL__
#include <linux/spinlock.h> /* spinlock_t */
@ -120,4 +122,7 @@ struct cmos_rtc_board_info {
#define RTC_IO_EXTENT_USED RTC_IO_EXTENT
#endif /* ARCH_RTC_LOCATION */
unsigned int mc146818_get_time(struct rtc_time *time);
int mc146818_set_time(struct rtc_time *time);
#endif /* _MC146818RTC_H */