Commit c7b7eefa authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull RTC updates from Alexandre Belloni:
 "This cycle, there were mostly non urgent fixes in drivers. I also
  finally unexported the non managed registration.

  Subsystem:

   - non devm managed registration is now removed from the driver API

   - all the unnecessary rtc_valid_tm() calls have been removed

  Drivers:

   - abx80X: watchdog support

   - cmos: fix non ACPI support

   - sc27xx: fix alarm support

   - Remove a possible sysfs race condition for ab8500, ds1307, ds1685,
     isl1208

   - Fix a possible race condition where an irq handler may be called
     before the rtc_device struct is allocated for mt6397, pl030,
     menelaus, armada38x"

* tag 'rtc-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (54 commits)
  rtc: sc27xx: Always read normal alarm when registering RTC device
  rtc: sc27xx: Add check to see if need to enable the alarm interrupt
  rtc: sc27xx: Remove interrupts disable and clear in probe()
  rtc: sc27xx: Clear SPG value update interrupt status
  rtc: sc27xx: Set wakeup capability before registering rtc device
  rtc: s35390a: Change buf's type to u8 in s35390a_init
  rtc: ds1307: fix ds1339 wakealarm support
  rtc: ds1685: simplify getting .driver_data
  rtc: m41t80: mark expected switch fall-through
  rtc: tegra: Propagate errors from platform_get_irq()
  rtc: cmos: Remove the `use_acpi_alarm' module parameter for !ACPI
  rtc: cmos: Fix non-ACPI undefined reference to `hpet_rtc_interrupt'
  rtc: mv: let the core handle invalid alarms
  rtc: vr41xx: switch to rtc_time64_to_tm/rtc_tm_to_time64
  rtc: ab8500: remove useless check
  rtc: ab8500: let the core handle range
  rtc: ab8500: use rtc_add_group
  rtc: rs5c348: report error when time is invalid
  rtc: rs5c348: remove forward declaration
  rtc: rs5c348: remove useless label
  ...
parents e5585453 3822d1bb
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -75,7 +75,7 @@ config MIPS
	select MODULES_USE_ELF_RELA if MODULES && 64BIT
	select MODULES_USE_ELF_RELA if MODULES && 64BIT
	select MODULES_USE_ELF_REL if MODULES
	select MODULES_USE_ELF_REL if MODULES
	select PERF_USE_VMALLOC
	select PERF_USE_VMALLOC
	select RTC_LIB if !MACH_LOONGSON64
	select RTC_LIB
	select SYSCTL_EXCEPTION_TRACE
	select SYSCTL_EXCEPTION_TRACE
	select VIRT_TO_BUS
	select VIRT_TO_BUS
	select NO_BOOTMEM
	select NO_BOOTMEM
+1 −1
Original line number Original line Diff line number Diff line
@@ -268,7 +268,7 @@ if RTC_LIB=n


config RTC
config RTC
	tristate "Enhanced Real Time Clock Support (legacy PC RTC driver)"
	tristate "Enhanced Real Time Clock Support (legacy PC RTC driver)"
	depends on ALPHA || (MIPS && MACH_LOONGSON64)
	depends on ALPHA
	---help---
	---help---
	  If you say Y here and create a character special file /dev/rtc with
	  If you say Y here and create a character special file /dev/rtc with
	  major number 10 and minor number 135 using mknod ("man mknod"), you
	  major number 10 and minor number 135 using mknod ("man mknod"), you
+2 −12
Original line number Original line Diff line number Diff line
@@ -187,6 +187,7 @@ config RTC_DRV_ABB5ZES3


config RTC_DRV_ABX80X
config RTC_DRV_ABX80X
	tristate "Abracon ABx80x"
	tristate "Abracon ABx80x"
	select WATCHDOG_CORE if WATCHDOG
	help
	help
	  If you say yes here you get support for Abracon AB080X and AB180X
	  If you say yes here you get support for Abracon AB080X and AB180X
	  families of ultra-low-power  battery- and capacitor-backed real-time
	  families of ultra-low-power  battery- and capacitor-backed real-time
@@ -1007,17 +1008,6 @@ config RTC_DRV_DS17885


endchoice
endchoice


config RTC_DS1685_PROC_REGS
	bool "Display register values in /proc"
	depends on RTC_DRV_DS1685_FAMILY && PROC_FS
	help
	  Enable this to display a readout of all of the RTC registers in
	  /proc/drivers/rtc.  Keep in mind that this can potentially lead
	  to lost interrupts, as reading Control Register C will clear
	  all pending IRQ flags.

	  Unless you are debugging this driver, choose N.

config RTC_DRV_DS1742
config RTC_DRV_DS1742
	tristate "Maxim/Dallas DS1742/1743"
	tristate "Maxim/Dallas DS1742/1743"
	depends on HAS_IOMEM
	depends on HAS_IOMEM
@@ -1587,7 +1577,7 @@ config RTC_DRV_MPC5121


config RTC_DRV_JZ4740
config RTC_DRV_JZ4740
	tristate "Ingenic JZ4740 SoC"
	tristate "Ingenic JZ4740 SoC"
	depends on MACH_INGENIC || COMPILE_TEST
	depends on MIPS || COMPILE_TEST
	help
	help
	  If you say yes here you get support for the Ingenic JZ47xx SoCs RTC
	  If you say yes here you get support for the Ingenic JZ47xx SoCs RTC
	  controllers.
	  controllers.
+6 −6
Original line number Original line Diff line number Diff line
@@ -36,9 +36,9 @@ obj-$(CONFIG_RTC_DRV_ASM9260) += rtc-asm9260.o
obj-$(CONFIG_RTC_DRV_AT91RM9200)+= rtc-at91rm9200.o
obj-$(CONFIG_RTC_DRV_AT91RM9200)+= rtc-at91rm9200.o
obj-$(CONFIG_RTC_DRV_AT91SAM9)	+= rtc-at91sam9.o
obj-$(CONFIG_RTC_DRV_AT91SAM9)	+= rtc-at91sam9.o
obj-$(CONFIG_RTC_DRV_AU1XXX)	+= rtc-au1xxx.o
obj-$(CONFIG_RTC_DRV_AU1XXX)	+= rtc-au1xxx.o
obj-$(CONFIG_RTC_DRV_BRCMSTB)	+= rtc-brcmstb-waketimer.o
obj-$(CONFIG_RTC_DRV_BQ32K)	+= rtc-bq32k.o
obj-$(CONFIG_RTC_DRV_BQ32K)	+= rtc-bq32k.o
obj-$(CONFIG_RTC_DRV_BQ4802)	+= rtc-bq4802.o
obj-$(CONFIG_RTC_DRV_BQ4802)	+= rtc-bq4802.o
obj-$(CONFIG_RTC_DRV_BRCMSTB)	+= rtc-brcmstb-waketimer.o
obj-$(CONFIG_RTC_DRV_CMOS)	+= rtc-cmos.o
obj-$(CONFIG_RTC_DRV_CMOS)	+= rtc-cmos.o
obj-$(CONFIG_RTC_DRV_COH901331)	+= rtc-coh901331.o
obj-$(CONFIG_RTC_DRV_COH901331)	+= rtc-coh901331.o
obj-$(CONFIG_RTC_DRV_CPCAP)	+= rtc-cpcap.o
obj-$(CONFIG_RTC_DRV_CPCAP)	+= rtc-cpcap.o
@@ -71,6 +71,7 @@ obj-$(CONFIG_RTC_DRV_EP93XX) += rtc-ep93xx.o
obj-$(CONFIG_RTC_DRV_FM3130)	+= rtc-fm3130.o
obj-$(CONFIG_RTC_DRV_FM3130)	+= rtc-fm3130.o
obj-$(CONFIG_RTC_DRV_FTRTC010)	+= rtc-ftrtc010.o
obj-$(CONFIG_RTC_DRV_FTRTC010)	+= rtc-ftrtc010.o
obj-$(CONFIG_RTC_DRV_GENERIC)	+= rtc-generic.o
obj-$(CONFIG_RTC_DRV_GENERIC)	+= rtc-generic.o
obj-$(CONFIG_RTC_DRV_GOLDFISH)	+= rtc-goldfish.o
obj-$(CONFIG_RTC_DRV_HID_SENSOR_TIME) += rtc-hid-sensor-time.o
obj-$(CONFIG_RTC_DRV_HID_SENSOR_TIME) += rtc-hid-sensor-time.o
obj-$(CONFIG_RTC_DRV_HYM8563)	+= rtc-hym8563.o
obj-$(CONFIG_RTC_DRV_HYM8563)	+= rtc-hym8563.o
obj-$(CONFIG_RTC_DRV_IMXDI)	+= rtc-imxdi.o
obj-$(CONFIG_RTC_DRV_IMXDI)	+= rtc-imxdi.o
@@ -78,10 +79,10 @@ obj-$(CONFIG_RTC_DRV_ISL12022) += rtc-isl12022.o
obj-$(CONFIG_RTC_DRV_ISL12026)	+= rtc-isl12026.o
obj-$(CONFIG_RTC_DRV_ISL12026)	+= rtc-isl12026.o
obj-$(CONFIG_RTC_DRV_ISL1208)	+= rtc-isl1208.o
obj-$(CONFIG_RTC_DRV_ISL1208)	+= rtc-isl1208.o
obj-$(CONFIG_RTC_DRV_JZ4740)	+= rtc-jz4740.o
obj-$(CONFIG_RTC_DRV_JZ4740)	+= rtc-jz4740.o
obj-$(CONFIG_RTC_DRV_LOONGSON1)	+= rtc-ls1x.o
obj-$(CONFIG_RTC_DRV_LP8788)	+= rtc-lp8788.o
obj-$(CONFIG_RTC_DRV_LP8788)	+= rtc-lp8788.o
obj-$(CONFIG_RTC_DRV_LPC24XX)	+= rtc-lpc24xx.o
obj-$(CONFIG_RTC_DRV_LPC24XX)	+= rtc-lpc24xx.o
obj-$(CONFIG_RTC_DRV_LPC32XX)	+= rtc-lpc32xx.o
obj-$(CONFIG_RTC_DRV_LPC32XX)	+= rtc-lpc32xx.o
obj-$(CONFIG_RTC_DRV_LOONGSON1)	+= rtc-ls1x.o
obj-$(CONFIG_RTC_DRV_M41T80)	+= rtc-m41t80.o
obj-$(CONFIG_RTC_DRV_M41T80)	+= rtc-m41t80.o
obj-$(CONFIG_RTC_DRV_M41T93)	+= rtc-m41t93.o
obj-$(CONFIG_RTC_DRV_M41T93)	+= rtc-m41t93.o
obj-$(CONFIG_RTC_DRV_M41T94)	+= rtc-m41t94.o
obj-$(CONFIG_RTC_DRV_M41T94)	+= rtc-m41t94.o
@@ -100,7 +101,6 @@ obj-$(CONFIG_RTC_DRV_MC13XXX) += rtc-mc13xxx.o
obj-$(CONFIG_RTC_DRV_MCP795)	+= rtc-mcp795.o
obj-$(CONFIG_RTC_DRV_MCP795)	+= rtc-mcp795.o
obj-$(CONFIG_RTC_DRV_MOXART)	+= rtc-moxart.o
obj-$(CONFIG_RTC_DRV_MOXART)	+= rtc-moxart.o
obj-$(CONFIG_RTC_DRV_MPC5121)	+= rtc-mpc5121.o
obj-$(CONFIG_RTC_DRV_MPC5121)	+= rtc-mpc5121.o
obj-$(CONFIG_RTC_DRV_VRTC)	+= rtc-mrst.o
obj-$(CONFIG_RTC_DRV_MSM6242)	+= rtc-msm6242.o
obj-$(CONFIG_RTC_DRV_MSM6242)	+= rtc-msm6242.o
obj-$(CONFIG_RTC_DRV_MT6397)	+= rtc-mt6397.o
obj-$(CONFIG_RTC_DRV_MT6397)	+= rtc-mt6397.o
obj-$(CONFIG_RTC_DRV_MT7622)	+= rtc-mt7622.o
obj-$(CONFIG_RTC_DRV_MT7622)	+= rtc-mt7622.o
@@ -116,8 +116,8 @@ obj-$(CONFIG_RTC_DRV_PCF2123) += rtc-pcf2123.o
obj-$(CONFIG_RTC_DRV_PCF2127)	+= rtc-pcf2127.o
obj-$(CONFIG_RTC_DRV_PCF2127)	+= rtc-pcf2127.o
obj-$(CONFIG_RTC_DRV_PCF50633)	+= rtc-pcf50633.o
obj-$(CONFIG_RTC_DRV_PCF50633)	+= rtc-pcf50633.o
obj-$(CONFIG_RTC_DRV_PCF85063)	+= rtc-pcf85063.o
obj-$(CONFIG_RTC_DRV_PCF85063)	+= rtc-pcf85063.o
obj-$(CONFIG_RTC_DRV_PCF85363)	+= rtc-pcf85363.o
obj-$(CONFIG_RTC_DRV_PCF8523)	+= rtc-pcf8523.o
obj-$(CONFIG_RTC_DRV_PCF8523)	+= rtc-pcf8523.o
obj-$(CONFIG_RTC_DRV_PCF85363)	+= rtc-pcf85363.o
obj-$(CONFIG_RTC_DRV_PCF8563)	+= rtc-pcf8563.o
obj-$(CONFIG_RTC_DRV_PCF8563)	+= rtc-pcf8563.o
obj-$(CONFIG_RTC_DRV_PCF8583)	+= rtc-pcf8583.o
obj-$(CONFIG_RTC_DRV_PCF8583)	+= rtc-pcf8583.o
obj-$(CONFIG_RTC_DRV_PIC32)	+= rtc-pic32.o
obj-$(CONFIG_RTC_DRV_PIC32)	+= rtc-pic32.o
@@ -154,9 +154,9 @@ obj-$(CONFIG_RTC_DRV_SNVS) += rtc-snvs.o
obj-$(CONFIG_RTC_DRV_SPEAR)	+= rtc-spear.o
obj-$(CONFIG_RTC_DRV_SPEAR)	+= rtc-spear.o
obj-$(CONFIG_RTC_DRV_STARFIRE)	+= rtc-starfire.o
obj-$(CONFIG_RTC_DRV_STARFIRE)	+= rtc-starfire.o
obj-$(CONFIG_RTC_DRV_STK17TA8)	+= rtc-stk17ta8.o
obj-$(CONFIG_RTC_DRV_STK17TA8)	+= rtc-stk17ta8.o
obj-$(CONFIG_RTC_DRV_ST_LPC)	+= rtc-st-lpc.o
obj-$(CONFIG_RTC_DRV_STM32) 	+= rtc-stm32.o
obj-$(CONFIG_RTC_DRV_STM32) 	+= rtc-stm32.o
obj-$(CONFIG_RTC_DRV_STMP)	+= rtc-stmp3xxx.o
obj-$(CONFIG_RTC_DRV_STMP)	+= rtc-stmp3xxx.o
obj-$(CONFIG_RTC_DRV_ST_LPC)	+= rtc-st-lpc.o
obj-$(CONFIG_RTC_DRV_SUN4V)	+= rtc-sun4v.o
obj-$(CONFIG_RTC_DRV_SUN4V)	+= rtc-sun4v.o
obj-$(CONFIG_RTC_DRV_SUN6I)	+= rtc-sun6i.o
obj-$(CONFIG_RTC_DRV_SUN6I)	+= rtc-sun6i.o
obj-$(CONFIG_RTC_DRV_SUNXI)	+= rtc-sunxi.o
obj-$(CONFIG_RTC_DRV_SUNXI)	+= rtc-sunxi.o
@@ -169,10 +169,10 @@ obj-$(CONFIG_RTC_DRV_TWL4030) += rtc-twl.o
obj-$(CONFIG_RTC_DRV_TX4939)	+= rtc-tx4939.o
obj-$(CONFIG_RTC_DRV_TX4939)	+= rtc-tx4939.o
obj-$(CONFIG_RTC_DRV_V3020)	+= rtc-v3020.o
obj-$(CONFIG_RTC_DRV_V3020)	+= rtc-v3020.o
obj-$(CONFIG_RTC_DRV_VR41XX)	+= rtc-vr41xx.o
obj-$(CONFIG_RTC_DRV_VR41XX)	+= rtc-vr41xx.o
obj-$(CONFIG_RTC_DRV_VRTC)	+= rtc-mrst.o
obj-$(CONFIG_RTC_DRV_VT8500)	+= rtc-vt8500.o
obj-$(CONFIG_RTC_DRV_VT8500)	+= rtc-vt8500.o
obj-$(CONFIG_RTC_DRV_WM831X)	+= rtc-wm831x.o
obj-$(CONFIG_RTC_DRV_WM831X)	+= rtc-wm831x.o
obj-$(CONFIG_RTC_DRV_WM8350)	+= rtc-wm8350.o
obj-$(CONFIG_RTC_DRV_WM8350)	+= rtc-wm8350.o
obj-$(CONFIG_RTC_DRV_X1205)	+= rtc-x1205.o
obj-$(CONFIG_RTC_DRV_X1205)	+= rtc-x1205.o
obj-$(CONFIG_RTC_DRV_XGENE)	+= rtc-xgene.o
obj-$(CONFIG_RTC_DRV_XGENE)	+= rtc-xgene.o
obj-$(CONFIG_RTC_DRV_ZYNQMP)	+= rtc-zynqmp.o
obj-$(CONFIG_RTC_DRV_ZYNQMP)	+= rtc-zynqmp.o
obj-$(CONFIG_RTC_DRV_GOLDFISH)	+= rtc-goldfish.o
+5 −7
Original line number Original line Diff line number Diff line
@@ -286,7 +286,8 @@ static void rtc_device_get_offset(struct rtc_device *rtc)
 *
 *
 * Returns the pointer to the new struct class device.
 * Returns the pointer to the new struct class device.
 */
 */
struct rtc_device *rtc_device_register(const char *name, struct device *dev,
static struct rtc_device *rtc_device_register(const char *name,
					      struct device *dev,
					      const struct rtc_class_ops *ops,
					      const struct rtc_class_ops *ops,
					      struct module *owner)
					      struct module *owner)
{
{
@@ -351,15 +352,13 @@ struct rtc_device *rtc_device_register(const char *name, struct device *dev,
			name, err);
			name, err);
	return ERR_PTR(err);
	return ERR_PTR(err);
}
}
EXPORT_SYMBOL_GPL(rtc_device_register);



/**
/**
 * rtc_device_unregister - removes the previously registered RTC class device
 * rtc_device_unregister - removes the previously registered RTC class device
 *
 *
 * @rtc: the RTC class device to destroy
 * @rtc: the RTC class device to destroy
 */
 */
void rtc_device_unregister(struct rtc_device *rtc)
static void rtc_device_unregister(struct rtc_device *rtc)
{
{
	mutex_lock(&rtc->ops_lock);
	mutex_lock(&rtc->ops_lock);
	/*
	/*
@@ -372,7 +371,6 @@ void rtc_device_unregister(struct rtc_device *rtc)
	mutex_unlock(&rtc->ops_lock);
	mutex_unlock(&rtc->ops_lock);
	put_device(&rtc->dev);
	put_device(&rtc->dev);
}
}
EXPORT_SYMBOL_GPL(rtc_device_unregister);


static void devm_rtc_device_release(struct device *dev, void *res)
static void devm_rtc_device_release(struct device *dev, void *res)
{
{
Loading