Linus Torvalds
5ceabb6078
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
...
Pull misc vfs updates from Al Viro:
"Assorted stuff pile - no common topic here"
* 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
whack-a-mole: don't open-code iminor/imajor
9p: fix misuse of sscanf() in v9fs_stat2inode()
audit_alloc_mark(): don't open-code ERR_CAST()
fs/inode.c: make inode_init_always() initialize i_ino to 0
vfs: don't unnecessarily clone write access for writable fds
2021-02-27 08:07:12 -08:00
Al Viro
6f24784f00
whack-a-mole: don't open-code iminor/imajor
...
several instances creeped back into the tree...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
2021-02-23 10:25:29 -05:00
Linus Torvalds
6ff6f86bc4
Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
...
Pull ARM updates from Russell King:
- Generalise byte swapping assembly
- Update debug addresses for STI
- Validate start of physical memory with DTB
- Do not clear SCTLR.nTLSMD in decompressor
- amba/locomo/sa1111 devices remove method return type is void
- address markers for KASAN in page table dump
* tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
ARM: 9065/1: OABI compat: fix build when EPOLL is not enabled
ARM: 9055/1: mailbox: arm_mhuv2: make remove callback return void
amba: Make use of bus_type functions
amba: Make the remove callback return void
vfio: platform: simplify device removal
amba: reorder functions
amba: Fix resource leak for drivers without .remove
ARM: 9054/1: arch/arm/mm/mmu.c: Remove duplicate header
ARM: 9053/1: arm/mm/ptdump:Add address markers for KASAN regions
ARM: 9051/1: vdso: remove unneded extra-y addition
ARM: 9050/1: Kconfig: Select ARCH_HAVE_NMI_SAFE_CMPXCHG where possible
ARM: 9049/1: locomo: make locomo bus's remove callback return void
ARM: 9048/1: sa1111: make sa1111 bus's remove callback return void
ARM: 9047/1: smp: remove unused variable
ARM: 9046/1: decompressor: Do not clear SCTLR.nTLSMD for ARMv7+ cores
ARM: 9045/1: uncompress: Validate start of physical memory against passed DTB
ARM: 9042/1: debug: no uncompress debugging while semihosting
ARM: 9041/1: sti LL_UART: add STiH418 SBC UART0 support
ARM: 9040/1: use DEBUG_UART_PHYS and DEBUG_UART_VIRT for sti LL_UART
ARM: 9039/1: assembler: generalize byte swapping macro into rev_l
2021-02-22 14:27:07 -08:00
Linus Torvalds
0328b5f2ef
Merge tag 'rtc-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
...
Pull RTC updates from Alexandre Belloni:
"Many cleanups and a few drivers removal this cycle.
Subsystem:
- Introduce features bitfield and the first feature: RTC_FEATURE_ALARM
Removed drivers:
- ab3100
- coh901331
- tx4939
- sirfsoc
Drivers:
- use rtc_lock and rtc_unlock instead of opencoding
- constify all struct rtc_class_ops
- quiet maybe-unused variable warning
- replace spin_lock_irqsave with spin_lock in hard IRQ
- pcf2127: disable Power-On Reset Override and run OTP refresh"
* tag 'rtc-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (81 commits)
rtc: abx80x: Add utility function for writing configuration key
rtc: pcf2127: properly set flag WD_CD for rtc chips(pcf2129, pca2129)
rtc: pcf8563: Add NXP PCA8565 compatible
rtc: s3c: quiet maybe-unused variable warning
rtc: s3c: stop setting bogus time
rtc: sd3078: quiet maybe-unused variable warning
rtc: s35390a: quiet maybe-unused variable warning
rtc: rx8581: quiet maybe-unused variable warning
rtc: rx8010: quiet maybe-unused variable warning
rtc: rv8803: quiet maybe-unused variable warning
rtc: rv3032: quiet maybe-unused variable warning
rtc: rv3029: quiet maybe-unused variable warning
rtc: rv3028: quiet maybe-unused variable warning
rtc: rs5c372: quiet maybe-unused variable warning
rtc: pcf85363: quiet maybe-unused variable warning
rtc: pcf85063: quiet maybe-unused variable warnings
rtc: meson: quiet maybe-unused variable warning
rtc: m41t80: quiet maybe-unused variable warning
rtc: isl1208: quiet maybe-unused variable warning
rtc: ds3232: quiet maybe-unused variable warning
...
2021-02-22 09:54:19 -08:00
Linus Torvalds
983e4adae0
Merge tag 'platform-drivers-x86-v5.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
...
Pull x86 platform driver updates from Hans de Goede:
"Highlights:
- Microsoft Surface devices System Aggregator Module support
- SW_TABLET_MODE reporting improvements
- thinkpad_acpi keyboard language setting support
- platform / DPTF profile settings support:
- Base / userspace API parts merged from Rafael's acpi-platform
branch
- thinkpad_acpi and ideapad-laptop support through pdx86
- Remove support for some obsolete Intel MID platforms through
merging of the shared intel-mid-removal branch
- Big cleanup of the ideapad-laptop driver
- Misc other fixes / new hw support / quirks"
* tag 'platform-drivers-x86-v5.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (99 commits)
platform/x86: intel_scu_ipc: Increase virtual timeout from 3 to 5 seconds
platform/surface: aggregator: Fix access of unaligned value
tools/power/x86/intel-speed-select: Update version to 1.8
tools/power/x86/intel-speed-select: Add new command to get/set TRL
tools/power/x86/intel-speed-select: Add new command turbo-mode
Platform: OLPC: Constify static struct regulator_ops
platform/surface: Add Surface Hot-Plug driver
platform/x86: intel_scu_wdt: Drop mistakenly added const
platform/x86: Kconfig: add missing selects for ideapad-laptop
platform/x86: acer-wmi: Don't use ACPI_EXCEPTION()
platform/x86: thinkpad_acpi: Replace ifdef CONFIG_ACPI_PLATFORM_PROFILE with depends on
platform/x86: thinkpad_acpi: Fix 'warning: no previous prototype for' warnings
platform/x86: msi-wmi: Fix variable 'status' set but not used compiler warning
platform/surface: surface3-wmi: Fix variable 'status' set but not used compiler warning
platform/x86: Move all dell drivers to their own subdirectory
Documentation/ABI: sysfs-platform-ideapad-laptop: conservation_mode attribute
Documentation/ABI: sysfs-platform-ideapad-laptop: update device attribute paths
platform/x86: ideapad-laptop: add "always on USB charging" control support
platform/x86: ideapad-laptop: add keyboard backlight control support
platform/x86: ideapad-laptop: send notification about touchpad state change to sysfs
...
2021-02-22 08:50:01 -08:00
Kevin P. Fleming
49dfc1f16b
rtc: abx80x: Add utility function for writing configuration key
...
Writing one of key two values into the configuration key register
is a common operation, so a utility function has been added to
provide consistent behavior and eliminate code duplication.
Signed-off-by: Kevin P. Fleming <kevin+linux@km6g.us >
Cc: Alessandro Zummo <a.zummo@towertech.it >
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com >
To: linux-rtc@vger.kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20200615105113.57770-2-kevin+linux@km6g.us
2021-02-13 23:03:26 +01:00
Biwen Li
2843d565dd
rtc: pcf2127: properly set flag WD_CD for rtc chips(pcf2129, pca2129)
...
Properly set flag WD_CD for rtc chips(pcf2129, pca2129)
Signed-off-by: Biwen Li <biwen.li@nxp.com >
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20201202031840.15582-1-biwen.li@oss.nxp.com
2021-02-13 22:38:13 +01:00
Marek Vasut
198be9898b
rtc: pcf8563: Add NXP PCA8565 compatible
...
The NXP PCA8565 is software compatible with the NXP PCF8563,
add DT and ACPI compatible entries.
Signed-off-by: Marek Vasut <marex@denx.de >
Cc: Alessandro Zummo <a.zummo@towertech.it >
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com >
To: linux-rtc@vger.kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210210220623.23233-1-marex@denx.de
2021-02-13 21:51:05 +01:00
Alexandre Belloni
7d6bec2868
rtc: s3c: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org >
Link: https://lore.kernel.org/r/20210202112934.3612726-2-alexandre.belloni@bootlin.com
2021-02-06 00:59:16 +01:00
Alexandre Belloni
5c78cceeb2
rtc: s3c: stop setting bogus time
...
It doesn't make sense to set the RTC to a default value at probe time. Let
the core handle invalid date and time.
Also, this is basically dead code since commit 22652ba724
("rtc: stop
validating rtc_time in .read_time")
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org >
Link: https://lore.kernel.org/r/20210202112934.3612726-1-alexandre.belloni@bootlin.com
2021-02-06 00:59:16 +01:00
Alexandre Belloni
302757c9ae
rtc: sd3078: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-22-alexandre.belloni@bootlin.com
2021-02-06 00:58:26 +01:00
Alexandre Belloni
0a268386c7
rtc: s35390a: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-21-alexandre.belloni@bootlin.com
2021-02-06 00:58:25 +01:00
Alexandre Belloni
194084679e
rtc: rx8581: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-20-alexandre.belloni@bootlin.com
2021-02-06 00:58:25 +01:00
Alexandre Belloni
782d3ebfcf
rtc: rx8010: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-19-alexandre.belloni@bootlin.com
2021-02-06 00:58:25 +01:00
Alexandre Belloni
da82632150
rtc: rv8803: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-18-alexandre.belloni@bootlin.com
2021-02-06 00:58:25 +01:00
Alexandre Belloni
94428ac9aa
rtc: rv3032: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-17-alexandre.belloni@bootlin.com
2021-02-06 00:58:25 +01:00
Alexandre Belloni
788babdd54
rtc: rv3029: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-16-alexandre.belloni@bootlin.com
2021-02-06 00:58:25 +01:00
Alexandre Belloni
dff31b0bc0
rtc: rv3028: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-15-alexandre.belloni@bootlin.com
2021-02-06 00:58:25 +01:00
Alexandre Belloni
cbc1d52cb1
rtc: rs5c372: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-14-alexandre.belloni@bootlin.com
2021-02-06 00:58:25 +01:00
Alexandre Belloni
c506bc10aa
rtc: pcf85363: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-13-alexandre.belloni@bootlin.com
2021-02-06 00:58:25 +01:00
Alexandre Belloni
c8ecbc783c
rtc: pcf85063: quiet maybe-unused variable warnings
...
pcf85063a_config and rv8263_config are only referenced by
pcf85063_of_match, move them in the #ifdef CONFIG_OF section.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-12-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
ef886c440b
rtc: meson: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Acked-by: Kevin Hilman <khilman@baylibre.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-11-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
2717c59e26
rtc: m41t80: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-10-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
413b7841f1
rtc: isl1208: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-9-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
2c1dc25fa7
rtc: ds3232: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-8-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
fb38b5da90
rtc: ds1672: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-7-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
97de1f587a
rtc: digicolor: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Acked-by: Baruch Siach <baruch@tkos.co.il >
Link: https://lore.kernel.org/r/20210202112219.3610853-6-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
ae1247f79d
rtc: brcmstb-waketimer: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Acked-by: Florian Fainelli <f.fainelli@gmail.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-5-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
b8ded8177a
rtc: bq32k: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-4-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
8792bab957
rtc: armada38x: depend on OF
...
The driver will compile with warning without OF because armada38x_data and
armada8k_data will be defined but not used. It would be possible to move
then in the #ifdef CONFIG_OF section but then their members will be defined
but not used. Instead of moving most of the driver in the #ifdef, simply
depend on OF.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-3-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
d5328499bf
rtc: class: remove bogus documentation
...
rtc_device_unregister is gone since commit fdcfd85433
("rtc: rework
rtc_register_device() resource management"). Remove its documentation.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210202112219.3610853-2-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
c37b643026
rtc: rv3028: remove useless warning messages
...
Remove voltage low messages as userspace has a proper way to get the
information and react on it.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210126221435.2152339-2-alexandre.belloni@bootlin.com
2021-02-06 00:56:31 +01:00
Alexandre Belloni
f007c479c2
rtc: rv3028: fix PORF handling
...
The PORF bit is cleared on interrupts which prevents the driver to know
when the time and date are invalid. Stop clearing PORF in the interrupt
handler.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210126221435.2152339-1-alexandre.belloni@bootlin.com
2021-02-06 00:56:30 +01:00
Xiaofei Tan
0c1095d334
rtc: mxc_v2: Replace spin_lock_irqsave with spin_lock in hard IRQ
...
It is redundant to do irqsave and irqrestore in hardIRQ context, where
it has been in a irq-disabled context.
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com >
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/1612355981-6764-7-git-send-email-tanxiaofei@huawei.com
2021-02-06 00:50:48 +01:00
Xiaofei Tan
3f2d301847
rtc: mxc: Replace spin_lock_irqsave with spin_lock in hard IRQ
...
It is redundant to do irqsave and irqrestore in hardIRQ context, where
it has been in a irq-disabled context.
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com >
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/1612355981-6764-6-git-send-email-tanxiaofei@huawei.com
2021-02-06 00:50:48 +01:00
Xiaofei Tan
669022c29a
rtc: tegra: Replace spin_lock_irqsave with spin_lock in hard IRQ
...
It is redundant to do irqsave and irqrestore in hardIRQ context, where
it has been in a irq-disabled context.
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com >
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/1612355981-6764-5-git-send-email-tanxiaofei@huawei.com
2021-02-06 00:50:47 +01:00
Xiaofei Tan
be3df3f858
rtc: r7301: Replace spin_lock_irqsave with spin_lock in hard IRQ
...
It is redundant to do irqsave and irqrestore in hardIRQ context, where
it has been in a irq-disabled context.
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com >
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/1612355981-6764-4-git-send-email-tanxiaofei@huawei.com
2021-02-06 00:50:47 +01:00
Xiaofei Tan
5131797556
rtc: pm8xxx: Replace spin_lock_irqsave with spin_lock in hard IRQ
...
It is redundant to do irqsave and irqrestore in hardIRQ context, where
it has been in a irq-disabled context.
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com >
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/1612355981-6764-3-git-send-email-tanxiaofei@huawei.com
2021-02-06 00:50:47 +01:00
Xiaofei Tan
6950d046eb
rtc: cmos: Replace spin_lock_irqsave with spin_lock in hard IRQ
...
It is redundant to do irqsave and irqrestore in hardIRQ context, where
it has been in a irq-disabled context.
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com >
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/1612355981-6764-2-git-send-email-tanxiaofei@huawei.com
2021-02-06 00:50:47 +01:00
David Gow
ddd0521549
rtc: zynqmp: depend on HAS_IOMEM
...
The Xilinx zynqmp RTC driver makes use of IOMEM functions like
devm_platform_ioremap_resource(), which are only available if
CONFIG_HAS_IOMEM is defined.
This causes the driver not to be enable under make ARCH=um allyesconfig,
even though it won't build.
By adding a dependency on HAS_IOMEM, the driver will not be enabled on
architectures which don't support it.
Fixes: 09ef18bcd5
("rtc: use devm_platform_ioremap_resource() to simplify code")
Signed-off-by: David Gow <davidgow@google.com >
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210127035146.1523286-1-davidgow@google.com
2021-02-03 00:55:01 +01:00
Thomas Gleixner
ebb22a0594
rtc: mc146818: Dont test for bit 0-5 in Register D
...
The recent change to validate the RTC turned out to be overly tight.
While it cures the problem on the reporters machine it breaks machines
with Intel chipsets which use bit 0-5 of the D register. So check only
for bit 6 being 0 which is the case on these Intel machines as well.
Fixes: 211e5db19d
("rtc: mc146818: Detect and handle broken RTCs")
Reported-by: Serge Belyshev <belyshev@depni.sinp.msu.ru >
Reported-by: Dirk Gouders <dirk@gouders.net >
Reported-by: Borislav Petkov <bp@suse.de >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Tested-by: Dirk Gouders <dirk@gouders.net >
Tested-by: Len Brown <len.brown@intel.com >
Tested-by: Borislav Petkov <bp@suse.de >
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/87zh0nbnha.fsf@nanos.tec.linutronix.de
2021-02-02 20:35:02 +01:00
Uwe Kleine-König
3fd269e74f
amba: Make the remove callback return void
...
All amba drivers return 0 in their remove callback. Together with the
driver core ignoring the return value anyhow, it doesn't make sense to
return a value here.
Change the remove prototype to return void, which makes it explicit that
returning an error value doesn't work as expected. This simplifies changing
the core remove callback to return void, too.
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org >
Reviewed-by: Arnd Bergmann <arnd@arndb.de >
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
Acked-by: Krzysztof Kozlowski <krzk@kernel.org > # for drivers/memory
Acked-by: Mark Brown <broonie@kernel.org >
Acked-by: Linus Walleij <linus.walleij@linaro.org >
Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com > # for hwtracing/coresight
Acked-By: Vinod Koul <vkoul@kernel.org > # for dmaengine
Acked-by: Guenter Roeck <linux@roeck-us.net > # for watchdog
Acked-by: Wolfram Sang <wsa@kernel.org > # for I2C
Acked-by: Takashi Iwai <tiwai@suse.de > # for sound
Acked-by: Vladimir Zapolskiy <vz@mleia.com > # for memory/pl172
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/20210126165835.687514-5-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
2021-02-02 14:25:50 +01:00
Thomas Gleixner
211e5db19d
rtc: mc146818: Detect and handle broken RTCs
...
The recent fix for handling the UIP bit unearthed another issue in the RTC
code. If the RTC is advertised but the readout is straight 0xFF because
it's not available, the old code just proceeded with crappy values, but the
new code hangs because it waits for the UIP bit to become low.
Add a sanity check in the RTC CMOS probe function which reads the RTC_VALID
register (Register D) which should have bit 0-6 cleared. If that's not the
case then fail to register the CMOS.
Add the same check to mc146818_get_time(), warn once when the condition
is true and invalidate the rtc_time data.
Reported-by: Mickaël Salaün <mic@digikod.net >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Tested-by: Mickaël Salaün <mic@linux.microsoft.com >
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/87tur3fx7w.fsf@nanos.tec.linutronix.de
2021-01-27 09:36:22 +01:00
Philipp Rosenberger
15f57b3e31
rtc: pcf2127: Run a OTP refresh if not done before
...
The datasheet of the PCF2127 states, it is recommended to process an OTP
refresh once the power is up and the oscillator is operating stable. The
OTP refresh takes less than 100 ms to complete.
Signed-off-by: Philipp Rosenberger <p.rosenberger@kunbus.com >
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210118085752.5759-3-p.rosenberger@kunbus.com
2021-01-26 00:27:06 +01:00
Philipp Rosenberger
b9ac079abe
rtc: pcf2127: Disable Power-On Reset Override
...
To resume normal operation after a total power loss (no or empty
battery) the "Power-On Reset Override (PORO)" facility needs to be
disabled.
The register reset value sets the PORO enabled and the data sheet
recommends setting it to disabled for normal operation.
From what I've seen on the PCF2127 and PCF2129 there is no event
generated at the interrupt pin (INT), as long the PORO bit is set. This
behavior is not documented in the manual.
Signed-off-by: Philipp Rosenberger <p.rosenberger@kunbus.com >
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210118085752.5759-2-p.rosenberger@kunbus.com
2021-01-26 00:26:16 +01:00
Dmitry Osipenko
454ba154a6
rtc: tps65910: Support wakeup-source property
...
TPS65910 is a PMIC MFD device and RTC is one of its functions. The
wakeup-source DT property is specified for the parent MFD device and we
need to use this property for the RTC in order to allow to use RTC alarm
for waking up system from suspend by default, instead of requiring user
to enable wakeup manually via sysfs.
Tested-by: Peter Geis <pgwipeout@gmail.com >
Tested-by: Matt Merhar <mattmerhar@protonmail.com >
Signed-off-by: Dmitry Osipenko <digetx@gmail.com >
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210120211603.18555-1-digetx@gmail.com
2021-01-25 23:57:24 +01:00
Alexandre Belloni
f66e7f2d32
rtc: stm32: use rtc_lock/rtc_unlock
...
Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210119220653.677750-14-alexandre.belloni@bootlin.com
2021-01-25 23:46:17 +01:00
Alexandre Belloni
31247546b4
rtc: rx8025: use rtc_lock/rtc_unlock
...
Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210119220653.677750-13-alexandre.belloni@bootlin.com
2021-01-25 23:46:17 +01:00
Alexandre Belloni
2dbbedb9b3
rtc: rx8010: use rtc_lock/rtc_unlock
...
Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210119220653.677750-12-alexandre.belloni@bootlin.com
2021-01-25 23:46:17 +01:00
Alexandre Belloni
2a5654fe2b
rtc: rv3029: use rtc_lock/rtc_unlock
...
Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20210119220653.677750-11-alexandre.belloni@bootlin.com
2021-01-25 23:46:17 +01:00