Commit Graph

426 Commits

Author SHA1 Message Date
Linus Torvalds fbe173e3ff RTC for 4.17
Subsystem:
  - Add tracepoints
  - Rework of the RTC/nvmem API to allow drivers to discard struct nvmem_config
    after registration
  - New range API, drivers can now expose the useful range of the RTC
  - New offset API the core is now able to add an offset to the RTC time,
    modifying the supported range.
  - Multiple rtc_time64_to_tm fixes
  - Handle time_t overflow on 32 bit platforms in the core instead of letting
    drivers do crazy things.
  - remove rtc_control API
 
 New driver:
  - Intersil ISL12026
 
 Drivers:
  - Drivers exposing the RTC non volatile memory have been converted to use nvmem
  - Removed useless time and date validation
  - Removed an indirection pattern that was a cargo cult from ancient drivers
  - Removed VLA usage
  - Fixed a possible race condition in probe functions
  - AB8540 support is dropped from ab8500
  - pcf85363 now has alarm support
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEXx9Viay1+e7J/aM4AyWl4gNJNJIFAlrL3s4ACgkQAyWl4gNJ
 NJI+MxAAgc56UEXi5chqKpHE6GHL2aPWan9duHB6FmGrKWt/FJmpJ8UGylLFlvaW
 dpRGvW0Dynz45UztegcrbHMU6+B2O0hboL4/GVZpYAkcNAcu7Lf0ULho2rsQSDmW
 WJpemmdRxyQY1IkWmw7z7KAkMzhAfYZiVmWmVwMRZfMcKJ3DLEldfgRtkN+g0UdB
 tayWQY3mS02ki16e2figsgwZRmUUhQslDfpKlesInXOzUMmLgVWhf1QxJSEUcfs0
 AMp75vD2YvVJ/RHy/6BilQbqP9EVnaG4NHqJGFSOddazA7u+3HGubEFboI8NuPXb
 2fCvfrNux7pgtQsBF9dnpCqWlukE7sF5aDyIUvjYnr0vUm2D/CwdXglGvQSQVWea
 5GxPTWBdaCL0V7GD5OSZcfUGyz1TN/7NSUItdLSr9YK13dL+tqhcYYm5ytXJLzvO
 Z4GyUEoCOMprMJ9j5KU/TXSjauDmPDl8YZ5B93lPcNOh7y+b/2r3umBaInyZrFzX
 1WJ6FWtuhbRfEwuQtgQHBsobt9eTwZfo8C2y22HBo/fdWfBv45feiiHNXt3OVrA+
 aws6pwfVf1H0UsvpQkXtlPthAx3sbOTndDKAUhntb/U/zA9c7fTrfUyVOQ1bArJy
 p6tl/cmlpq68AjZB+0d3zUXQkQH4Syu+EqZrWItkE6XxZm+khDE=
 =l9i8
 -----END PGP SIGNATURE-----

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

Pull RTC updates from Alexandre Belloni:
 "This contains a few series that have been in preparation for a while
  and that will help systems with RTCs that will fail in 2038, 2069 or
  2100.

  Subsystem:
   - Add tracepoints
   - Rework of the RTC/nvmem API to allow drivers to discard struct
     nvmem_config after registration
   - New range API, drivers can now expose the useful range of the RTC
   - New offset API the core is now able to add an offset to the RTC
     time, modifying the supported range.
   - Multiple rtc_time64_to_tm fixes
   - Handle time_t overflow on 32 bit platforms in the core instead of
     letting drivers do crazy things.
   - remove rtc_control API

  New driver:
   - Intersil ISL12026

  Drivers:
   - Drivers exposing the RTC non volatile memory have been converted to
     use nvmem
   - Removed useless time and date validation
   - Removed an indirection pattern that was a cargo cult from ancient
     drivers
   - Removed VLA usage
   - Fixed a possible race condition in probe functions
   - AB8540 support is dropped from ab8500
   - pcf85363 now has alarm support"

* tag 'rtc-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (128 commits)
  rtc: snvs: Fix usage of snvs_rtc_enable
  rtc: mt7622: fix module autoloading for OF platform drivers
  rtc: isl12022: use true and false for boolean values
  rtc: ab8500: Drop AB8540 support
  rtc: remove a warning during scripts/kernel-doc step
  rtc: 88pm860x: remove artificial limitation
  rtc: 88pm80x: remove artificial limitation
  rtc: st-lpc: remove artificial limitation
  rtc: mrst: remove artificial limitation
  rtc: mv: remove artificial limitation
  rtc: hctosys: Ensure system time doesn't overflow time_t
  parisc: time: stop validating rtc_time in .read_time
  rtc: pcf85063: fix clearing bits in pcf85063_start_clock
  rtc: at91sam9: Set name of regmap_config
  rtc: s5m: Remove VLA usage
  rtc: s5m: Move enum from rtc.h to rtc-s5m.c
  rtc: remove VLA usage
  rtc: Add useful timestamp definitions
  rtc: Add one offset seconds to expand RTC range
  rtc: Factor out the RTC range validation into rtc_valid_range()
  ...
2018-04-10 10:22:27 -07:00
Arnd Bergmann 111f750389 rtc: remove bfin driver
The blackfin architecture is getting removed, so this one is
now obsolete.

Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Aaron Wu <aaron.wu@analog.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-03-26 15:56:31 +02:00
Arnd Bergmann fca94ec613 rtc: remove tile driver
The tile architecture is getting removed, so this driver is
no longer needed.

Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-03-26 15:56:29 +02:00
Arnd Bergmann a687a53370 treewide: simplify Kconfig dependencies for removed archs
A lot of Kconfig symbols have architecture specific dependencies.
In those cases that depend on architectures we have already removed,
they can be omitted.

Acked-by: Kalle Valo <kvalo@codeaurora.org>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-03-26 15:55:57 +02:00
Masahiro Yamada e22e2d941c rtc: at91sam: add 'depends on HAS_IOMEM' to fix unmet dependency
This config select's MFD_SYSCON, but does not depend on HAS_IOMEM.

Compile testing on architecture without HAS_IOMEM causes "unmet
direct dependencies" in Kconfig phase.

Detected by "make ARCH=score allyesconfig".

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-03-17 14:20:52 +01:00
David Daney 4731a43169 rtc: isl12026: new driver.
The ISL12026 is a combination RTC and EEPROM device with I2C
interface.  The standard RTC driver interface is provided.  The EEPROM
is accessed via the NVMEM interface.

Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-03-17 14:20:51 +01:00
David Howells 739d875dd6 mn10300: Remove the architecture
Remove the MN10300 arch as the hardware is defunct.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Masahiro Yamada <yamada.masahiro@socionext.com>
cc: linux-am33-list@redhat.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-03-09 23:19:56 +01:00
Alexandre Belloni faec5f7bcc rtc: tx4939: extend test coverage
The rtc-tx4939 driver now compiles correctly on other architectures, add
COMPILE_TEST to improve code coverage.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-03-01 10:49:34 +01:00
Corentin Labbe 4402be2b4c rtc: remove rtc-at32ap700x
Since PLATFORM_AT32AP is an AVR32 platform which was removed, the
rtc driver rtc-at32ap700x is useless.
This patch remove it.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2018-01-19 09:59:32 +01:00
Patrick Bruenn 83c880f79e rtc: add mxc driver for i.MX53 SRTC
Neither rtc-imxdi, rtc-mxc nor rtc-snvs are compatible with i.MX53.

This is driver enables support for the low power domain SRTC features:
- 32-bit MSB of non-rollover time counter
- 32-bit alarm register

Select the new config option RTC_DRV_MXC_V2 to build this driver

Based on:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/rtc/rtc-mxc_v2.c?h=imx_2.6.35_11.09.01

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
Acked-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2018-01-12 00:20:39 +01:00
Stephen Barber 6f2a71a31a rtc: cros-ec: add cros-ec-rtc driver.
On platforms with a Chrome OS EC, the EC can function as a simple RTC.
Add a basic driver with this functionality.

Signed-off-by: Stephen Barber <smbarber@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-12-18 23:05:10 +01:00
Baolin Wang 495bbde523 rtc: sc27xx: Add Spreadtrum SC27xx PMIC RTC driver
This patch adds the Spreadtrum RTC driver, which embedded in the
Spreadtrum SC27xx series PMICs.

Signed-off-by: Baolin Wang <baolin.wang@spreadtrum.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-11-20 22:47:50 +01:00
Eric Nelson a9687aa276 rtc: add support for NXP PCF85363 real-time clock
Note that alarms are not currently implemented.

64 bytes of nvmem is supported and exposed in
sysfs (# is the instance number, starting with 0):

	/sys/bus/nvmem/devices/pcf85363-#/nvmem

Signed-off-by: Eric Nelson <eric@nelint.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Tested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-11-08 07:52:22 +01:00
Sean Wang d00a7ed288 rtc: mediatek: enhance the description for MediaTek PMIC based RTC
Give a better description for original MediaTek RTC driver as PMIC based
RTC in order to distinguish SoC based RTC. Also turning all words with
Mediatek to MediaTek here.

Cc: Eddie Huang <eddie.huang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Acked-by: Eddie Huang <eddie.huang@mediatek.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-10-26 10:43:30 +02:00
Sean Wang ba5d018135 rtc: mediatek: add driver for RTC on MT7622 SoC
This patch introduces the driver for the RTC on MT7622 SoC.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Reviewed-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-10-26 10:43:29 +02:00
Andreas Färber ae930c912b rtc: Add Realtek RTD1295
Based on QNAP's arch/arm/mach-rtk119x/driver/rtk_rtc_drv.c code and
mach-rtk119x/driver/dc2vo/fpga/include/mis_reg.h register definitions.

The base year 2014 was observed on all of Zidoo X9S, ProBox2 Ava and
Beelink Lake I.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-09-05 09:55:02 +02:00
Miodrag Dinic f22d9cdcb5 rtc: goldfish: Add RTC driver for Android emulator
Add device driver for a virtual RTC device in Android emulator.

The compatible string used by OS for binding the driver is defined
as "google,goldfish-rtc".

Signed-off-by: Miodrag Dinic <miodrag.dinic@imgtec.com>
Signed-off-by: Goran Ferenc <goran.ferenc@imgtec.com>
Signed-off-by: Aleksandar Markovic <aleksandar.markovic@imgtec.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-09-01 01:10:18 +02:00
Nikita Yushchenko 0759c886f4 rtc: ds1307: add basic support for ds1341 chip
This adds support for reading and writing date/time from/to ds1341 chip.

ds1341 chip has other features - alarms, input clock (can be used instead
of intercal oscillator for better accuracy), output clock ("square wave
generation"). However, not all of that is available at the same time.
Same chip pins, CLKIN/nINTA and SQW/nINTB, can be used either for
input/output clocks, or for alarm interrupts. Role of these pins on
particular board depends on hardware wiring.

We can add device tree properties that describe if each of pins is wired
as clock, or as interrupt, or left unconnected, and enable support for
corresponding functionality based on that. But that is cumbersome, requires
hardware for testing, and has to deal with bit enabling/disabling output
clock also affects which pins alarm interrupts are routed to.

Another factor is that there are hardware setups (i.e. ZII RDU2) that
power DS1341 from SuperCap, which makes power saving critical. For such
setups, kernel driver should leave register bits that control mentioned
pins in the state configured by bootloader.

Given all that, it was decided to limit support to "only date/time" for
now. That is enough for common use case. Full (and cumbersome)
implementation can be added later if ever needed.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Aleksander Morgado <aleksander@aleksander.es>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-09-01 01:10:18 +02:00
Elaine Zhang 79c676c4e3 rtc: rk808: Name RK805 in Kconfig for RTC_DRV_RK808
The RK808 and RK805 PMICs are using a similar register map.
We can reuse the rtc driver for the RK805 PMIC. So let's add
the RK805 in the Kconfig description.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-09-01 01:10:12 +02:00
Alexandre Belloni 697e5a47aa rtc: add generic nvmem support
Many RTCs have an on board non volatile storage. It can be battery backed
RAM or an EEPROM. Use the nvmem subsystem to export it to both userspace
and in-kernel consumers.

This stays compatible with the previous (non documented) ABI that was using
/sys/class/rtc/rtcx/device/nvram to export that memory. But will warn about
the deprecation.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-07-07 13:14:14 +02:00
Kirill Esipov c35c4195f9 rtc: ds3232: add temperature support
DS3232/DS3234 has the temperature registers with a resolution of 0.25
degree celsius. This enables to get the value through hwmon.

	# cat /sys/class/hwmon/hwmon0/temp1_input
	37250

Signed-off-by: Kirill Esipov <yesipov@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-07-06 22:37:16 +02:00
Linus Walleij 1d61d2592c rtc: gemini/ftrtc010: rename driver and symbols
The Gemini RTC is actually a generic IP block from Faraday
Technology names FTRTC010. Rename the driver file and all
symbols to match this IP name.

The relationship can be clearly seen in the U-Boot driver
posted by Po-Yu Chuang for the Faraday A320 board:
https://lists.denx.de/pipermail/u-boot/2009-September/061326.html

Remove the dependency on ARCH_GEMINI but select the driver
for ARCH_GEMINI so we get a smooth transition. The IP block
is synthsized on different silicon and architectures.

Cc: Po-Yu Chuang <ratbert@faraday-tech.com>
Acked-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-07-06 22:37:15 +02:00
Brian Norris c4f07ecee2 rtc: brcmstb-waketimer: Add Broadcom STB wake-timer
This adds support for the Broadcom STB wake-timer which is a timer in
the chip's 27Mhz clock domain that offers the ability to wake the system
(wake-up source) from suspend states (S2, S3, S5). It is supported using
the rtc framework allowing us to configure alarms for system wake-up.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-07-05 23:11:59 +02:00
Chris Brandt dab5aec64b rtc: sh: add support for rza series
This same RTC is used in RZ/A series MPUs, therefore with some slight
changes, this driver can be reused. Additionally, since ARM architectures
require Device Tree configurations, device tree support has been added.

Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-04-03 18:01:34 +02:00
Sebastian Reichel dd3bf50b35 rtc: cpcap: new rtc driver
This driver supports the Motorola CPCAP PMIC found on
some of Motorola's mobile phones, such as the Droid 4.

Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-03-09 01:32:35 +01:00
Linus Torvalds 5782fd14aa RTC for 4.11
Subsystem:
  - constify rtc_class_ops structures
 
 New driver:
  - STM32
 
 Drivers:
  - armada38x: fix errata, Armada 7K/8K support
  - ds3232: fix wakeup support
  - gemini: DT support
  - m48t86: huge cleanup and platform_data removal
  - mcp795: alarm support
  - sun6i: proper oscillator handling
  - tegra: proper clock handling
  - tps65910: calibration support
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEl0I5XWmUIrwBfFMm2KKDO9oT4sIFAlizZLQACgkQ2KKDO9oT
 4sISIw//Zl96KIXqeC+En+8v8Sa0pham/mcLbKYujnFIi1mMaesEXJJClALXYAGQ
 r/fwXkYowC14AMXGuV5vMMVAVisJpj1gtMmpom+9/7mYtkFOIUsB8Sis8dMqgTqx
 JFBho7JvPJcwE7BLzUNRzX4tWhFhNm0epyMrsrQrBSeLx3PD8xg5v2kPYuZHdYU0
 63Bovkq6zvH9/WdO8DLXw/nc/Y0Bo66rlvJkcaNfjBrdFTRvRAM5JIiJuxewR+jY
 3bTQ8PQjnHAWIj/RhrwguGTLDlgJKcpitB06Y53TdRaNtVfJuEN8z6EjNkR37kyS
 ZJnPgihCoH6l7v28uY4e5BAg/Fe3ZhDrPmhZWq8rEkByeQpSUWgrE/DtcoC0OkZO
 l2fU/y2vq4za7CpRPp5bvq3sF0PbRHSF0o8rvmHlQZI/mwwYbwF9gk1vg5adyH7i
 1UuTGoDXxcMYZPJm3zezE1bUa4OAyjH1NhrvPvinlDw+aekaai2eFUKIbJim+dJx
 tEVPATPlDk/Ngwth1hpE8D/tOdoQhWtfNk7+zo7MNtMjAO1h/DxSLHXJ9mvCwcPh
 lPT9BmQxT1HECIa5gjN1R+5X5or5z8LPcNGO9TedIchfZ8qBGzsWOt9bXlw2dgI2
 qmXo6IrjCN88kf+qsVA4FKLmaqgpb9+Yb+5cPlhEOKvxUhY47Nc=
 =Go5q
 -----END PGP SIGNATURE-----

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

Pull RTC updates from Alexandre Belloni:
 "Subsystem:
   - constify rtc_class_ops structures

 New driver:
   - STM32

 Drivers:
   - armada38x: fix errata, Armada 7K/8K support
   - ds3232: fix wakeup support
   - gemini: DT support
   - m48t86: huge cleanup and platform_data removal
   - mcp795: alarm support
   - sun6i: proper oscillator handling
   - tegra: proper clock handling
   - tps65910: calibration support"

* tag 'rtc-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (44 commits)
  rtc: ds3232: Call device_init_wakeup before device_register
  rtc: pcf2127: bulk read only date and time registers.
  rtc: armada38x: Add support for Armada 7K/8K
  rtc: armada38x: Prepare driver to manage different versions
  rtc: ds3232: Add regmap max_register definition.
  rtc: ds3232: Cleanup whitespace around register and bit definitions.
  rtc: m48t86: remove unused platform_data
  ARM: Orion5x: ts78xx: allow rtc-m48t86 to manage it's own resources
  ARM: Orion5x: ts78xx: remove RTC detection
  ARM: ep93xx: ts72xx: allow rtc-m48t86 to manage its own resources
  rtc: m48t86: verify that the RTC is actually present
  rtc: m48t86: add NVRAM support
  rtc: m48t86: allow driver to manage its resources
  rtc: m48t86: shorten register name defines
  bindings: rtc: correct wrong reference in required properties
  rtc: sun6i: Fix return value check in sun6i_rtc_clk_init()
  rtc: sun6i: extend test coverage
  rtc: sun6i: Fix compatibility with old DT binding
  rtc: snvs: add a missing write sync
  rtc: bq32000: add support to enable disable the trickle charge FET bypass
  ...
2017-02-27 19:59:21 -08:00
Alexandre Belloni 93946c49cd rtc: sun6i: extend test coverage
COMPILE_TEST was wrongly placed, move it to the "depends on" line.
Also depend on COMMON_CLK as the driver now needs it to be properly
compiled.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-02-01 13:55:07 +01:00
Alexandre Belloni 586655d278 rtc: jz4740: make the driver buildable as a module again
By using kernel_halt() instead of machine_halt(), we can make the driver
build as a module.
However, jz4740 platforms not loading this module will not be able to power
off.

Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>

Revert "rtc: jz4740: make the driver builtin only"

This reverts commit b9168c539c.
2017-01-26 23:03:21 +01:00
Maxime Ripard 3753941475 rtc: sun6i: Disable the build as a module
Since we have to provide the clock very early on, the RTC driver cannot be
built as a module. Make sure that won't happen.

Cc: stable@vger.kernel.org
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-01-24 18:45:29 +01:00
Amelie Delaunay 4e64350f42 rtc: add STM32 RTC driver
This patch adds support for the STM32 RTC.

Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-01-13 01:40:31 +01:00
Akinobu Mita 0b6a8f5c9b rtc: add support for EPSON TOYOCOM RTC-7301SF/DG
This adds support for EPSON TOYOCOM RTC-7301SF/DG which has parallel
interface compatible with SRAM.

This driver supports basic clock, calendar and alarm functionality.

Tested with Microblaze linux running on Artix7 FPGA board with my own
custom IP for RTC-7301.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-12-19 00:59:21 +01:00
Nicolae Rosia 1c02cbfec5 rtc: twl: make driver DT only
Since there are no platform based users and all users
of this code are TI OMAP-based which is DT only, it makes
sense to remove unused code.

Signed-off-by: Nicolae Rosia <Nicolae_Rosia@mentor.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-11-30 21:21:33 +01:00
Alexandre Belloni 72d3d79f8d rtc: fix typos in Kconfig
s/buillt/built/g

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-11-09 01:37:04 +01:00
Alexandre Belloni b9168c539c rtc: jz4740: make the driver builtin only
Since the driver is now calling machine_halt() that is not exported, it has
to be built in the kernel. Building it as a module will fail at linking
time.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-11-09 01:37:03 +01:00
Krzysztof Kozlowski 959df7778b rtc: Enable compile testing for Maxim and Samsung drivers
max8907, max77686 and s5m RTC drivers can be compile tested to increase
build coverage.  The s5m-rtc uses REGMAP_IRQ so add this as explicit
dependency.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-11-05 00:07:41 +01:00
Paul Cercueil cd563200c0 rtc: jz4740: Add support for the RTC in the jz4780 SoC
The RTC unit present in the JZ4780 works mostly the same as the one in
the JZ4740. The major difference is that register writes need to be
explicitly enabled, by writing a magic code (0xA55A) to a "write
enable" register before each access.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Acked-by: Maarten ter Huurne <maarten@treewalker.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-11-04 23:48:39 +01:00
Christoph Hellwig 290cd0f07f rtc: cmos: don't refer to asm-generic/rtc.h
That header has been gone for a while.  I've fixed up the Kconfig
comment, but the one in rtc-cmos.c doesn't make any sense to me
even looking at its history.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-10-19 09:41:48 +02:00
Linus Torvalds 8b70f71617 RTC for 4.9
Subsystem:
  - delete owner assignment in multiple drivers
  - constify rtc_class_ops structures
 
 Drivers:
  - ac100: support clock-output-names
  - cmos: properly handle ACPI alarms and quirky BIOSes and other fixes
  - ds1307: fix century bit support while staying comaptible with previous
    behaviour by default
  - ds1347: switch to regmap
  - isl12057 is now handled by ds1307
  - omap: support external wakeup
  - rv8803: allow to disable voltage drop detection
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCgAGBQJYASBeAAoJENiigzvaE+LCDO4QAJAi0TV2i0vYaJLDWyCGDx3P
 cts/Su2JdLgeLxilKvyYgwUpp8fsv681ZaZi+a6Jln/cn0MOcWwJoopiC30CSR8M
 9UxmRsFR9Ev/Cm/NZChcsTQwyTHOumnzZzxtnYr0RWOw7s4K68gEQEpWWT7qHTp1
 KVwfIvjAIPcozw25QWWGUWHu22PsI38NTH5Bg+rimMCToNbSDFAm+d62cdeIbkJF
 FoQIut0/Lh5UZ12+T8l0iBydY3bINeo1SZY5yAwQGRzJBecxRccbtKlnUjXnywke
 xAO5KQzegkLPTU4R6ssK/SQfVlDrfG3fkjWNvUEC/Vyw94v2SaFB1XjvlCXwL3mN
 XqzWXeestqFvKRjbYsM0NwsPX4+wxjDNq9YaAhpFYDAA9BL3vREB41qf/dCOFywG
 tqHBRpwN9g7u/72SLJ3icYdjmpaQIQbLF9wl8LJiPrWn4xwTNVIB2u3APcSuxE7/
 q49jD72LyEVhOUyGs0Hev584s4PC2fMoveq52ng0gMVbOtX0A0FJQQMcR2/2DIOp
 GLzPVuupx/8Eck9RFdr06Iv74j/bD7tScfiifZt6LfY5c8K7HOYykoskaRz3XMV4
 gx7Aajb8+jMVvI2TOthIa/WCXktQ8MBWTMZ6vbCxxpIRPBYuDqKmt1hXsYR5s6ql
 fMrn+tWltdRQKGIF2GrR
 =ZqqR
 -----END PGP SIGNATURE-----

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

Pull RTC updates from Alexandre Belloni:
 "RTC for 4.9

  Subsystem:
   - delete owner assignment in multiple drivers
   - constify rtc_class_ops structures

  Drivers:
   - ac100: support clock-output-names
   - cmos: properly handle ACPI alarms and quirky BIOSes and other fixes
   - ds1307: fix century bit support while staying comaptible with
     previous behaviour by default
   - ds1347: switch to regmap
   - isl12057 is now handled by ds1307
   - omap: support external wakeup
   - rv8803: allow to disable voltage drop detection"

* tag 'rtc-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (25 commits)
  rtc: rv8803: set VDETOFF and SWOFF via device tree
  dt/bindings: Add bindings for Micro Crystal rv8803
  devicetree: Add Micro Crystal AG vendor id
  rtc: cmos: avoid unused function warning
  rtc: ac100: Add NULL checking for devm_kzalloc call
  rtc: ds1347: changed raw spi calls to register map calls
  rtc: cmos: Restore alarm after resume
  rtc: cmos: Clear ACPI-driven alarms upon resume
  rtc: omap: Support ext_wakeup configuration
  rtc: cmos: Initialize hpet timer before irq is registered
  rtc: asm9260: rework locking
  rtc: asm9260: allow COMPILE_TEST
  rtc: constify rtc_class_ops structures
  rtc: ac100: support clock-output-names in device tree binding
  rtc: rx6110: remove owner assignment
  rtc: pic32: Delete owner assignment
  rtc: bq32k: Fix handling of oscillator failure flag
  rtc: bq32k: Use correct mask name for 'minutes' register.
  rtc: sysfs: fix a cast removing the const attribute
  Documentation: dt: Intersil isl12057 is not a trivial device
  ...
2016-10-14 13:13:44 -07:00
Lee Jones b304746c2a Merge branches 'ib-mfd-gpio-4.9', 'ib-mfd-gpio-regulator-4.9', 'ib-mfd-input-4.9', 'ib-mfd-regulator-4.9', 'ib-mfd-regulator-4.9.1', 'ib-mfd-regulator-rtc-4.9', 'ib-mfd-regulator-rtc-4.9-1' and 'ib-mfd-rtc-4.9' into ibs-for-mfd-merged 2016-10-04 15:47:01 +01:00
Raghavendra Ganiga ee85bb5bbe rtc: ds1347: changed raw spi calls to register map calls
This patch changes calls of spi read write calls to register map
read and write calls in rtc ds1347

Signed-off-by: Raghavendra Chandra Ganiga <ravi23ganiga@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-09-22 00:14:40 +02:00
Marcin Niestroj 97ea1906b3 rtc: omap: Support ext_wakeup configuration
Support configuration of ext_wakeup sources. This patch makes it
possible to enable ext_wakeup and set it's polarity, depending on board
configuration. AM335x's dedicated PMIC (tps65217) uses ext_wakeup to
notify about power-button presses. Handling power-button presses enables
to recover from RTC-only power states correctly.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-09-21 21:46:04 +02:00
Alexandre Belloni 7f742e8e8a rtc: asm9260: allow COMPILE_TEST
The rtc-asm9260 driver compiles correctly on other architectures, add
COMPILE_TEST to improve code coverage.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-09-05 17:15:50 +02:00
Alexandre Belloni e8aa7dcbf0 rtc: isl12057: remove driver
The Intersil isl12057 is now supported by the ds1307 driver.

Acked-by: Arnaud Ebalard <arno@natisbad.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-08-31 18:21:34 +02:00
Alexandre Belloni 78aaa06d79 rtc: ds1307: add Intersil ISL12057 support
Intersil ISL12057 is a drop-in replacement for DS1337. It can be supported
by the ds1307 driver.

Acked-by: Arnaud Ebalard <arno@natisbad.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-08-31 18:21:34 +02:00
Alexandre Belloni 50d6c0ea81 rtc: ds1307: fix century bit support
Add an option to properly support the century bit of ds1337 and compatibles
and ds1340.
Because the driver had a bug until now, it is not possible to switch users
to the fixed code directly as RTCs in the field will wrongly have the
century bit set.

Acked-by: Arnaud Ebalard <arno@natisbad.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-08-31 18:21:34 +02:00
Wadim Egorov 5d2fd5c79e rtc: Kconfig: Name RK818 in Kconfig for RTC_DRV_RK808
The RK808 and RK818 PMICs are using a similar register map.
We can reuse the rtc driver for the RK818 PMIC. So let's add
the RK818 in the Kconfig description.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-08-31 13:48:57 +01:00
Chen-Yu Tsai d00a18a42c rtc: ac100: Add RTC driver for X-Powers AC100
X-Powers AC100 is a codec / RTC combo chip. This driver supports
the RTC sub-device.

The RTC block also has clock outputs and non-volatile storage.
Non-volatile storage wthin the RTC hardware is not supported.
Clock output support is added in the next patch.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-08-08 12:53:36 +01:00
Benoît Thébaudeau 34166a00ec rtc: rv8803: Kconfig: Indicate rx8900 support
This driver supports the Epson RX8900, but this was not indicated in
Kconfig.

Signed-off-by: Benoît Thébaudeau <benoit@wsystem.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-28 09:59:30 +02:00
Arnd Bergmann d6faca40f4 rtc: move mc146818 helper functions out-of-line
The mc146818_get_time/mc146818_set_time functions are rather large
inline functions in a global header file and are used in several
drivers and in x86 specific code.

Here we move them into a separate .c file that is compiled whenever
any of the users require it. This also lets us remove the linux/acpi.h
header inclusion from mc146818rtc.h, which in turn avoids some
warnings about duplicate definition of the TRUE/FALSE macros.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-06-26 01:20:08 +02:00
Arnd Bergmann 5ee98ab3a8 mn10300: use RTC_DRV_CMOS instead of CONFIG_RTC
nn10300 has a dependency on mc146818_get_time/mc146818_set_time,
which we want to move from the mc146818rtc.h header into the
rtc subsystem, which in turn is not usable on mn10300.

This changes mn10300 to use the modern rtc-cmos driver instead
of the old RTC driver, and that in turn lets us completely
remove the read_persistent_clock/update_persistent_clock callbacks.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-06-26 01:20:08 +02:00
Venkat Prashanth B U 06776c8921 rtc: add support for Maxim max6916
Add support for Maxim max6916 RTC.

Signed-off-by: Venkat Prashanth B U <venkat.prashanth2498@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-06-04 16:05:59 +02:00
Mylène Josserand c2a1c14540 rtc: rv3029: Add support of RV3049
Add support of Microcrystal RV3049 RTC (SPI) using regmap on the
RV3029 (I2C) driver.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-05-21 17:06:52 +02:00
Sergey Yanovich d25a5ed37d rtc: ds1302: rewrite using SPI
DS1302 is an half-duplex SPI device. The driver respects this fact now.
Pin configurations should be implemented using SPI subsystem.

Signed-off-by: Sergei Ianovich <ynvich@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-05-20 12:33:51 +02:00
Alexandre Belloni 399221ccf4 rtc: rv3029: stop mentioning rv3029c2
rv3029c2 is actually rv3029. c2 denotes an option.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-03-15 00:29:33 +01:00
Akinobu Mita 9408ec1af8 rtc: pcf2127: add support for spi interface
pcf2127 has selectable I2C-bus and SPI-bus interface support.

This adds support for SPI interface.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-03-14 17:08:41 +01:00
Michael Büsch a696b31e2f rtc: rv3029: Add thermometer hwmon support
This adds support to
- enable/disable the thermometer
- set the temperature scanning interval
- read the current temperature that is used for temp compensation.
via hwmon interface

Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-03-14 17:08:40 +01:00
Akinobu Mita 080481f54e rtc: merge ds3232 and ds3234
According to "Feature Comparison of the DS323x Real-Time Clocks"
(http://pdfserv.maximintegrated.com/en/an/AN5143.pdf), DS3232 and
DS3234 are very similar.

This merges rtc-ds3232 and rtc-ds3234 with using regmap.
This change also enables to support alarm for ds3234.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Suggested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-03-14 17:08:35 +01:00
Alexandre Belloni 832315b05b rtc: pxa: fix Kconfig indentation
The pxa section is indented using spaces, use tabs.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-03-14 17:08:34 +01:00
Alexandre Belloni 7a587eae2a rtc: enable COMPILE_TEST
There are several arch-specific RTC drivers that can be successfully
compiled on other platforms. Add a COMPILE_TEST dependency for those.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
2016-03-14 17:08:31 +01:00
Alexandre Belloni e0252ec77b rtc: always show I2C
Always show there is an I2C section, like the other sections.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-03-14 17:08:28 +01:00
Laxman Dewangan 726fe738bd rtc: max77686: Add support for MAX20024/MAX77620 RTC IP
Maxim Semiconductor's PMIC MAX77686 has RTC IP which is
reused in the MAX77620/MAX20024 PMICs.

Add support for these devices in MAX77686 RTC driver. This
device does not have RTC alarm pending status outside of
RTC IP. The RTC IP is having separate I2C address for its
register access.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-03-14 17:08:27 +01:00
Alexandre Belloni d2c6b8743b rtc: rv3029: reword Kconfig option
The Kconfig option for rv3029 is not mentioning any part number, explicitly
show rv3029.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-03-14 17:08:25 +01:00
Soren Brinkmann d084885e98 rtc: Group Kconfig entries by vendor
The RTC entries are mostly grouped by vendor. Move the few outliers in
place.
Also, change the one occurrence of 'nxp' to 'NXP' to make all NXP
entries consistent.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-03-14 17:08:22 +01:00
Joshua Henderson 51aa905c91 rtc: pic32: Add PIC32 real time clock driver
This driver adds support for the PIC32 real time clock and calendar
peripheral:
	- reading and setting time
	- alarms provided by dedicated IRQ

Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-03-14 17:08:21 +01:00
Oleksij Rempel 125e550fd2 rtc: add Alphascale asm9260 driver
Add support for RTC controller found on Alphascale asm9260
SoC.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-03-14 17:08:14 +01:00
Andre Przywara 2863934e23 rtc: allow compilation of sun6i RTC for all sunxi SoCs
At the moment the "sun6i" RTC drivers depends on having two specific
SoC families selected.
The Allwinner A64 SoC has the same RTC, so extend the Kconfig option
to allow inclusion of the driver for all Allwinner SoCs.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-03-14 17:08:10 +01:00
Steffen Trumtrar 68298c2dac rtc: add driver for RX6110SA real time clock
The RX6110 comes in two different variants: SPI and I2C.
This driver only supports the SPI variant.

If the need ever arises to also support the I2C variant, this driver
could easily be refactored to support both cases.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-03-14 17:08:10 +01:00
Akinobu Mita 445c02076f rtc: ds1307: add temperature sensor support for ds3231
DS3231 has the temperature registers with a resolution of 0.25
degree celsius.  This enables to get the value through hwmon.

	# cat /sys/class/i2c-adapter/i2c-2/2-0068/hwmon/hwmon0/temp1_input
	21000

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-02-04 23:44:17 +01:00
Arnd Bergmann 04d3ba70a3 rtc: mt6397: add IRQ domain dependency
The mt6397 RTC driver can be built either when the MFD_MT6397 driver
is enabled (which selects IRQ_DOMAIN), or when compile testing.
The latter however fails without IRQ domains:

drivers/rtc/rtc-mt6397.c: In function 'mtk_rtc_probe':
drivers/rtc/rtc-mt6397.c:326:13: error: implicit declaration of function 'irq_create_mapping' [-Werror=implicit-function-declaration]
  rtc->irq = irq_create_mapping(mt6397_chip->irq_domain, res->start);

This adds an explicit dependency for the COMPILE_TEST case.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Eddie Huang <eddie.huang@mediatek.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-02-04 23:44:17 +01:00
Javier Martinez Canillas cd0e7c1e54 rtc: Remove Maxim 77802 driver
The max77686 RTC driver now supports the max77802 RTC as
well so there's no need to have a separate driver anymore.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Andi Shyti <andi.shyti@samsung.com>
Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-02-04 23:44:15 +01:00
Akshay Bhat ed13d89b08 rtc: Add Epson RX8010SJ RTC driver
This driver supports the following functions:
 - reading and setting time
 - alarms when connected to an IRQ
 - reading and clearing the voltage low flags

Datasheet:
http://www.epsondevice.com/docs/qd/en/DownloadServlet?id=ID000956
Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:19:59 +01:00
Alexandre Belloni 1e3929ef0e rtc: Add a driver for Micro Crystal RV8803
This driver supports the following functions:
 - reading and settings time
 - alarms when connected to an IRQ
 - reading and clearing the voltage low flags
 - nvram

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-11-08 14:12:32 +01:00
Ivan Grimaldi fa395fb8fc rtc: ds1390: Add trickle charger device tree binding
Introduce a device tree binding for specifying the trickle charger
configuration for ds1390.

Signed-off-by: Ivan Grimaldi <grimaldi.ivan@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-11-08 14:12:23 +01:00
Suneel Garapati 11143c19eb rtc: add xilinx zynqmp rtc driver
Add support for RTC controller found on Xilinx Zynq Ultrascale+ MPSoC
platform.

Signed-off-by: Suneel Garapati <suneel.garapati@xilinx.com>
Acked-by: Moritz Fischer <moritz.fischer@ettus.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-09-05 19:37:19 +02:00
Rob Herring 3cdf4ad963 rtc: pxa: convert to use shared sa1100 functions
Currently, the rtc-sa1100 and rtc-pxa drivers co-exist as rtc-pxa has a
superset of functionality. Having 2 drivers sharing the same memory
resource is not allowed by the driver model if resources are properly
declared. This problem was avoided by not adding memory resources to the
SA1100 RTC driver, but that prevents clean-up of the SA1100 driver.

This commit converts the PXA RTC to use the exported SA1100 RTC
functions. Now the sa1100-rtc and pxa-rtc devices are mutually
exclusive, so we must remove the sa1100-rtc from pxa27x and pxa3xx.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: rtc-linux@googlegroups.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-09-05 19:37:15 +02:00
S Twiss 80ca3277bc rtc: da9063: Add DA9062 RTC capability to DA9063 RTC driver
Add DA9062 RTC support into the existing DA9063 RTC driver component by
using generic access tables for common register and bit mask definitions.

The following change will add generic register and bit mask support to the
DA9063 RTC. The changes are slightly complicated by requiring support for
three register sets: DA9063-AD, DA9063-BB and DA9062-AA.

The following alterations have been made to the DA9063 RTC:

- Addition of a da9063_compatible_rtc_regmap structure to hold all generic
  registers and bitmasks for this type of RTC component.
- A re-write of struct da9063 to use pointers for regmap and compatible
  registers/masks definitions
- Addition of a of_device_id table for DA9063 and DA9062 defaults
- Refactoring functions to use struct da9063_compatible_rtc accesses to
  generic registers/masks instead of using defines from registers.h
- Re-work of da9063_rtc_probe() to use of_match_node() and dev_get_regmap()
  to provide initialisation of generic registers and masks and access to
  regmap

Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-09-05 13:19:08 +02:00
Joachim Eastwood c28b42e3ae rtc: add rtc-lpc24xx driver
Add driver for the RTC found on NXP LPC178x/18xx/408x/43xx devices.
The RTC provides calendar and clock functionality together with
alarm interrupt support.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-09-05 13:19:06 +02:00
Shawn Guo 8a0fa18436 rtc: snvs: select option REGMAP_MMIO
Select REGMAP_MMIO to fix the following build error seen with x86_64
randconfig.

  drivers/built-in.o: In function `snvs_rtc_probe':
rtc-snvs.c:(.text+0x567730): undefined reference to `devm_regmap_init_mmio_clk'

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Acked-by: Frank Li <Frank.Li@freescale.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-08-11 23:04:47 +08:00
Linus Torvalds 78c10e556e Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle:

 - Improvements to the tlb_dump code
 - KVM fixes
 - Add support for appended DTB
 - Minor improvements to the R12000 support
 - Minor improvements to the R12000 support
 - Various platform improvments for BCM47xx
 - The usual pile of minor cleanups
 - A number of BPF fixes and improvments
 - Some improvments to the support for R3000 and DECstations
 - Some improvments to the ATH79 platform support
 - A major patchset for the JZ4740 SOC adding support for the CI20 platform
 - Add support for the Pistachio SOC
 - Minor BMIPS/BCM63xx platform support improvments.
 - Avoid "SYNC 0" as memory barrier when unlocking spinlocks
 - Add support for the XWR-1750 board.
 - Paul's __cpuinit/__cpuinitdata cleanups.
 - New Malta CPU board support large memory so enable ZONE_DMA32.

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (131 commits)
  MIPS: spinlock: Adjust arch_spin_lock back-off time
  MIPS: asmmacro: Ensure 64-bit FP registers are used with MSA
  MIPS: BCM47xx: Simplify handling SPROM revisions
  MIPS: Cobalt Don't use module_init in non-modular MTD registration.
  MIPS: BCM47xx: Move NVRAM driver to the drivers/firmware/
  MIPS: use for_each_sg()
  MIPS: BCM47xx: Don't select BCMA_HOST_PCI
  MIPS: BCM47xx: Add helper variable for storing NVRAM length
  MIPS: IRQ/IP27: Move IRQ allocation API to platform code.
  MIPS: Replace smp_mb with release barrier function in unlocks.
  MIPS: i8259: DT support
  MIPS: Malta: Basic DT plumbing
  MIPS: include errno.h for ENODEV in mips-cm.h
  MIPS: Define GCR_GIC_STATUS register fields
  MIPS: BPF: Introduce BPF ASM helpers
  MIPS: BPF: Use BPF register names to describe the ABI
  MIPS: BPF: Move register definition to the BPF header
  MIPS: net: BPF: Replace RSIZE with SZREG
  MIPS: BPF: Free up some callee-saved registers
  MIPS: Xtalk: Update xwidget.h with known Xtalk device numbers
  ...
2015-06-27 12:44:34 -07:00
Linus Torvalds c13c810063 RTC for 4.2
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
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJVi7VHAAoJEKbNnwlvZCyzv+YP/1sMAsrusvx3cUEmhJurNk5H
 +vPUdogbr8df9voLkHqTaK1B5+LrL5EXYu+y/6VOwaLIiYv7P9k/eOeZ44fraidc
 H7xnDQ7cOGzE5LpjPg8+o56rh3rGDF1UdZBwbFTgfv4gmZi+GAf+2MEUam+dVVtF
 K9+7Xu77A6EgW+h2uHix8GVtflHdRk/Vxjxl0uOR9BM9O883N5dYYZ7sjenfG65D
 dctAEo+U1xUCw3GCIQ63DvD0joThQk7IB9xJmK/lE5nIv4tbGp5PV8VSNkjKxbFz
 1wa9SR1dhBdjbJ6ZeHh8N5EJ0d5MrssW1blsb7/06MHTu0KYgCndU5EEDOE2pVqD
 GJooYa6RsNqz/KElJ7/0z4T+DJxW7BWaZYRIwv4jpuA4/Y74O5FDw0ULOqxhB8zd
 kVgfWb0feNQikaZio8gOyzIBkw3CBZBu+f6HMJGaeYWSzTNsDLgA8ee7mUawMP31
 ljOxOuPMiTGUbAczK9URo/acZYWNyCOQdm85FxCuwCuPe48m7CyTU6wWBX0Vwj5q
 y3sHH5stcykCesneNj+IJ8v/knqo9d6M43CbCbwBeo0DJskuXF6jjQ9QLBNZP9U0
 7qQa7isL3j3J7T5EouJIBQH2yy4SFiffVOZOPbJ8l+iRUPZUMdOEs2VkQs8BKIZ+
 znu/Ov941h8/HbyI6rcl
 =mugF
 -----END PGP SIGNATURE-----

Merge tag 'rtc-v4.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/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
  ...
2015-06-25 18:55:33 -07:00
Alexandre Belloni 3783055ef4 rtc: remove useless I2C dependencies
Multiple options depend on I2C but are already under under if I2C. Remove
those useless dependencies.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:48 +02:00
Alexandre Belloni 98ab2c938c rtc: whitespace fixes
Some entries in the Kconfig are improperly indented with spaces instead of
tabs.
Also fix whitespaces in Makefile.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:47 +02:00
Xunlei Pang 9c5150b31b rtc: NTP: Add CONFIG_RTC_SYSTOHC_DEVICE for NTP synchronization
Currently, CONFIG_RTC_SYSTOHC uses CONFIG_RTC_HCTOSYS_DEVICE which
is originally used by CONFIG_RTC_HCTOSYS, but this rtc device has
some limiations, for example, it must be battery-backed, be able
to work with irq off and through system suspension, etc.

So add CONFIG_RTC_SYSTOHC_DEVICE used exclusively for CONFIG_RTC_SYSTOHC,
it is more lenient compared to CONFIG_RTC_HCTOSYS_DEVICE, and could
be assigned any available RTC in the system.

Default value is CONFIG_RTC_HCTOSYS_DEVICE which is "rtc0" by default.
After this patch, NTP will sync up "rtc0" by default.

Cc: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:42 +02:00
Hans Ulli Kroll 98a9bb5bf4 rtc: driver for Cortina Gemini
Driver for the on chip RTC found on Cortina's SoC Gemini.

Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
[alexandre.belloni@free-electrons.com: use devm_request_irq() and remove
useless goto]
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:39 +02:00
Alexandre Belloni 20d048ac8b rtc: stmp3xxx select STMP_DEVICE
rtc-stmp3xxx depends on lib/stmp_device, select it.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:39 +02:00
Tianping Fang fc2979118f rtc: mediatek: Add MT6397 RTC driver
Add Mediatek MT6397 RTC driver

Signed-off-by: Tianping Fang <tianping.fang@mediatek.com>
Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:35 +02:00
Jean Delvare fdf8afa188 rtc: xgene: Set hardware dependency
The rtc-xgene driver is only useful on X-Gene SoC.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Iyappan Subramanian <isubramanian@apm.com>
Cc: Keyur Chudgar <kchudgar@apm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25 01:13:34 +02:00
Linus Torvalds 84e9c87e6f == Changes to existing drivers ==
- Constify structures; throughout the subsystem
    - Move support to DT in; cros_ec
    - DT changes and documentation; cros-ec, max77693, max77686, arizona, da9063
    - ACPI changes and documentation; mfd-core
    - Use different platform specific API in; cros_ec_*, arizona-core
    - Remove unused parent field from; cros_ec_i2c
    - Add wake-up/reset delay in; cross_ec_spi, arizona-core
    - Staticise structures/functions in; cros_ec
    - Remove redundant code; arizona-core, max77686
    - Bugfix; twl4030-power
    - Allow compile test; aat2870, tps65910
    - MAINTAINERS adaptions; samsung, syscon
    - Resource Management (devm_*); arizona-core
    - Refactor Reset code; arizona-core
    - Insist on at least one full boot; arizona-core
    - Trivial formatting; arizona-core
    - Add low-power-sleep; arizona-core
    - IRQ ONESHOT changes; twl4030-irq, mc13xxx-core, wm831x-auxadc, htc-i2cpld,
                           wm8350-core, ab8500-debugfs, ab8500-gpadc, si476x-i2c
 
  == (Re-)moved drivers ==
    - Move protocol helpers out to drivers/platform; cros_ec
 
  == New drivers/supported devices ==
    - Add support for AXP22x into axp20x
    - Add support for OnKey into da9063-core
    - Add support for Pinctrl into mt6397-core
    - New STMicroelectronics LPC Watchdog driver
    - New STMicroelectronics LPC Real-Time Clock driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJViWsQAAoJEFGvii+H/HdhBSEP/1nBi6iCwAb0gGJ5HeVKAVGa
 bF9EYM3wMEu64Rb3b4CZGVaI2DWy148vsyDdoOht6gRpaGk9yWz4KR9saG0cemKe
 NC1fqOrY+a6FytqJOcQ51fhcXAn49uqAOzJsTZX3AQ4Z93EXT3ZhF8/shXqUXNc1
 rXzV5enMwco9xnc3+0qzJoA0RaFfZuLB33bxt53GmnJVdnc5b1Haj5t40IN2oDSd
 3pA2MQqVw/j4rGwsYOoTkJHK792X969BJHj9AHESwFYz87/u2f8RQin5xi3RWN/M
 1XtkvURZESA+ewPWbOsq6wiVZd/wm4i2knoqWeXx0S5uKpi48PaljgY/PNYt8cOt
 oC1kVA5oOFIksdue7HG+mJ1EdAd38m3OGDJrivfFCfn8O8U+wsVrmrpS/hPuWQr6
 JTsZKapS77vty+jDSHrCU/F1rd5M7fVucxHqum0YCHz6w+B5CYWY3+qLcVa5zimi
 f3LbcuWI5XsNzuAsW3iqF1M+bPT6G9GRJV30FczX7KQkLNT0++q62lMF4K3mz93m
 avtrmZxFrF0yAP1n4Molz5x8JgfWdyvCSuGGxxfYmGf2v4taLW2BSRFRrWE3WwN3
 KQDzcftt3R7CM50wkIVqKJwBP7pA/UV+PPaRopbPqsdeXnkL+EoYyOpDuQkKsblz
 Q5M3ChB5rsu8trNyMPI6
 =Y02f
 -----END PGP SIGNATURE-----

Merge tag 'mfd-for-linus-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:
 "Changes to existing drivers:
   - Constify structures; throughout the subsystem
   - Move support to DT in; cros_ec
   - DT changes and documentation; cros-ec, max77693, max77686, arizona, da9063
   - ACPI changes and documentation; mfd-core
   - Use different platform specific API in; cros_ec_*, arizona-core
   - Remove unused parent field from; cros_ec_i2c
   - Add wake-up/reset delay in; cross_ec_spi, arizona-core
   - Staticise structures/functions in; cros_ec
   - Remove redundant code; arizona-core, max77686
   - Bugfix; twl4030-power
   - Allow compile test; aat2870, tps65910
   - MAINTAINERS adaptions; samsung, syscon
   - Resource Management (devm_*); arizona-core
   - Refactor Reset code; arizona-core
   - Insist on at least one full boot; arizona-core
   - Trivial formatting; arizona-core
   - Add low-power-sleep; arizona-core
   - IRQ ONESHOT changes; twl4030-irq, mc13xxx-core, wm831x-auxadc, htc-i2cpld,
                          wm8350-core, ab8500-debugfs, ab8500-gpadc, si476x-i2c

  (Re-)moved drivers:
   - Move protocol helpers out to drivers/platform; cros_ec

  New drivers/supported devices:
   - Add support for AXP22x into axp20x
   - Add support for OnKey into da9063-core
   - Add support for Pinctrl into mt6397-core
   - New STMicroelectronics LPC Watchdog driver
   - New STMicroelectronics LPC Real-Time Clock driver"

* tag 'mfd-for-linus-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (59 commits)
  mfd: lpc_ich: Assign subdevice ids automatically
  mfd: si476x-i2c: Pass the IRQF_ONESHOT flag
  mfd: ab8500-gpadc: Pass the IRQF_ONESHOT flag
  mfd: ab8500-debugfs: Pass the IRQF_ONESHOT flag
  mfd: wm8350-core: Pass the IRQF_ONESHOT flag
  mfd: htc-i2cpld: Pass the IRQF_ONESHOT flag
  mfd: wm831x-auxadc: Pass the IRQF_ONESHOT flag
  mfd: mc13xxx-core: Pass the IRQF_ONESHOT flag
  mfd: twl4030-irq: Pass the IRQF_ONESHOT flag
  mfd: mt6397-core: Add GPIO sub-module support
  mfd: arizona: Add convience defines for micd_rate/micd_bias_starttime
  mfd: dt: Add bindings for DA9063 OnKey
  mfd: da9063: Add support for OnKey driver
  mfd: arizona: Fix incorrect Makefile conditionals
  mfd: arizona: Add stub for wm5102_patch()
  mfd: Check ACPI device companion before checking resources
  Documentation: Add WM8998/WM1814 device tree bindings
  mfd: arizona: Split INx_MODE into two fields
  mfd: wm5110: Add delay before releasing reset line
  mfd: arizona: Add better support for system suspend
  ...
2015-06-23 17:31:27 -07:00
Huacai Chen 30ad29bb48 MIPS: Loongson: Naming style cleanup and rework
Currently, code of Loongson-2/3 is under loongson directory and code of
Loongson-1 is under loongson1 directory. Besides, there are Kconfig
options such as MACH_LOONGSON and MACH_LOONGSON1. This naming style is
very ugly and confusing. Since Loongson-2/3 are both 64-bit general-
purpose CPU while Loongson-1 is 32-bit SoC, we rename both file names
and Kconfig symbols from loongson/loongson1 to loongson64/loongson32.

[ralf@linux-mips.org: Resolve a number of simple conflicts.]

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
Cc: Kelvin Cheung <keguang.zhang@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/9790/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2015-06-21 21:53:59 +02:00
Philippe De Muyter 4d61ff6b99 rtc: add rtc-abx80x, a driver for the Abracon AB x80x i2c rtc
This is a basic driver for the ultra-low-power Abracon AB x80x series of RTC
chips. It supports in particular, the supersets AB0805 and AB1805.
It allows reading and writing the time, and enables the supercapacitor/
battery charger.

[arnd@arndb.de: abx805 depends on i2c]
[alexandre.belloni@free-electrons.com: renam buffer from date to buf in abx80x_rtc_read_time()]
Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Paul Bolle <pebolle@tiscali.nl>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-05-05 17:10:10 -07:00
Lee Jones b5b2bdfc28 rtc: st: Add new driver for ST's LPC RTC
ST's Low Power Controller (LPC) controls two devices; watchdog and RTC.
Only one of the devices can be used at any one time.  This is enforced
by the correlating MFD driver.  This portion of the driver-set controls
the Real Time Clock.

Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-04-30 13:21:31 +01:00
Lokesh Vutla 8608976e2b drivers/rtc/Kconfig: update Kconfig for OMAP RTC
RTC is present in AM43xx and DRA7xx also.  Updating the Kconfig to depend
on ARCH_OMAP or ARCH_DAVINCI

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Cc: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-17 09:04:02 -04:00
Baruch Siach ba17220878 rtc: driver for Conexant Digicolor CX92755 on-chip RTC
Add driver for the RTC hardware block on the Conexant CX92755 SoC, from
the Digicolor series of SoCs.  Tested on the Equinox evaluation board for
the CX92755 chip.

[akpm@linux-foundation.org: build command arrays at compile-time]
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-17 09:04:01 -04:00
Linus Torvalds b11a278397 Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kconfig updates from Michal Marek:
 "Yann E Morin was supposed to take over kconfig maintainership, but
  this hasn't happened.  So I'm sending a few kconfig patches that I
  collected:

   - Fix for missing va_end in kconfig
   - merge_config.sh displays used if given too few arguments
   - s/boolean/bool/ in Kconfig files for consistency, with the plan to
     only support bool in the future"

* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kconfig: use va_end to match corresponding va_start
  merge_config.sh: Display usage if given too few arguments
  kconfig: use bool instead of boolean for type definition attributes
2015-02-19 10:36:45 -08:00
Linus Torvalds ea7531ac4a ARM: SoC cleanups
This is a good healthy set of various code removals. Total net delta is 8100
 lines removed.
 
 Among the larger cleanups are:
 
 - Removal of old Samsung S3C DMA infrastructure by Arnd
 - Removal of the non-DT version of the 'lager' board by Magnus Damm
 - General stale code removal on OMAP and Davinci by Rickard Strandqvist
 - Removal of non-DT support on am3517 platforms by Tony Lindgren
 
 ... plus several other cleanups of various platforms across the board.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJU4uYeAAoJEIwa5zzehBx3v58P/RGKt5e4CgCdHKjVhbPmADSE
 FVECT4qrIkf4dFgU5qPCBDCtQn/B3ljxZnq6Hqi8VxYD+pRcXt94R50ZyhGUZ6QF
 GLXU8jDSlY906uJwW+CHZFVLmDjTM4ONLn1ZMRtcdOrU3yGC5rZq9+Kla6ZIE6jb
 mUAFMj6e+NBPYDonq93G7968EdyLJOtK4B2ylPW0+wgSRGIEPibCiNi9yyN4hBFr
 LiaOyY/execKUo2K2BFWkfAZWt7GrwBu/qAkz/9YDRDiikLwFG2UBWbaik5Fj8tf
 v8wvpL6Af6iLpRx1wI/HoCgjFS/g/n4O3svMe7aHGyfrkEAxNtoCKlFscO8w/aLc
 eABNAb5j65it8IHvQMR5RhgqWoQe4XMlDcwsxotTe64GfxpTahdhDmhk7RKAY9Xq
 MyITvtZPTPHTSZHNEDE3HtgHn62ndSinYFhdTaBi2FQxLNCUFl2TKZxpb0r65JI/
 2yOf6hcgWGTgV1VOruAc5SHcSkQOY3SptM4n4F1B0VcDrCphBDYhRTdokELFJIIq
 I47Week8o0f+a4ot/sf0QhU68wVZENgUJO3/Q5Buta+UGSZa4NYH7Ymc159e7hGS
 k+7mCeTJC85F0H/EBWvCcZzbpwiq7jBRAY2PhqYF1EQkefdR/+28o1sX090fVaXD
 n0gXv3/ZDvJB2ryv8lR/
 =tsjK
 -----END PGP SIGNATURE-----

Merge tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC cleanups from Olof Johansson:
 "This is a good healthy set of various code removals.  Total net delta
  is 8100 lines removed.

  Among the larger cleanups are:

   - Removal of old Samsung S3C DMA infrastructure by Arnd
   - Removal of the non-DT version of the 'lager' board by Magnus Damm
   - General stale code removal on OMAP and Davinci by Rickard Strandqvist
   - Removal of non-DT support on am3517 platforms by Tony Lindgren

  ... plus several other cleanups of various platforms across the board"

* tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (47 commits)
  ARM: sirf: drop redundant function and marco declaration
  arm: omap: specify PMUs are for ARMv7 CPUs
  arm: shmobile: specify PMUs are for ARMv7 CPUs
  arm: iop: specify PMUs are for XScale CPUs
  arm: pxa: specify PMUs are for XScale CPUs
  arm: realview: specify PMU types
  ARM: SAMSUNG: remove unused DMA infrastructure
  ARM: OMAP3: Add back Kconfig option MACH_OMAP3517EVM for ASoC
  ARM: davinci: Remove CDCE949 driver
  ARM: at91: remove useless at91rm9200_set_type()
  ARM: at91: remove useless at91rm9200_dt_initialize()
  ARM: at91: move debug-macro.S into the common space
  ARM: at91: remove useless at91_sysirq_mask_rtx
  ARM: at91: remove useless config MACH_AT91SAM9_DT
  ARM: at91: remove useless config MACH_AT91RM9200_DT
  ARM: at91: remove unused mach/memory.h
  ARM: at91: remove useless header file includes
  ARM: at91: remove unneeded header file
  rtc: at91/Kconfig: remove useless options
  ARM: at91/Documentation: add a README for Atmel SoCs
  ...
2015-02-17 09:17:33 -08:00
Joshua Kinard aaaf5fbf56 rtc: add driver for DS1685 family of real time clocks
This adds a driver for the Dallas/Maxim DS1685-family of RTC chips.  It
supports the DS1685/DS1687, DS1688/DS1691, DS1689/DS1693, DS17285/DS17287,
DS17485/DS17487, and DS17885/DS17887 RTC chips.  These chips are commonly
found in SGI O2 and SGI Octane systems.  It was originally derived from a
driver patch submitted by Matthias Fuchs many years ago for use in
EPPC-405-UC modules, which also used these RTCs.  In addition to the
time-keeping functions, this RTC also handles the shutdown mechanism of
the O2 and Octane and acts as a partial NVRAM for the boot PROMS in these
systems.

Verified on both an SGI O2 and an SGI Octane.

Signed-off-by: Joshua Kinard <kumba@gentoo.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-16 17:56:05 -08:00
Gregory CLEMENT a3a4280692 drivers/rtc/rtc-armada38x: add a new RTC driver for recent mvebu SoCs
The new mvebu SoCs come with a new RTC driver. This patch adds the
support for this new IP which is currently found in the Armada 38x
SoCs.

This RTC provides two alarms, but only the first one is used in the
driver. The RTC also allows using periodic interrupts.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Reviewed-by: Arnaud Ebalard <arno@natisbad.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Boris BREZILLON <boris.brezillon@free-electrons.com>
Cc: Lior Amsalem <alior@marvell.com>
Cc: Tawfik Bayouk <tawfik@marvell.com>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-13 21:21:43 -08:00
Arnaud Ebalard 0b2f6228b2 rtc: add support for Abracon AB-RTCMC-32.768kHz-B5ZE-S3 I2C RTC chip
This patch adds support for Abracon AB-RTCMC-32.768kHz-B5ZE-S3
RTC/Calendar module w/ I2C interface.

This support includes RTC time reading and setting, Alarm (1 minute
accuracy) reading and setting, and battery low detection.  The device also
supports frequency adjustment and two timers but those features are
currently not implemented in this driver.  Due to alarm accuracy
limitation (and current lack of timer support in the driver), UIE mode is
not supported.

Signed-off-by: Arnaud Ebalard <arno@natisbad.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Peter Huewe <peter.huewe@infineon.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Thierry Reding <treding@nvidia.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Rob Herring <robherring2@gmail.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Landley <rob@landley.net>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: Kumar Gala <galak@codeaurora.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-13 21:21:43 -08:00
Nicolas Ferre 9cb0a36e0e rtc: at91/Kconfig: remove useless options
As we removed all the !DT boards during 3.19 cycle, we can now remove these
options.

Reported-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-15 15:24:02 +01:00
Christoph Jaeger 6341e62b21 kconfig: use bool instead of boolean for type definition attributes
Support for keyword 'boolean' will be dropped later on.

No functional change.

Reference: http://lkml.kernel.org/r/cover.1418003065.git.cj@linux.com
Signed-off-by: Christoph Jaeger <cj@linux.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-01-07 13:08:04 +01:00