Commit Graph

426 Commits

Author SHA1 Message Date
Andrey Zhizhikin 913880358f This is the 5.4.149 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmFQYpIACgkQONu9yGCS
 aT5nNBAAnao6g0C+ZSPUJrX3Aa9I+dcP8le9T4faUD1E8fa3XSIrDhUrZwhvdI06
 ljos1XzQe60/CJmY1jnfL4TOQqrfS6tLTseVGIhFAtJQorxxQwzuCEq/2sqlYz/A
 BEN1/g1XjXyFMmKw598luTClbHk91pnScxA0ZyJ28lhNeBnpuHKK5+PvqNT2bg6G
 Vc8IGPv7cd48FjfwBzDuWklsQE9FFHPtq2eyhAk6K9QbECnP9wgfdrPx87oyRGN6
 tPtSEhlwNM8EEaFZ1/1zgTgj3n35I3LXGfV19YRid20y1SbwB8yFloidx8SjaAOE
 rMpiyxcDgfYoeHw5WBt+f/QVLx3Ia8uEFgwFSHyD1btNrPGdAlatWgXSrNBLvQuy
 jIoDtqY9L5Ty3T3rBjyDlXl0oUUDD4JyVteGsrXlzVEHa7YaLIhvrcQ6Es09XDZX
 TXPinEMPTohO7/cCVHjXOuREXeYukXLrKuZBBNTutANP9Yx7Tj9yAwVtrnakkv1B
 WykWhjJSmOHcj3q8hm9i1GI8qo3sWIwvM0c8in1OLzA+vpjXPR9onA8PHYidj8LY
 f4E3I2Xp+zBj8WljLgHIJhpwdo8jq5StdYPl0y3Na/ZVU3El3VKtwiT0RieOnKfp
 aOj16+CdbCDpdDZofqu/Zio4Do0RFPsHHeEnfedH38aOw1bjctw=
 =e/m/
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdQaENiSDAlGTDEbB7G51OISzHs0FAmFRuk4ACgkQ7G51OISz
 Hs05Iw/9EJFb9xJJhi1GzCVg6X5rF4Nna8yNwZOtEWtnG3fE0FcJJ1AP8pN0l93v
 yI+c6KbNl30hqI25ji/VEgoLlOOe5/5QctnPXryXrkf4jvoXQC2TZSGhFfznBlYK
 XcfbaYSlCf9fgaFQBDfi9S1/k/8yVDs9QKIKf6aUlXKmNWhF9I3Fp6nQ1cnaZjMp
 tMto2WOilgCFMwb9EuSTuSPHE0bDqmwk7npVQ8/HA2QdMzLySwHVUZKD8vC9Kvsc
 1csT8lkWak+7N5p2RNyrJAORL9OBvhdPZVyh0cMet00T+zDV0aUDpn3/6R4gnFUz
 TmRdG/oRMqlkhQYvKpFiE295AtU41TMjc9Mb0dg9KYCsCh9yTGgZdR0ftYOHFb+o
 wgXBkURAbj7JETTtRBVMRDEV8Zo1iJjpvGmILT8jO7IsQppkTh2JcjI5rnoxUdGB
 eAd5W36aZfnOEPdUpoWf2mNF8bgQodDVYHc8cPlknJPKP3GM6EZDUNEkKRFTe8hD
 /IP4yLrOvqaxP9n82bPNuRTpKM365Q+rmHkPlTof8ZLYCB52gdJBg9/oTVGfuLfE
 o+DtHU1sBuzukyPEJE2okb3D9uqKM0/xnUxhXQqxDFhXMcI5npllQ7FK71FOWtcp
 4YTGwf/Y4DmK0tckzNg1URnzATRR+6b8zjMR1zc9gfUawnBhwWU=
 =zMkr
 -----END PGP SIGNATURE-----

Merge tag 'v5.4.149' into 5.4-2.3.x-imx

This is the 5.4.149 stable release

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
2021-09-27 12:34:19 +00:00
Yu-Tung Chang 409cb0b3d4 rtc: rx8010: select REGMAP_I2C
[ Upstream commit 0c45d3e24ef3d3d87c5e0077b8f38d1372af7176 ]

The rtc-rx8010 uses the I2C regmap but doesn't select it in Kconfig so
depending on the configuration the build may fail. Fix it.

Signed-off-by: Yu-Tung Chang <mtwget@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210830052532.40356-1-mtwget@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-26 14:07:14 +02:00
Andrey Zhizhikin d51b217cf8 This is the 5.4.102 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmBAqDoACgkQONu9yGCS
 aT7R4A//RC4/R+Uc+cX8I2al+B017epRXRtfMDz7cd/dO1SAAhgDi4zrebAxs1XP
 6g/t37NuDZ0rjKxMBRzATSwizDLP9gKpeWCVQTtvlHGf+tm/5sn2bt7pckoPvXvo
 GqXPT4YgUgZQSHE+YG5Rhjtv0xMcOEu9yNTsPNZJU6BDdYJylQX/D97MPVjJjbXJ
 Sz+U98wHt0zIbwkg13/2FZvPMdEKL0z8Ub/SIKDaXfFSPJMDYb/5UcEfdnDctSbI
 B3i2i1/IXa97EmNG/MNDi1zPI2l9+PtRrtIzpfLASRNx3ySceiC25EyDk0mp5JnZ
 czxXJ0NxG9z9Pk9X6Isvaz6X5Nqv70LORTFeZRBEp0ohYbsxH/yBuPZ0T8bukjgU
 MA/uZDQryfeNgBN1aEJlTRCAmGyyD6NIICsNPnetmmowgqYxhHXt0tVafMvWpH9F
 vbM3eHcOfOfNejoQiPqTj5vX7NF0BZGQYa5LywKHeGe5q2nwaMj++Kffj9ERCo49
 OZFylFPiQVdEjse07JJb5vGWQkvvTv1FDB+zb7GVgHwJNnb9Lswv2VQbjdZBS++h
 YUuDSxkhEYR+vdKKLcFBbjAYkJXrpiSeXzywjR5N0c90OJdaBX1kpAbBHHXYiwo1
 P39l5/hsxWljQ1ZJqbeFWr2ef27xDiEz7aPojLUlyjBRgBC4eYc=
 =JSQX
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdQaENiSDAlGTDEbB7G51OISzHs0FAmBBQn0ACgkQ7G51OISz
 Hs1bUw/8C8T64CcvBDZhx2MyFqP5Wmc3h2li2/mAGYBPXnq9bQqhHVwNxBoeOY+d
 8jmPuao6Rb5xWWDCK/7bpshOyM7M4oBKDwJK6tgg9+ntPhllL29H8NYnH+hd45Zm
 oeM9gzKk4DU2jxZMt9BOi/ByrCApVKxcbiddPKmgXqaz568JQg4P10E7D2ceRudq
 uGlZbtEVqw6ftAyygzqiVmioGCwdgd/5BC+HPGcSaodF63z5Dc5LPOG+uefAVxq/
 oXawWdqScGqJXsbbkncgbvNSkIlYdVJIPqnMYrYnD2saAq4qeisrEkUzTUJwRCYT
 CeKxKL6nP4vqzgc21YGyxhtxJf+Sv2pU9QMgN/qfuhG9Nnz+7hQ3TntEjviPf6kC
 73a7cyQeLCVM2uECVN1b3fXweXRvllzkYCsomO5hU2J8mHHcUjJhwyYqsyE80Vpl
 w8qmZcyR0J0BmKXnYISGfe/S77Ze2nqLhOkGmP/PQWiTrULtLR/7wDEOap2xZbmz
 LPqK7nIrTD9lntyksNg1C1Az+So/tZQLh2hCX0C2efGqRyP2UbzoR6HgaI84LWf7
 L6qG9zVjl88lHLPZSO6WpOlxoR8RpmMprHs0bHJS79ucU+XzD0o9LyWhMBm6++qE
 WuDsSYYJtKPl7Qe04uBJNfO8cbmY9YcorYkgAcUz/Ar+QgCT0js=
 =aicv
 -----END PGP SIGNATURE-----

Merge tag 'v5.4.102' into 5.4-2.3.x-imx

This is the 5.4.102 stable release

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
2021-03-04 20:26:33 +00:00
Bartosz Golaszewski d8a9db6dfa rtc: s5m: select REGMAP_I2C
[ Upstream commit 1f0cbda3b452b520c5f3794f8f0e410e8bc7386a ]

The rtc-s5m uses the I2C regmap but doesn't select it in Kconfig so
depending on the configuration the build may fail. Fix it.

Fixes: 959df7778b ("rtc: Enable compile testing for Maxim and Samsung drivers")
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210114102219.23682-2-brgl@bgdev.pl
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-04 10:26:29 +01:00
Jason Liu 5691e22711 Merge tag 'v5.4.47' into imx_5.4.y
* tag 'v5.4.47': (2193 commits)
  Linux 5.4.47
  KVM: arm64: Save the host's PtrAuth keys in non-preemptible context
  KVM: arm64: Synchronize sysreg state on injecting an AArch32 exception
  ...

 Conflicts:
	arch/arm/boot/dts/imx6qdl.dtsi
	arch/arm/mach-imx/Kconfig
	arch/arm/mach-imx/common.h
	arch/arm/mach-imx/suspend-imx6.S
	arch/arm64/boot/dts/freescale/imx8qxp-mek.dts
	arch/powerpc/include/asm/cacheflush.h
	drivers/cpufreq/imx6q-cpufreq.c
	drivers/dma/imx-sdma.c
	drivers/edac/synopsys_edac.c
	drivers/firmware/imx/imx-scu.c
	drivers/net/ethernet/freescale/fec.h
	drivers/net/ethernet/freescale/fec_main.c
	drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
	drivers/net/phy/phy_device.c
	drivers/perf/fsl_imx8_ddr_perf.c
	drivers/usb/cdns3/gadget.c
	drivers/usb/dwc3/gadget.c
	include/uapi/linux/dma-buf.h

Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>
2020-06-19 17:32:49 +08:00
Corentin Labbe 70ca8a95df rtc: max8907: add missing select REGMAP_IRQ
commit 5d892919fdd0cefd361697472d4e1b174a594991 upstream.

I have hit the following build error:

  armv7a-hardfloat-linux-gnueabi-ld: drivers/rtc/rtc-max8907.o: in function `max8907_rtc_probe':
  rtc-max8907.c:(.text+0x400): undefined reference to `regmap_irq_get_virq'

max8907 should select REGMAP_IRQ

Fixes: 94c01ab6d7 ("rtc: add MAX8907 RTC driver")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 08:25:56 +01:00
Jason Liu 335d2828a9 This is the 5.4.24 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl5hHjgACgkQONu9yGCS
 aT6CSBAA0c16mnDb59jgmW/sBj/p/MrlD/WJzLriqiKN5BUsPt9++I5mNj8mG+d2
 Glm4086e8L826zv8oKiZm23xk93on+78ExhVFVZvZNaEUpiRNYCGSuDq2NrHW0z+
 kpagkAFLfCUZFoKtmWo+bpl0YtF4dd/fg7+EjyL6qT1DBs8NVMwZx7i/v0xXv7Wc
 0vsGCLYoBLzcW1FB2d9cfAUPCBuGEzL/7TdifNOXRgI9owGsZndFJgXgIzoBUt/P
 tqB8RLjIupCiMEPtsEAZ/rgEQLPFkb3yrBvgjd1wDI8bHUIQU0clqThKVNvmNSmv
 UTBSNgPAhkP8nZG7X9xCkyfEsUefejBJy66da9n4XTGGrXf9ga0BL0nNrOGwOesr
 m+tNnBSFsbFCMqFopQnt4zZSnaf67AOk2mzxbEu4E+sStyW943aDO9MoRRFgaYGH
 pfie3qOKtKta2MuNTJA+q6F0W9H+V5MtMpwbyuy1/dp2eVln2wewBBMvXYdL1YOy
 E/Z87nsQgalsDynz9m/niv32J4JAxHptyOyROkktDLBSzL5RawNn+Op8X5EtmZOe
 sPkiYicqp9CLmMj13qWXJhtuyNdD4wk6FyyAy6cX9mF44+EZGOBkyNP+n8g789Kn
 sqFJ7sfTfOnwLBFciMA5PaMTGNWROyWXNkvvUzO+9t0CyFAnT2U=
 =abGA
 -----END PGP SIGNATURE-----

Merge tag 'v5.4.24' into imx_5.4.y

Merge Linux stable release v5.4.24 into imx_5.4.y

* tag 'v5.4.24': (3306 commits)
  Linux 5.4.24
  blktrace: Protect q->blk_trace with RCU
  kvm: nVMX: VMWRITE checks unsupported field before read-only field
  ...

Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>

 Conflicts:
	arch/arm/boot/dts/imx6sll-evk.dts
	arch/arm/boot/dts/imx7ulp.dtsi
	arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
	drivers/clk/imx/clk-composite-8m.c
	drivers/gpio/gpio-mxc.c
	drivers/irqchip/Kconfig
	drivers/mmc/host/sdhci-of-esdhc.c
	drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
	drivers/net/can/flexcan.c
	drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
	drivers/net/ethernet/mscc/ocelot.c
	drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
	drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
	drivers/net/phy/realtek.c
	drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
	drivers/perf/fsl_imx8_ddr_perf.c
	drivers/tee/optee/shm_pool.c
	drivers/usb/cdns3/gadget.c
	kernel/sched/cpufreq.c
	net/core/xdp.c
	sound/soc/fsl/fsl_esai.c
	sound/soc/fsl/fsl_sai.c
	sound/soc/sof/core.c
	sound/soc/sof/imx/Kconfig
	sound/soc/sof/loader.c
2020-03-08 18:57:18 +08:00
Alexandre Belloni 105542cea2 rtc: Kconfig: select REGMAP_I2C when necessary
[ Upstream commit 578c2b661e2b1b474ea3571a3c3c6d57bae89e8d ]

Some i2c RTC drivers are using regmap but are not selecting REGMAP_I2C
which may lead to build failures.

Link: https://lore.kernel.org/r/20200127221724.10160-2-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-24 08:37:03 +01:00
Geert Uytterhoeven 806f57ec2b rtc: i2c/spi: Avoid inclusion of REGMAP support when not needed
[ Upstream commit 34719de919af07682861cb0fa2bcf64da33ecf44 ]

Merely enabling I2C and RTC selects REGMAP_I2C and REGMAP_SPI, even when
no driver needs it.  While the former can be moduler, the latter cannot,
and thus becomes built-in.

Fix this by moving the select statements for REGMAP_I2C and REGMAP_SPI
from the RTC_I2C_AND_SPI helper to the individual drivers that depend on
it.

Note that the comment for RTC_I2C_AND_SPI refers to SND_SOC_I2C_AND_SPI
for more information, but the latter does not select REGMAP_{I2C,SPI}
itself, and defers that to the individual drivers, too.

Fixes: 080481f54e ("rtc: merge ds3232 and ds3234")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: kbuild test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20200112171349.22268-1-geert@linux-m68k.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-24 08:36:31 +01:00
Anson Huang 31a37c0612 rtc: imx-rpmsg: Add i.MX RPMSG RTC support
Add i.MX RPMSG RTC support for i.MX7ULP.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2019-11-25 15:45:10 +08:00
Linus Torvalds 9dbd83f665 RTC for 5.4
Subsystem:
  - add debug message when registration fails
 
 New drivers:
  - Amlogic Virtual Wake
  - Freescale FlexTimer Module alarm
 
 Drivers:
  - remove superfluous error messages
  - convert to i2c_new_dummy_device and devm_i2c_new_dummy_device
  - Remove dev_err() usage after platform_get_irq()
  - Set RTC range for: pcf2123, pcf8563, snvs.
  - pcf2127: tamper detection and watchdog support
  - pcf85363: fix regmap issue
  - sun6i: H6 support
  - remove w90x900/nuc900 driver
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEycoQi/giopmpPgB12wIijOdRNOUFAl2HVakACgkQ2wIijOdR
 NOVdJA/+PeTgZT393YT6PeuDda10CqtycZoEQNjP9P0wO9SKPNKVjvejS+H6U2+f
 BaiiGUnOjJ6tgODjfW9OXFTmtly+J7gNxKy2D+Hybzb9AjV36+sQPeiNBQ3EV8EO
 vlJc38ZUwtFVNQWOoH9Ffwqjian9YsJZRJL5F8T6PiBp6YIDlrs0fmzx0Yaesx66
 aSS12DncpEnW+Kt3fknm7C1isCp0A9S4j/60enqqb3aRnN4wdp1XFWIAccToCNY8
 c/Eqq0A38BBp+/1xrWaftOGJ6POkLDfQskQJJjV6QI8jC29DJIVZsRlChDVuYYmF
 K+XJG6SeVvJEP+Be7agWfcE8yXoUR5KqV3zsj3jyHRI4PUc77cpAt3ugXkGuGlmy
 jVotXJmwvvqEODYAyrY91SK7wSqEF3T+FFoUMcyVRvWJ7+8FAyrMfS9HYgpVET+S
 rVVrL2+SIGYYY4Hjt8lzmK2RMW6R35iEHqt7lUpiASaoPwvkXQBs3m+dlgy66UAB
 bjoBRmTpqq9rBUrs1FnJ4Kl9R6WuuSKSEjqhxhR4RqsSeTcZUTZFmWBHVZm//BRg
 8iCqpv1ObnttQLhitfX7mc63lp/n7zUsAKH/rroF/ltNxbMydwiBlqJE7APPiDEp
 mJLIapPbBnaq7YuGmt+ulpQxeEltVbINGNbwZwLF2lGf3FlIQu0=
 =v1mB
 -----END PGP SIGNATURE-----

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

Pull RTC updates from Alexandre Belloni:
 "Two new drivers and the new pcf2127 feature make the bulk of the
  additions. The rest are the usual fixes and new features.

  Subsystem:
   - add debug message when registration fails

  New drivers:
   - Amlogic Virtual Wake
   - Freescale FlexTimer Module alarm

  Drivers:
   - remove superfluous error messages
   - convert to i2c_new_dummy_device and devm_i2c_new_dummy_device
   - Remove dev_err() usage after platform_get_irq()
   - Set RTC range for: pcf2123, pcf8563, snvs.
   - pcf2127: tamper detection and watchdog support
   - pcf85363: fix regmap issue
   - sun6i: H6 support
   - remove w90x900/nuc900 driver"

* tag 'rtc-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (51 commits)
  rtc: meson: mark PM functions as __maybe_unused
  rtc: sc27xx: Remove clearing SPRD_RTC_POWEROFF_ALM_FLAG flag
  dt-bindings: rtc: ds1307: add rx8130 compatible
  rtc: sun6i: Allow using as wakeup source from suspend
  rtc: pcf8563: let the core handle range offsetting
  rtc: pcf8563: remove useless indirection
  rtc: pcf8563: convert to devm_rtc_allocate_device
  rtc: pcf8563: add Microcrystal RV8564 compatible
  rtc: pcf8563: add Epson RTC8564 compatible
  rtc: s35390a: convert to devm_i2c_new_dummy_device()
  rtc: max77686: convert to devm_i2c_new_dummy_device()
  rtc: pcf85363/pcf85263: fix regmap error in set_time
  rtc: snvs: switch to rtc_time64_to_tm/rtc_tm_to_time64
  rtc: snvs: set range
  rtc: snvs: fix possible race condition
  rtc: pcf2127: bugfix: watchdog build dependency
  rtc: pcf2127: add tamper detection support
  rtc: pcf2127: add watchdog feature support
  rtc: pcf2127: bugfix: read rtc disables watchdog
  rtc: pcf2127: cleanup register and bit defines
  ...
2019-09-22 11:05:43 -07:00
Enric Balletbo i Serra 47f11e0b40 mfd / platform: cros_ec: Move cros-ec core driver out from MFD
Now, the ChromeOS EC core driver has nothing related to an MFD device, so
move that driver from the MFD subsystem to the platform/chrome subsystem.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Tested-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2019-09-02 11:33:12 +01:00
Bruno Thomsen 28abbba36a rtc: pcf2127: bugfix: watchdog build dependency
Disable watchdog registation when kernel is build without
watchdog functionality, and enable watchdog core otherwise.
This removes compile errors like the one below:

drivers/rtc/rtc-pcf2127.o: in function `pcf2127_probe.constprop.3':
rtc-pcf2127.c:(.text.unlikely+0x2c8): undefined reference to
`devm_watchdog_register_device'

Watchdog feature in chip will always be configured as
this is safe to do in both cases and minimize code churn.

Reported-by: Hulk Robot <hulkci@huawei.com>
Reported-by: YueHaibing <yuehaibing@huawei.com>
Fixes: bbc597561ce1 ("rtc: pcf2127: add watchdog feature support")
Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
Link: https://lore.kernel.org/r/20190827143656.4734-1-bruno.thomsen@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-08-27 18:24:15 +02:00
Bruno Thomsen 0e735eaae1 rtc: pcf2127: add watchdog feature support
Add partial support for the watchdog functionality of
both PCF2127 and PCF2129 chips.

The programmable watchdog timer is currently using a fixed
clock source of 1Hz. This result in a selectable range of
1-255 seconds, which covers most embedded Linux use-cases.

Clock sources of 4096Hz, 64Hz and 1/60Hz is mostly useful
in MCU use-cases.

Countdown timer not available when using watchdog feature.

Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20190822131936.18772-4-bruno.thomsen@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-08-27 18:24:15 +02:00
Biwen Li 7b0b551dbc rtc: fsl-ftm-alarm: add FTM alarm driver
For the platforms including LS1012A, LS1021A, LS1028A, LS1043A,
LS1046A, LS1088A, LS208xA that has the FlexTimer
module, implementing alarm functions within RTC subsystem
to wakeup the system when system going to sleep (work with RCPM driver).

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Link: https://lore.kernel.org/r/20190813030157.48590-1-biwen.li@nxp.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-08-23 16:20:50 +02:00
Neil Armstrong 6ef35398e8 rtc: Add Amlogic Virtual Wake RTC
The Amlogic Meson GX SoCs uses a special register to store the
time in seconds to wakeup after a system suspend.

In order to be able to reuse the RTC wakealarm feature, this
driver implements a fake RTC device which uses the system time
to deduce a suspend delay.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
[khilman: rebase to v5.3-rc, rework and modernization]
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20190812232850.8016-3-khilman@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-08-22 23:08:32 +02:00
Matti Vaittinen 41a8e19f47 rtc: bd70528: fix driver dependencies
With CONFIG_BD70528_WATCHDOG=m, a built-in rtc driver cannot call
into the low-level functions that are part of the watchdog module:

drivers/rtc/rtc-bd70528.o: In function `bd70528_set_time':
rtc-bd70528.c:(.text+0x22c): undefined reference to `bd70528_wdt_lock'
rtc-bd70528.c:(.text+0x2a8): undefined reference to `bd70528_wdt_unlock'
drivers/rtc/rtc-bd70528.o: In function `bd70528_set_rtc_based_timers':
rtc-bd70528.c:(.text+0x50c): undefined reference to `bd70528_wdt_set'

Add a Kconfig dependency which forces RTC to be a module if watchdog is a
module. If watchdog is not compiled at all the stub functions for watchdog
control are used. compiling the RTC without watchdog is fine.

Fixes: 32a4a4ebf7 ("rtc: bd70528: Initial support for ROHM bd70528 RTC")
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Link: https://lore.kernel.org/r/84462e01e43d39024948a3bdd24087ff87dc2255.1565591387.git.matti.vaittinen@fi.rohmeurope.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-08-12 23:01:25 +02:00
Arnd Bergmann cb3cab0614 rtc: remove w90x900/nuc900 driver
The ARM w90x900 platform is getting removed, so this driver is obsolete.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20190809202749.742267-15-arnd@arndb.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-08-12 22:56:07 +02:00
Linus Torvalds edafb6fe42 RTC for 5.3
Drivers:
  - ds1307: properly handle oscillator failure flags
  - imx-sc: alarm support
  - pcf2123: alarm support, correct offset handling
  - sun6i: add R40 support
  - simplify getting the adapter of an i2c client
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEycoQi/giopmpPgB12wIijOdRNOUFAl0tl5UACgkQ2wIijOdR
 NOVMig/8C7o1tBpm1Kfs3GYjZ5o2SI7m6425OypONOa9U2rFVnFHxVogtIHTC7wa
 SXVFdV+L/MT/xHEbQ3Mfv36cRB0h3Q89NqcVWFkjSGvoqliTIA2F2zsLDHYLDyEO
 AdOc8ztzrTCmlPjrg7d64qxA/l/dPChIhDW1nsMTJY7EXO0lBywcEP0KQsnOrjzD
 lNDskhLuYaL0h1OL2KSrx/81ZZW1MXEyTU5nl4e2JowVYFB0f75P7h79MChmjM35
 wE5WVDH8LqhYHOoVR9fW5sjRpNgdKfFsH8Sh5DGVU3jLGA72v0Eo/c1BHHegumoI
 6X+09nv9D3j4l2z5on5TzXMhvwuLdZQ2VRBdpI1XcVjtYA18UTIXZA8wDRgLTb3b
 MZE31s1WM0vxSiGyaL+hfI9APfX0xSd+BIqVvxhUVPvCGCwWvfLJgQfmlsW4eWOk
 LdmifkLb0Mjf+ym+WH8GvXND+ZeNJ9eUUwVZkGHPhb6SfkLiEAnw3f1czOT1fLDR
 q6i0hG9/+BsiwZMCJt86rDZd1D51FjkNzUH1d///iURvaDhoi41nKaFR45kc5Foc
 WVmnWDWw1yg7K6kUQ3kXsyBkbw0jhdCXGN539rrvbElyL5e5XDUo+3gAEi25CkVe
 DCpxICWO+jvOrjJBHdH3T3HJDa7NbFXWkXOwLXe5M42q7rrgZwY=
 =aJ54
 -----END PGP SIGNATURE-----

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

Pull RTC updates from Alexandre Belloni:
 "A quiet cycle this time.

   - ds1307: properly handle oscillator failure flags

   - imx-sc: alarm support

   - pcf2123: alarm support, correct offset handling

   - sun6i: add R40 support

   - simplify getting the adapter of an i2c client"

* tag 'rtc-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (37 commits)
  rtc: wm831x: Add IRQF_ONESHOT flag
  rtc: stm32: remove one condition check in stm32_rtc_set_alarm()
  rtc: pcf2123: Fix build error
  rtc: interface: Change type of 'count' from int to u64
  rtc: pcf8563: Clear event flags and disable interrupts before requesting irq
  rtc: pcf8563: Fix interrupt trigger method
  rtc: pcf2123: fix negative offset rounding
  rtc: pcf2123: add alarm support
  rtc: pcf2123: use %ptR
  rtc: pcf2123: port to regmap
  rtc: pcf2123: remove sysfs register view
  rtc: rx8025: simplify getting the adapter of a client
  rtc: rx8010: simplify getting the adapter of a client
  rtc: rv8803: simplify getting the adapter of a client
  rtc: m41t80: simplify getting the adapter of a client
  rtc: fm3130: simplify getting the adapter of a client
  rtc: tegra: Drop MODULE_ALIAS
  rtc: sun6i: Add R40 compatible
  dt-bindings: rtc: sun6i: Add the R40 RTC compatible
  dt-bindings: rtc: Convert Allwinner A31 RTC to a schema
  ...
2019-07-17 10:03:50 -07:00
Linus Torvalds 8de262531f - Core Frameworks
- Set 'struct device' fwnode when registering a new device
 
  - New Drivers
    - Add support for ROHM BD70528 PMIC
 
  - New Device Support
    - Add support for LP87561 4-Phase Regulator to TI LP87565 PMIC
    - Add support for RK809 and RK817 to Rockchip RK808
    - Add support for Lid Angle to ChromeOS core
    - Add support for CS47L15 CODEC to Madera core
    - Add support for CS47L92 CODEC to Madera core
    - Add support for ChromeOS (legacy) Accelerometers in ChromeOS core
    - Add support for Add Intel Elkhart Lake PCH to Intel LPSS
 
  - New Functionality
    - Provide regulator supply information when registering; madera-core
    - Additional Device Tree support; lp87565, madera, cros-ec, rohm,bd71837-pmic
    - Allow over-riding power button press via Device Tree; rohm-bd718x7
    - Differentiate between running processors; cros_ec_dev
 
  - Fix-ups
    - Big header file update; cros_ec_commands.h
    - Split header per-subsystem; rohm-bd718x7
    - Remove superfluous code; menelaus, cs5535-mfd, cs47lXX-tables
    - Trivial; sorting, coding style; intel-lpss-pci
    - Only remove Power Off functionality if set locally; rk808
    - Make use for Power Off Prepare(); rk808
    - Fix spelling mistake in header guards; stmfx
    - Properly free IDA resources
    - SPDX fixups; cs47lXX-tables, madera
    - Error path fixups; hi655x-pmic
 
  - Bug Fixes
    - Add missing break in case() statement
    - Repair undefined behaviour when not initialising variables; arizona-core, madera-core
    - Fix reference to Device Tree documentation; madera
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAl0sLxgACgkQUa+KL4f8
 d2E25Q/9HmDJIdfyDQg0xv5IM5HS1WsP9BcJCEgoRIsad4mMDRYt+ZeLbslwMhue
 E9tsFH359gGvyqR+7d6hPpEUET1UEcJy4eRD1zAc0+epllQTDHSy8oHt1dtH+8xB
 2AU5rvAKOqBk83D+V2Hkx2KcroWEQQNYIoR9/12Pi3xmEB1uaCO0/Ajd3B28bIBM
 Tzi3cVQ3U7jY9EIM44GVTsjDAbMSkQR0iab6cQF0vJAWaUmGKlsO7iRrU1XkN69V
 qXyBauI8WGiGssihrE8r+jYvHvmg7hA9OKZIckUaMXD/k7kpHbwIaFRh7gukq4Re
 Q6Cy30NfVJ1tY66/5oqN6gj5znfeuEudMCCzYAkzlROSp5eApe2Ke5ajYn3kOCZd
 ZKcsrw9Fiox1lKmuWXDbyf0nqf4zwdDPAnShRWaaF5aipwgywyGcwSigVtK4F0P5
 Hjc5RLv7GjTAJq+ZzwgKyAdtx8L0mhdLd1ZTQpEXk/g/E9dW4GF72hWj9TQ/9BnA
 ZflKv8aP3lDGRHgO3Huwi4lMzskB8BVCQMCFwLwGs5cY1oZQhAjTdJzBZjTGexhC
 evuuA8OUsCrOWMvnZf3saSdHJ1iMHtfPnqEGHRJQtNj4fFaXv80LasIomvvfJc1/
 9JlRyAgm2pF7YDrgTh65ZzBb324eKSZZoAj9XZbnTyzxUAcF69A=
 =A3jw
 -----END PGP SIGNATURE-----

Merge tag 'mfd-next-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:
 "Core Frameworks:
   - Set 'struct device' fwnode when registering a new device

  New Drivers:
   - Add support for ROHM BD70528 PMIC

  New Device Support:
   - Add support for LP87561 4-Phase Regulator to TI LP87565 PMIC
   - Add support for RK809 and RK817 to Rockchip RK808
   - Add support for Lid Angle to ChromeOS core
   - Add support for CS47L15 CODEC to Madera core
   - Add support for CS47L92 CODEC to Madera core
   - Add support for ChromeOS (legacy) Accelerometers in ChromeOS core
   - Add support for Add Intel Elkhart Lake PCH to Intel LPSS

  New Functionality:
   - Provide regulator supply information when registering; madera-core
   - Additional Device Tree support; lp87565, madera, cros-ec, rohm,bd71837-pmic
   - Allow over-riding power button press via Device Tree; rohm-bd718x7
   - Differentiate between running processors; cros_ec_dev

  Fix-ups:
   - Big header file update; cros_ec_commands.h
   - Split header per-subsystem; rohm-bd718x7
   - Remove superfluous code; menelaus, cs5535-mfd, cs47lXX-tables
   - Trivial; sorting, coding style; intel-lpss-pci
   - Only remove Power Off functionality if set locally; rk808
   - Make use for Power Off Prepare(); rk808
   - Fix spelling mistake in header guards; stmfx
   - Properly free IDA resources
   - SPDX fixups; cs47lXX-tables, madera
   - Error path fixups; hi655x-pmic

  Bug Fixes:
   - Add missing break in case() statement
   - Repair undefined behaviour when not initialising variables; arizona-core, madera-core
   - Fix reference to Device Tree documentation; madera"

* tag 'mfd-next-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (45 commits)
  mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk
  mfd: madera: Fixup SPDX headers
  mfd: madera: Remove some unused registers and fix some defaults
  mfd: intel-lpss: Release IDA resources
  mfd: intel-lpss: Add Intel Elkhart Lake PCH PCI IDs
  mfd: cs5535-mfd: Remove ifdef OLPC noise
  mfd: stmfx: Fix macro definition spelling
  dt-bindings: mfd: Add link to ROHM BD71847 Datasheet
  MAINAINERS: Swap words in INTEL PMIC MULTIFUNCTION DEVICE DRIVERS
  mfd: cros_ec_dev: Register cros_ec_accel_legacy driver as a subdevice
  mfd: rk808: Prepare rk805 for poweroff
  mfd: rk808: Check pm_power_off pointer
  mfd: cros_ec: differentiate SCP from EC by feature bit
  dt-bindings: Add binding for cros-ec-rpmsg
  mfd: madera: Add Madera core support for CS47L92
  mfd: madera: Add Madera core support for CS47L15
  mfd: madera: Update DT bindings to add additional CODECs
  mfd: madera: Add supply mapping for MICVDD
  mfd: madera: Fix potential uninitialised use of variable
  mfd: madera: Fix bad reference to pinctrl.txt file
  ...
2019-07-15 20:18:40 -07:00
YueHaibing f2f5cb6a73 rtc: pcf2123: Fix build error
If REGMAP_SPI is m and RTC_DRV_PCF2123 is y,

drivers/rtc/rtc-pcf2123.o: In function `pcf2123_probe':
rtc-pcf2123.c:(.text+0xb2b): undefined reference to `__devm_regmap_init_spi'

Select REGMAP_SPI as RTC_DRV_DS1347 driver does.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 790d033933 ("rtc: pcf2123: port to regmap")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190704085542.48180-1-yuehaibing@huawei.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-07-13 21:31:37 +02:00
Lee Jones 8e23cee84c Merge branches 'ib-mfd-clk-gpio-power-regulator-rtc-5.3', 'ib-mfd-clk-regulator-rtc-5.3', 'ib-mfd-cros-5.3' and 'ib-mfd-regulator-5.3' into ibs-for-mfd-merged 2019-07-02 12:10:53 +01:00
Tony Xie dc79054a64 rtc: rk808: Add RK809 and RK817 support.
RK809 and RK817 are power management IC chips for multimedia products.
Most of their functions and registers are same, including the rtc.

Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2019-06-27 14:57:53 +01:00
Matti Vaittinen 32a4a4ebf7 rtc: bd70528: Initial support for ROHM bd70528 RTC
Support RTC block in ROHM bd70528 power management IC. Support
getting and setting the time and date as well as arming an alarm
which can also be used to wake the PMIC from standby state.

HW supports wake interrupt only for the next 24 hours (sec, minute
and hour information only) so we limit also the alarm interrupt to
this 24 hours for the sake of consistency.

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2019-06-27 10:57:24 +01:00
Michał Mirosław 9c3f0795e4 rtc: tps65910: remove superfluous Kconfig dependency
TPS65910 entry is already under 'if RTC_CLASS' - remove superfluous
dependency.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-06-01 23:12:45 +02:00
Thomas Gleixner ec8f24b7fa treewide: Add SPDX license identifier - Makefile/Kconfig
Add SPDX license identifiers to all Make/Kconfig files which:

 - Have no license information of any form

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

  GPL-2.0-only

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-21 10:50:46 +02:00
Linus Torvalds 8e4ff713ce RTC for 5.2
Subsystem:
  - set_mmss and set_mmss64 rtc_ops removal
  - Fix timestamp value for RTC_TIMESTAMP_BEGIN_1900
  - Use SPDX identifier for the core
  - validate upper bound of tm->tm_year
 
 New driver:
  - Aspeed BMC SoC RTC
 
 Drivers:
  - abx80x: use rtc_add_group
  - ds3232: nvram support
  - pcf85063: add alarm, nvram, offset correction and microcrystal rv8263 support
  - x1205: add of_match_table
  - Use set_time instead of set_mms/set_mmss64 for: ab3100, coh901331, digicolor,
    ds1672, ds2404, ep93xx, imxdi, jz4740, lpc32xx, mc13xxx, mxc, pcap, stmp3xxx,
    test, wm831x, xgene.
  - Set RTC range for: ab3100, at91sam9, coh901331, da9063, digicolor, dm355evm,
    ds1672, ds2404, ep39xx, goldfish, imxdi, jz4740, lpc32xx, mc13xxx, mv, mxc,
    omap, pcap, pcf85063, pcf85363, ps3, sh, stmp3xxx, sun4v, tegra, wm831x,
    xgene.
  - Switch to rtc_time64_to_tm/rtc_tm_to_time64 for the driver that properly set
    the RTC range.
  - Use dev_get_drvdata instead of multiple indirections.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEXx9Viay1+e7J/aM4AyWl4gNJNJIFAlzTOucACgkQAyWl4gNJ
 NJI+0A//e4Z+pKNWnJnjMn/C15/4dxVxM2SJy02Pl31X9vLKuux/6idU1oBnbfxv
 EFZPGwDnl+3MPnl+8fzb5s/G+FN363LL1I3e3tOhdJHbrBdYjvVUJpyv2/nouDaU
 uGDIrYt+3ahMczfqWKn+5fSnwej7un5r++19hUVrD1M9fLXrT3Q7ZcY6kuhzX8Eb
 MOeJz/NwMeUv5I1yxRZUVQuiTMvgNQZUjc9Vn2Xq/SeIoqk9DSA7Sr/r3AvzmXPW
 o7a0IE4fa7VhNxMG0/SlFFdvhlDxE/f6rafPBEicAp9MSbt+5BVPbdXdCALbwcQS
 5BKR0eOTF6ivLjLacu0hCHrb+CHeY3PUR7LCNyc4Bh1064Yi9/6b/oKrNkf02EMn
 HKXSi5MPnZFZQTJAlKHTP8MytTV0Qz1TzRcItg8ZiAwg3RCDC5n4CTiFJAgzzNZ+
 TTwmDDZOhKaqsLX1NhTE/rID3GtQA76NPcsauRygUIEkaL5y7miFTqEqSE1uoou4
 1MHMnjfvFgluIBQzxSv8XOeI2tS4Oan7ju/h3qcxsGsItYosqzDg7SgMCW7nDqSs
 XD0ltk3kiUI1+VBBoIXknNdyazwzG359jlLuWGyYAqn1MJpfGeOz9dlz0wuB6Zm4
 7i5SUFjVHTxhQzSE//PiKRb6CP9PJwDHPQ/VV1FuoXO8Jt7+jAs=
 =NyAx
 -----END PGP SIGNATURE-----

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

Pull RTC updates from Alexandre Belloni:
 "A huge series from me this cycle. I went through many drivers to set
  the date and time range supported by the RTC which helps solving HW
  limitation when the time comes (as early as next year for some). This
  time, I focused on drivers using .set_mms and .set_mmss64, allowing me
  to remove those callbacks. About a third of the patches got reviews, I
  actually own the RTCs and I tested another third and the remaining one
  are unlikely to cause any issues.

  Other than that, a single new driver and the usual fixes here and there.

  Summary:

  Subsystem:

   - set_mmss and set_mmss64 rtc_ops removal

   - Fix timestamp value for RTC_TIMESTAMP_BEGIN_1900

   - Use SPDX identifier for the core

   - validate upper bound of tm->tm_year

  New driver:

   - Aspeed BMC SoC RTC

  Drivers:

   - abx80x: use rtc_add_group

   - ds3232: nvram support

   - pcf85063: add alarm, nvram, offset correction and microcrystal
     rv8263 support

   - x1205: add of_match_table

   - Use set_time instead of set_mms/set_mmss64 for: ab3100, coh901331,
     digicolor, ds1672, ds2404, ep93xx, imxdi, jz4740, lpc32xx, mc13xxx,
     mxc, pcap, stmp3xxx, test, wm831x, xgene.

   - Set RTC range for: ab3100, at91sam9, coh901331, da9063, digicolor,
     dm355evm, ds1672, ds2404, ep39xx, goldfish, imxdi, jz4740, lpc32xx,
     mc13xxx, mv, mxc, omap, pcap, pcf85063, pcf85363, ps3, sh,
     stmp3xxx, sun4v, tegra, wm831x, xgene.

   - Switch to rtc_time64_to_tm/rtc_tm_to_time64 for the driver that
     properly set the RTC range.

   - Use dev_get_drvdata instead of multiple indirections"

* tag 'rtc-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (177 commits)
  rtc: snvs: Use __maybe_unused instead of #if CONFIG_PM_SLEEP
  rtc: imxdi: remove unused variable
  rtc: drop set_mms and set_mmss64
  rtc: pcap: convert to SPDX identifier
  rtc: pcap: use .set_time
  rtc: pcap: switch to rtc_time64_to_tm/rtc_tm_to_time64
  rtc: pcap: set range
  rtc: digicolor: convert to SPDX identifier
  rtc: digicolor: use .set_time
  rtc: digicolor: set range
  rtc: digicolor: fix possible race condition
  rtc: jz4740: convert to SPDX identifier
  rtc: jz4740: rework invalid time detection
  rtc: jz4740: use dev_pm_set_wake_irq() to simplify code
  rtc: jz4740: use .set_time
  rtc: jz4740: remove useless check
  rtc: jz4740: switch to rtc_time64_to_tm/rtc_tm_to_time64
  rtc: jz4740: set range
  rtc: 88pm860x: prevent use-after-free on device remove
  rtc: Use dev_get_drvdata()
  ...
2019-05-09 14:46:33 -07:00
Alexandre Belloni 169680dee7 rtc: remove unnecessary Kconfig dependencies
Remove the unused "depends on I2C" as the config options are already
guarded by if I2C.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-04 10:07:11 +02:00
Alexandre Belloni e89b60d028 rtc: pcf85063: switch to regmap
Switch to regmap to simplify register accesses and remove the need for
pcf85063_stop_clock/pcf85063_start_clock.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-04 10:07:11 +02:00
Joel Stanley 184a182ed5 rtc: Add ASPEED RTC driver
Read and writes the time to the non-battery backed RTC in the ASPEED BMC
system on chip families.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-04 10:07:10 +02:00
Alexandre Belloni 1a76a77c88 rtc: at91sam9: drop platform_data support
ARCH_AT91 is DT only for a while, drop platform data support.

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-04 10:07:09 +02:00
Alexandre Belloni 6a6ec8c15d rtc: goldfish: allow building on more than MIPS
Goldfish can be ARM or x86, allow building the driver for more than just
MIPS.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-04 10:07:08 +02:00
Alexandre Belloni 22e7d5148d rtc: sd3078: fix manufacturer name
The proper manufacturer name is Shenzhen whwave.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-03-20 13:10:57 +01:00
Linus Torvalds f47d633134 chrome platform changes for v5.1
1. SPDX identifier cleanup for platform/chrome
 2. Cleanup series between mfd and chrome/platform, moving
    cros-ec attributes from mfd/cros_ec_dev to sub-drivers in platform/chrome.
 3. Wilco EC driver
 4. Maintainership change to new group repository.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE6gYDF28Li+nEiKLaHwn1ewov5lgFAlyG4dIACgkQHwn1ewov
 5lhoqA//SXO5HU1qkhfvwUKyNsYxtIj4wDQF+j9tAPbVaOOaztq0b5D1PQgDGcEL
 SDl9FAXZtwhmPr5xiGPrPUxwn4JG+tUcgSSgIOCtClpA/SZUPt2wekAB64hLt1ui
 nkBRSgeRnXeeRE0nDh7EUrwAeaYj6yCg4AS8FMHmjWTG0tI6iivhuc39v/zDV8Br
 f4chOu/KEWS/EhItVlDBHE0mYDW2JGLSD3nqJR9MdujvYzbkN5WusJIXBDK6MOUl
 z1gqptVYyq/FQOQOCZ+vHjTNVYQ3N3NbPOnnQn4xAyYiqTQJVJv+x6dd7htncjVO
 567PFbbqbKzqrGWZOrdksxVa4JkIGfcgNG2mskRYKpEtHVOpMlHxwHqKv/93TQvw
 F0z4+43ZeAo0Fx2k+oOiDylpClDvUVOeH0z5suqIK15MZbpfWZF6d38Pz1Zwd8hY
 0TEldpyH83HiXylEuYabBwq3ABfj4VncYcMWfaW517LUrnH9nkJDNOlXQFreGTPt
 uHQPz+Xzfirk9wNwlEtfhqh3fjRWIfmiHc8bLmCB2XuJqavF0pozoQnJprw+72LR
 h4ALkUBr8laVfXYgG8SzNm/K4DlMjKqvJRY6m2b7AY8CTVgMur7ct0WJsvmECF+4
 2XDDvHwkQJt3XifVLpLgFRfR5YRlFxjwMNS8Zq0Bb/gjRqSSCo4=
 =2nC0
 -----END PGP SIGNATURE-----

Merge tag 'tag-chrome-platform-for-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux

Pull chrome platform updates from Benson Leung:

 - SPDX identifier cleanup for platform/chrome

 - Cleanup series between mfd and chrome/platform, moving cros-ec
   attributes from mfd/cros_ec_dev to sub-drivers in platform/chrome

 - Wilco EC driver

 - Maintainership change to new group repository

* tag 'tag-chrome-platform-for-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
  platform/chrome: fix wilco-ec dependencies
  platform/chrome: wilco_ec: Add RTC driver
  platform/chrome: wilco_ec: Add support for raw commands in debugfs
  platform/chrome: Add new driver for Wilco EC
  platform/chrome: cros_ec: Remove cros_ec dependency in lpc_mec
  MAINTAINERS: chrome-platform: change the git tree to a chrome-platform group git tree
  platform/chrome: cros_ec_sysfs: remove pr_fmt() define
  platform/chrome: cros_ec_lightbar: remove pr_fmt() define
  platform/chrome: cros_kbd_led_backlight: switch to SPDX identifier
  platform/chrome: cros_ec_spi: switch to SPDX identifier
  platform/chrome: cros_ec_proto: switch to SPDX identifier
  platform/chrome: cros_ec_lpc: switch to SPDX identifier
  platform/chrome: cros_ec_i2c: switch to SPDX identifier
  platform/chrome: cros_ec_vbc: switch to SPDX identifier
  platform/chrome: cros_ec_sysfs: switch to SPDX identifier
  platform/chrome: cros_ec_lightbar: switch to SPDX identifier
  platform/chrome: cros_ec_debugfs: switch to SPDX identifier
  platform/chrome: cromeos_pstore: switch to SPDX identifier
2019-03-12 09:46:32 -07:00
Biju Das 51f896ffd1 rtc: rx8581: Add support for Epson rx8571 RTC
Add support for Epson rx8571 real-time clock. rx8571 rtc is compatible
with rx8581,except that rx8571 has additional 16 bytes of RAM.

16 bytes of nvmem is supported and exposed in sysfs (# is the instance
number,starting with 0): /sys/bus/nvmem/devices/rx8571-#/nvmem

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-03-02 22:20:58 +01:00
Nick Crews 0d2f2a3da1 platform/chrome: wilco_ec: Add RTC driver
This Embedded Controller has an internal RTC that is exposed
as a standard RTC class driver with read/write functionality.

The driver is added to the drivers/rtc/ so that the maintainer of that
directory will be able to comment on this change, as that maintainer is
the expert on this system. In addition, the driver code is called
indirectly after a corresponding device is registered from core.c,
as opposed to core.c registering the driver callbacks directly.

To test:
> hwclock --show --rtc /dev/rtc1
2007-12-31 16:01:20.460959-08:00
> hwclock --systohc --rtc /dev/rtc1
> hwclock --show --rtc /dev/rtc1
2018-11-29 17:08:00.780793-08:00

> hwclock --show --rtc /dev/rtc1
2007-12-31 16:01:20.460959-08:00
> hwclock --systohc --rtc /dev/rtc1
> hwclock --show --rtc /dev/rtc1
2018-11-29 17:08:00.780793-08:00

Signed-off-by: Duncan Laurie <dlaurie@google.com>
Signed-off-by: Nick Crews <ncrews@chromium.org>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
[Fix the sparse warning: symbol 'wilco_ec_rtc_read/write' was not declared]
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
2019-02-21 21:36:53 +01:00
Artem Panfilov 67075b63cc rtc: add AB-RTCMC-32.768kHz-EOZ9 RTC support
This patch adds support for AB-RTCMC-32.768kHz-EOZ9 RTC/Calendar
module with I2C interface.

Signed-off-by: Artem Panfilov <panfilov.artyom@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-02-18 22:39:30 +01:00
Alexandre Belloni 3cbb7b638f rtc: hid-sensor-time: stop selecting IIO
Make RTC_DRV_HID_SENSOR_TIME depend on IIO and HID_SENSOR_HUB to remove
possible circular dependencies as this is the only symbol selecting those.

Suggested-by: Florian Lohoff <f@zz.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-02-17 21:29:10 +01:00
Alexandre Belloni e6e7376cfd rtc: rv3028: add new driver
Add a driver for the MicroCrystal RV-3028. It is a SMT Real-Time Clock
Module that incorporates an integrated CMOS circuit together with an XTAL.
It has an i2c interface.

The driver handles date/time, alarms, trickle charging, timestamping,
frequency offset correction, EEPROM and NVRAM.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-02-17 21:29:10 +01:00
Martin Blumenstingl d8fe6009aa rtc: support for the Amlogic Meson RTC
Add support for the RTC block on the 32-bit Amlogic Meson6, Meson8,
Meson8b and Meson8m2 SoCs.

The RTC is split in to two parts, which are both managed by this driver:
- the AHB front end
- and a simple serial connection to the actual registers

The RTC_COUNTER register which holds the time is 32-bits wide.

There are four 32-bit wide (in total: 16 bytes) "regmem" registers which
are exposed using nvmem. On Amlogic's 3.10 kernel this is used to store
data which needs to survive a suspend / resume cycle.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
[resurrected Ben's patches after 2 years]
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-02-11 09:41:21 +01:00
Alexandre Belloni 7dd63ec076 rtc: imx-sc: depend on HAVE_ARM_SMCCC
Fix the following build issue:

drivers/rtc/rtc-imx-sc.o: In function `imx_sc_rtc_set_time':
>> rtc-imx-sc.c:(.text+0x212): undefined reference to `__arm_smccc_smc'

Fixes: 13a929f38a ("rtc: imx-sc: add rtc set time support")
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-02-08 12:08:39 +01:00
Jan Kotas 42986fb811 rtc: Add Cadence RTC driver
This patch adds a driver for Cadence RTC controller.

It can be enabled with RTC_DRV_CADENCE Kconfig option.
It supports waking system from sleep modes.

Signed-off-by: Jan Kotas <jank@cadence.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-01-22 19:18:27 +01:00
Dianlong Li 1d67a23210 rtc: sd3078: new driver.
The sd3078 is a combination RTC and SRAM device with I2C interface.

Signed-off-by: Dianlong Li <long17.cool@163.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-01-10 21:51:22 +01:00
Anson Huang e01b578195 rtc: add i.MX system controller RTC support
i.MX8QXP is an ARMv8 SoC which has a Cortex-M4 system controller
inside, the system controller is in charge of controlling power,
clock and secure rtc etc..

This patch adds i.MX system controller RTC driver support,
Linux kernel has to communicate with system controller via MU
(message unit) IPC to set/get RTC time and other alarm functions,
since the RTC set time needs to be done in secure EL3 mode (required
by system controller firmware) and alarm functions needs to be done
with general MU IRQ handle, these depend on other components which
are NOT ready, so this patch ONLY enables the RTC time read.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-12-20 12:47:40 +01:00
Alexandre Belloni 8ddeb09de1 rtc: ds1685: drop RTC_DS1685_PROC_REGS
/proc is not the correct ABI to display debugging info. Remove
RTC_DS1685_PROC_REGS as the driver hasn't seen any real development since
it was included.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-09-28 14:21:00 +02:00
Jeremy Gebben 749e36d0a0 rtc: abx80x: add basic watchdog support
The abx804 and abx805 chips have support for a simple watchdog
function that can trigger an external reset.

Signed-off-by: Jeremy Gebben <jgebben@sweptlaser.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-09-12 12:02:21 +02:00
Paul Cercueil 1e6e4e169a rtc: jz4740: Drop dependency on MACH_INGENIC
Depending on MACH_INGENIC prevent us from creating a generic kernel that
works on more than one MIPS board. Instead, we just depend on MIPS being
set.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-08-27 22:59:37 +02:00
Heiner Kallweit 6b583a64fd rtc: ds1307: simplify hwmon config
We don't have to define an extra config symbol, IS_REACHABLE does
what we need. And having this config symbol just to save the few
bytes of hwmon support on non-DS3231 chips isn't worth it IMO
(especially as the symbol is set per default).

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-08-16 07:46:41 +02:00
Alexandre Belloni a41efe03e6 rtc: ds1685: remove sysfs access to control registers
Access to the control registers is mostly not needed and can cause runtime
issues (like missed interrupts). Remove this debugging interface.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-06-20 12:38:14 +02:00
Mathieu Malaterre b9ef86084d rtc: jz4740: Fix a typo in Kconfig
Fix typo introduced for RTC_DRV_JZ4740 in commit 586655d278 ("rtc:
jz4740: make the driver buildable as a module again").

Signed-off-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-05-31 23:02:11 +02:00