Subsystem:
- the hctosys limit for 32bit platforms is now configurable
- introduce lock guard for for rtc_device.ops_lock
- use sysfs_emit() instead of sprintf() were possible
- selftest fixes
New driver:
- Raspberry Pi 5 RTC
Drivers:
- abx80x: add support for ABX81X
- bd70528: properly enable wakeup
- cmos: Fix ACPI RTC alarm handling
- ds1685: power-off fixes
- mt6397: add nvmem support
- pcf85063: add HW UIE support
- rs5c372: Ricoh R2223x support
- rzn1: add R-Car X5H support
- s35390a: allow use of output pin for interrupt signal 1 for wakealarm to
support synology devices
- sun6i: add Allwinner B288 support
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEBqsFVZXh8s/0O5JiY6TcMGxwOjIFAmrmdmcACgkQY6TcMGxw
OjLB/g/9EG6jcs15Ci3pgKQ4g6h6UKHN86WIA64uPMjvuyAvmyccmrlW6AvwOhoH
kAp77s8hbujENJk4HPvT4kU0G7KlxpxfZwuvicHNBqGQ1L100Ahx22FdrgXxcejk
MKuN+30H6iJ01eDEmxJ530VlWCRBTusd8HexDh3Q6IY2mNLiphJXJ+moDheKBnAO
ECh8lc6Qnb5fFRYqUmAK0QLNKjU8kz6FCgj+vnuSaRftEAgniFmHTJHIiTdB0Bwp
REdpSMuhjM85oeCxcYu1r1ABnE08a3EbkoHelPlDiO/p1NNQ227IbciCG3rX++bJ
pa5IWkt2nfvC3RIyxuM5pcCSLpRHgji34LLiCkSzP99S3yujVYcZiBYltuYz5rx0
Jg4hIb1EmyV7AimQ3XZp1Y+/R2NxKVVHl7MEioq/EFYQFDo04EwcJAYIPn/ZPLDG
sVpbO/o3lmocP7f6n7jZFkuapQwZ68nijiuRby51gUK4uuraPQou4/igsBlJWn0s
z6MbS/1jtpRbAQ+8m8ev6LP5s7+4iALd4C8DGYEN53JOpx03LNLFpxPR14i8a5kt
FaXMjA6f12WvKaVcYJv++r/pxho/iSfXRQiSV3algm921Z5hpkCRi8xauI9sJJmG
IWjp+xZ+svPE+Ch7kn4jHbEGLbJy2sBSG30TKEE9WhUVOaHdhQo=
=NTHB
-----END PGP SIGNATURE-----
Merge tag 'rtc-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC updates from Alexandre Belloni:
"This introduces a way to lift the hctosys limit for 32-bit systems to
ensure systems relying on it can pass Y2038. Add a driver for the
Raspberry Pi 5 RTC and add support for the Abracon abx81x, Ricoh
R2223x, Renesas R-Car X5H and Allwinner B288 RTCs to existing drivers:
Subsystem:
- the hctosys limit for 32bit platforms is now configurable
- introduce lock guard for for rtc_device.ops_lock
- use sysfs_emit() instead of sprintf() were possible
- selftest fixes
New driver:
- Raspberry Pi 5 RTC
Drivers:
- abx80x: add support for ABX81X
- bd70528: properly enable wakeup
- cmos: Fix ACPI RTC alarm handling
- ds1685: power-off fixes
- mt6397: add nvmem support
- pcf85063: add HW UIE support
- rs5c372: Ricoh R2223x support
- rzn1: add R-Car X5H support
- s35390a: allow use of output pin for interrupt signal 1 for wakealarm to
support synology devices
- sun6i: add Allwinner B288 support"
* tag 'rtc-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (89 commits)
rtc: rs5c372: use sysfs_emit() instead of sprintf()
rtc: ds1307: use sysfs_emit() instead of sprintf()
rtc: isl1208: use sysfs_emit() instead of sprintf()
rtc: ds1685: use sysfs_emit() instead of sprintf()
rtc: ds1343: use sysfs_emit() instead of sprintf()
rtc: rx8025: use sysfs_emit() instead of sprintf()
rtc: x1205: use sysfs_emit() instead of sprintf()
rtc: bq32k: use sysfs_emit() instead of sprintf()
rtc: ep93xx: use sysfs_emit() instead of sprintf()
rtc: pcf2127: use sysfs_emit() instead of sprintf()
rtc: rv3029: use sysfs_emit() instead of sprintf()
rtc: ds1685: keep setting PAB until power is removed
rtc: ds1685: do not sleep in the power-off handler
rtc: ds1685: arm the wake-up alarm at power-off only if an alarm is set
rtc: rv3028: use sysfs_emit() instead of sprintf()
rtc: pcf85063: add 1 Hz update interrupt (UIE) support
rtc: pcf85063: preserve the alarm flag in clkout register updates
rtc: pcf85063: do not clear AIE in the interrupt handler
rtc: pcf85063: use devm_of_clk_add_hw_provider() for clkout
rtc: s35390a: Add synology quirk
...
Use sysfs_emit() instead of sprintf() in sysfs show callbacks
(rs5c372_sysfs_show_trim and rs5c372_sysfs_show_osc) to conform to the
recommended sysfs attribute formatting guidelines in
Documentation/filesystems/sysfs.rst.
Link: https://patch.msgid.link/20261029132339.925021-12-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Use sysfs_emit() instead of sprintf() in the sysfs show callback
(ds3231_hwmon_show_temp) to conform to the recommended sysfs attribute
formatting guidelines in Documentation/filesystems/sysfs.rst.
Link: https://patch.msgid.link/20261029132339.925021-11-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Use sysfs_emit() instead of sprintf() in sysfs show callbacks
(timestamp0_show, isl1208_sysfs_show_atrim, isl1208_sysfs_show_dtrim
and isl1208_sysfs_show_usr) to conform to the recommended sysfs
attribute formatting guidelines in
Documentation/filesystems/sysfs.rst.
Link: https://patch.msgid.link/20261029132339.925021-10-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Use sysfs_emit() instead of sprintf() in sysfs show callbacks
(ds1685_rtc_sysfs_battery_show, ds1685_rtc_sysfs_auxbatt_show and
ds1685_rtc_sysfs_serial_show) to conform to the recommended sysfs
attribute formatting guidelines in
Documentation/filesystems/sysfs.rst.
Acked-by: Joshua Kinard <linux@kumba.dev>
Link: https://patch.msgid.link/20261029132339.925021-9-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Use sysfs_emit() instead of sprintf() in sysfs show callbacks
(ds1343_show_glitchfilter and ds1343_show_tricklecharger) to conform
to the recommended sysfs attribute formatting guidelines in
Documentation/filesystems/sysfs.rst.
Link: https://patch.msgid.link/20261029132339.925021-8-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Use sysfs_emit() instead of sprintf() in the sysfs show callback
(rx8025_sysfs_show_clock_adjust) to conform to the recommended sysfs
attribute formatting guidelines in Documentation/filesystems/sysfs.rst.
Link: https://patch.msgid.link/20261029132339.925021-7-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Use sysfs_emit() instead of sprintf() in sysfs show callbacks
(x1205_sysfs_show_atrim and x1205_sysfs_show_dtrim) to conform to the
recommended sysfs attribute formatting guidelines in
Documentation/filesystems/sysfs.rst.
Link: https://patch.msgid.link/20261029132339.925021-5-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Use sysfs_emit() instead of sprintf() in the sysfs show callback
(bq32k_sysfs_show_tricklecharge_bypass) to conform to the recommended
sysfs attribute formatting guidelines in
Documentation/filesystems/sysfs.rst.
Link: https://patch.msgid.link/20261029132339.925021-4-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Use sysfs_emit() instead of sprintf() in sysfs show callbacks
(comp_preload_show and comp_delete_show) to conform to the
recommended sysfs attribute formatting guidelines in
Documentation/filesystems/sysfs.rst.
Link: https://patch.msgid.link/20261029132339.925021-3-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Use sysfs_emit() instead of sprintf() in the sysfs show callback
(timestamp_show) to conform to the recommended sysfs attribute
formatting guidelines in Documentation/filesystems/sysfs.rst.
Reviewed-by: Bruno Thomsen <bruno.thomsen@gmail.com>
Link: https://patch.msgid.link/20261029132339.925021-2-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Use sysfs_emit() instead of sprintf() in sysfs show callbacks
(rv3029_hwmon_show_temp and rv3029_hwmon_show_update_interval) to
conform to the recommended sysfs attribute formatting guidelines in
Documentation/filesystems/sysfs.rst.
Link: https://patch.msgid.link/20261029132339.925021-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
A kickstart or wake-up flag set while its interrupt is enabled (KF with
KSE, WF with WIE) clears PAB, and the system stays powered. Clear the
event flags together with setting PAB, and repeat the write until power
is gone.
Signed-off-by: Imre Kaloz <kaloz@kernel.org>
Acked-by: Joshua Kinard <linux@kumba.dev>
Link: https://patch.msgid.link/20261013120208.11268-4-kaloz@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
ds1685_rtc_poweroff() always sets WIE. The wake-up alarm then compares
the time-of-day and date alarm registers, which hold whatever was last
written to them, and a match powers the machine straight back on.
Set WIE only when AIE is set in Control B, and clear it otherwise.
Fixes: aaaf5fbf56 ("rtc: add driver for DS1685 family of real time clocks")
Signed-off-by: Imre Kaloz <kaloz@kernel.org>
Acked-by: Joshua Kinard <linux@kumba.dev>
Link: https://patch.msgid.link/20261013120208.11268-2-kaloz@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Use sysfs_emit() instead of sprintf() in sysfs show callbacks
(timestamp0_show and timestamp0_count_show) to conform to the
recommended sysfs attribute formatting guidelines in
Documentation/filesystems/sysfs.rst.
Signed-off-by: Akshat Rawat <akshatrawat095@gmail.com>
Link: https://patch.msgid.link/20261022081242.421-1-akshatrawat095@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
The PCF85063A/RV8263 have no dedicated 1 Hz update interrupt, but their
countdown timer can be sourced from a 1 Hz clock (TCF = 1 Hz, T = 1) to
generate a periodic interrupt on the INT pin. Use it to offload UIE to
the hardware, following the pattern of other RTC drivers: the timer is
enabled from set_alarm()/alarm_irq_enable() whenever uie_rtctimer is
active, and the IRQ handler reports RTC_UF when the timer flag (TF) is
set.
RTC_FEATURE_UPDATE_INTERRUPT is now only cleared when no usable interrupt
is wired, preserving the polling emulation for those configurations.
Co-developed-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Link: https://patch.msgid.link/20260828164445.3907839-5-alexander.sverdlin@siemens.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
The clkout rate and enable/disable helpers update CTRL2 with
regmap_update_bits() but leave the alarm flag (AF) out of the mask. AF is
write-0-to-clear, so an AF that gets asserted between the read and the
write of the read-modify-write is written back as 0 and the pending alarm
interrupt is lost.
Add AF to the mask and write it back as 1 (write-1-to-preserve) so a
concurrently asserted alarm flag survives a clkout reconfiguration.
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Link: https://patch.msgid.link/20260828164445.3907839-4-alexander.sverdlin@siemens.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
The interrupt handler cleared the alarm interrupt enable (AIE) bit while
acknowledging the alarm flag (AF). This races with process-context updates
of AIE in pcf85063_rtc_alarm_irq_enable() and pcf85063_rtc_set_alarm():
a handler running concurrently can clobber an AIE change.
The RTC core already disables the alarm interrupt after a one-shot alarm
via the .alarm_irq_enable callback, so the handler does not need to touch
AIE at all. Acknowledge AF only and leave AIE management to the core.
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Link: https://patch.msgid.link/20260828164445.3907839-3-alexander.sverdlin@siemens.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
pcf85063_clkout_register_clk() registered the OF clock provider with the
deprecated of_clk_add_provider() and never removed it, so the provider
kept pointing at freed data after unbind, leading to a use-after-free the
next time the device-tree clock was resolved.
Switch to devm_clk_hw_register() and devm_of_clk_add_hw_provider(): both
the clock and its OF provider are managed resources now, and the provider
is torn down before the clock on unbind.
Register the clock on the parent i2c device instead of the rtc device.
devm_of_clk_add_hw_provider() must use the parent, which owns the
of_node, and the clkout_hw it points at lives in the driver data
allocated on the parent. Tying both to the parent releases them together
on unbind, before the driver data is freed, and keeps their teardown
ordering guaranteed by a single devres list. Registering the clock on the
rtc device instead could defer its unregistration past unbind (e.g. while
a /dev/rtcN fd is open), after clkout_hw has already been freed.
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Link: https://patch.msgid.link/20260828164445.3907839-2-alexander.sverdlin@siemens.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Synology NAS devices use interrupt signal 1 for wakeup alarms. On ACPI
it is not possible to configure pinctrl.
Use interrupt signal 1 for wakeup if no pinmux function has been
configured in devicetree and dmi sys vendor matches "Synology Inc.".
Signed-off-by: Markus Probst <markus.probst@posteo.de>
Link: https://patch.msgid.link/20260930-rtc_s35390a_int1-v10-6-e7b1cbc50a7b@posteo.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Allow configuration of pin functions, including:
- keeping the previous configured function
- disabling output
- waking up the system
- minute periodical interrupt (1: 50% duty, 2: 7.81 ms)
If no function has been configured, fallback to previous behaviour.
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Markus Probst <markus.probst@posteo.de>
Link: https://patch.msgid.link/20260930-rtc_s35390a_int1-v10-5-e7b1cbc50a7b@posteo.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Instead of reading if the 24-hour mode is used on probe once, read it on
access. This makes it impossible for the mode to be out of sync and fixes
time corruption if resetting the chip while in 12-hour mode, as
`s35390a_init` did not update the cached value.
Fixes: 16486d0c1c ("rtc: s35390a: handle invalid RTC time")
Signed-off-by: Markus Probst <markus.probst@posteo.de>
Link: https://patch.msgid.link/20260930-rtc_s35390a_int1-v10-4-e7b1cbc50a7b@posteo.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
- Ignore local labels and mapping symbols during module load
These symbols were already ignored during kallsyms address-to-symbol
lookups. Filter them out earlier during module loading to reduce lookup
overhead and prevent them from appearing in /proc/kallsyms.
- Fix potentially incorrect access of SetOnce<T> when setting Rust module
parameters.
- Fix a potential read of an uninitialized count when printing taint
information for unloaded modules.
- Allocate the kmod argument array using kmalloc_array() in preparation
for conversion to type-aware allocators.
- Clean up includes in linux/kmod.h
Add explicit includes of linux/umh.h to files that use usermode helpers.
Then clean up the #include list in linux/kmod.h, notably removing the
compatibility linux/umh.h include.
- Remove the error-injection.h include from linux/module.h
Add explicit includes of linux/error-injection.h to files that use the
ALLOW_ERROR_INJECTION() macro and currently rely on it being provided
indirectly via linux/module.h. Then remove the unnecessary
linux/error-injection.h include from linux/module.h.
- Replace __MODULE_STRING() with __stringify() in various drivers in
preparation for removing the former macro.
The changes to several #include lists have been reported to cause trivial
conflicts in linux-next with the drm, drm-xe, and usb trees.
-----BEGIN PGP SIGNATURE-----
iQFkBAABCABOFiEEIduBR9MnFA82q/jtumpXJwqY6poFAmrWJvAbFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMiwyFBxwZXRyLnBhdmx1QHN1c2UuY29tAAoJELpqVycK
mOqalOYH/RpwszqX+OuRhf3G9IDokSZFZyiAJLZan3H7jZNb9VBVLYmTTRYF/UE4
uXKeGAUXZOaUdhVjQi/1LqX3NbDO1NfUCM9sbk3EPal0L6ILbcmkBecXu9JXHxvB
6sfEAdTMdAn28613wcnbjmdGfEkgHuDZqZeld4dIAtZ+GvLzFz0D+o0zkigCnT4I
faKU9GLIHJe2Cn5FB40b1+M+IGY9t6bl2+WxVc1rd9oSZXfr8ptE7NPllhiOmOhD
/aMVpeSlXzo8DYxIhvtZGwDh5NrJglPFdFRXYuHUDLxkWCCFtXRt//LtWv3EpKqp
dgQUH5QAO5E/+OuycHFLaXOUiKVS0P4=
=bCLk
-----END PGP SIGNATURE-----
Merge tag 'modules-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux
Pull module updates from Petr Pavlu:
- Ignore local labels and mapping symbols during module load
These symbols were already ignored during kallsyms address-to-symbol
lookups. Filter them out earlier during module loading to reduce
lookup overhead and prevent them from appearing in /proc/kallsyms.
- Fix potentially incorrect access of SetOnce<T> when setting Rust
module parameters.
- Fix a potential read of an uninitialized count when printing taint
information for unloaded modules.
- Allocate the kmod argument array using kmalloc_array() in preparation
for conversion to type-aware allocators.
- Clean up includes in linux/kmod.h
Add explicit includes of linux/umh.h to files that use usermode
helpers. Then clean up the #include list in linux/kmod.h, notably
removing the compatibility linux/umh.h include.
- Remove the error-injection.h include from linux/module.h
Add explicit includes of linux/error-injection.h to files that use
the ALLOW_ERROR_INJECTION() macro and currently rely on it being
provided indirectly via linux/module.h. Then remove the unnecessary
linux/error-injection.h include from linux/module.h.
- Replace __MODULE_STRING() with __stringify() in various drivers in
preparation for removing the former macro.
* tag 'modules-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux:
drivers: Replace __MODULE_STRING() with __stringify()
module: Fix uninitialized count read of unloaded taint tracking record
rust: module_param: Fix potentially incorrect access of `SetOnce<T>`
module: Remove the error-injection.h include from linux/module.h
drm/xe: Include error-injection.h for ALLOW_ERROR_INJECTION()
drm/i915: Include error-injection.h for ALLOW_ERROR_INJECTION()
syscalls: Include error-injection.h for ALLOW_ERROR_INJECTION()
net: Include error-injection.h for ALLOW_ERROR_INJECTION()
block: Include error-injection.h for ALLOW_ERROR_INJECTION()
module: Bring includes in linux/kmod.h up to date
time/jiffies: Include linux/sysctl.h for proc_int_u2k_conv_uop(), ...
umh, treewide: Explicitly include linux/umh.h where needed
modules/kmod: Allocate argv with kmalloc_array()
module/kallsyms: Ignore local labels and mapping symbols during module load
module/kallsyms: Refactor current symbol filtering into is_core_symbol()
module/kallsyms: Rename is_mapping_symbol() to is_ignored_kernel_symbol()
GPIO core:
- provide a new controller API: gpiochip_generic_get_config()
- return -EOPNOTSUPP instead of -ENODEV to user-space if it requests
hardware timestamping on systems where it's unavailable (no user-space
regressions reported)
New drivers:
- add a driver for ROHM BD73800 PMIC GPIO controller
- add a driver for Axiado AX3005 SGPIO controller
- add a driver for Analog Devices AD7768 GPIO controller
New hardware support:
- extend gpio-rcar with support for R-Car X5H (R8A78000)
- extend gpio-tegra186 with support for Tegra 268
Driver changes:
- refactor and improve gpio-rtd1625: switch to modern or better fitting
interfaces and improve coding style
- improve error handling of return values of platform_get_irq_optional()
in several drivers
- normalize the return value of the gpio_chip::get() callback in gpio-siox in
order to not propagate invalid values up to the GPIO core
- implement gpio_chip::get_direction() for gpio-pcf857x
- use managed variants of notifier registration functions in several drivers
- remove legacy gpio_set_value_cansleep() as it has no more users
- add pinctrl support to gpio-realtek-otto
- add runtime PM support to the gpio-regmap helper module
- add more ACPI GPIO quirks for various hardware
- stop needlessly reading gpio_chip::base in gpio-pxa
- add support for tracking of direction of generic GPIO chips with no
direction registers via pinctrl backend to gpio-mmio (use the new core API:
gpiochip_generic_get_config())
- use the "safe" variants of debugfs_create_file() in gpio-sloppy-analyzer
- use device name as GPIO chip label in gpio-omap
- refactor bit ops in gpio-dln2
- prepare gpio-it87 for upcoming kmalloc_obj() conversion
Devicetree bindings:
- document new model in gpio-pca95xx
- allow the gpio-hogs property in gpio-zynq and fsl,qoriq-gpio
- allow the gpio-ranges property in gpio-realtek-otto
Misc fixes:
- add missing MODULE_ALIAS() to gpio-crystalcove
- fix a comment typo in example GPIO tools
- fix unbalanced brackets in documentation
- add names to regmaps in gpio-mvebu to avoid collisions in debugfs output
- fix GPIO lookup using relative paths in GPIO ACPI
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEkeUTLeW1Rh17omX8BZ0uy/82hMMFAmrV2E0ACgkQBZ0uy/82
hMMRog/7Bb3BiJlHlboHQ89YGn4Fq/nUiceWTP2NS7r9TuJE8M/jzxHKwl0qYtLs
4JTg/Sv0pN8+zouqv+N/yCjHVY21mVKgCdJ100uch1wbBrzLMlruAj624xLdgX+8
f1Lp6qJJOGcskoDJXRPlo1fw1eYw0XXwaJ5hDA/c9C+vURYPyXV9QHvZWwOj4csE
aEtR0YBgB/b3IyXh8VuIBvDQd2ZzO9G0fU3UEcrH+KT6LplRiPQh0H7fVH+0hEhl
fwZ5+CsK3UpsaCVu/EoXPXD/I8/qQ50ETClYA/oteVIq2kIzIVuWSOvRXmsRKsfH
ROc94dzTHGK7waLmjlTGwc26zUNbQbFEI8+CLFipSZfSs3qrw54ufspiW74X3Og0
LbgPkaVE6gS6S9S5lfGdeVeg+6kBqn5+fpqcYPLiouV9UJ6mEc4+75tNkafDGjy2
JFxc2h7frdsWf1w6DkM8hwjiqFgEaUatKfV0W2dJ8zomdPJYSXzf1f+TY9JAKl/2
y0mGuREMmfRyzkSdMIrbN7shUVXIXO80upEn3DOlv7yjPDXCYFvLtwcqDtZTOjAK
XI9VbOGB4dwuF42e057b85PlPoAIJohYJ/zKl4BgB+fifs74XCpP4/aOAHbAipKF
UbdeN0NnmD7JHlR57vCD7r24Ex4h5UyyJidE5n6w0t1iSES1xVs=
=P25c
-----END PGP SIGNATURE-----
Merge tag 'gpio-updates-for-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio updates from Bartosz Golaszewski:
"Nothing stands out as particularly interesting, it's been a calm
cycle. We have three new drivers, support for more models and lots of
updates across many modules (details are in the signed tag as usual).
There are also some minor changes and additions to the in-kernel GPIO
API.
GPIO core:
- provide a new controller API: gpiochip_generic_get_config()
- return -EOPNOTSUPP instead of -ENODEV to user-space if it requests
hardware timestamping on systems where it's unavailable (no
user-space regressions reported)
New drivers:
- add a driver for ROHM BD73800 PMIC GPIO controller
- add a driver for Axiado AX3005 SGPIO controller
- add a driver for Analog Devices AD7768 GPIO controller
New hardware support:
- extend gpio-rcar with support for R-Car X5H (R8A78000)
- extend gpio-tegra186 with support for Tegra 268
Driver changes:
- refactor and improve gpio-rtd1625: switch to modern or better
fitting interfaces and improve coding style
- improve error handling of return values of
platform_get_irq_optional() in several drivers
- normalize the return value of the gpio_chip::get() callback in
gpio-siox in order to not propagate invalid values up to the GPIO
core
- implement gpio_chip::get_direction() for gpio-pcf857x
- use managed variants of notifier registration functions in several
drivers
- remove legacy gpio_set_value_cansleep() as it has no more users
- add pinctrl support to gpio-realtek-otto
- add runtime PM support to the gpio-regmap helper module
- add more ACPI GPIO quirks for various hardware
- stop needlessly reading gpio_chip::base in gpio-pxa
- add support for tracking of direction of generic GPIO chips with no
direction registers via pinctrl backend to gpio-mmio (use the new
core API: gpiochip_generic_get_config())
- use the "safe" variants of debugfs_create_file() in
gpio-sloppy-analyzer
- use device name as GPIO chip label in gpio-omap
- refactor bit ops in gpio-dln2
- prepare gpio-it87 for upcoming kmalloc_obj() conversion
Devicetree bindings:
- document new model in gpio-pca95xx
- allow the gpio-hogs property in gpio-zynq and fsl,qoriq-gpio
- allow the gpio-ranges property in gpio-realtek-otto
Misc fixes:
- add missing MODULE_ALIAS() to gpio-crystalcove
- fix a comment typo in example GPIO tools
- fix unbalanced brackets in documentation
- add names to regmaps in gpio-mvebu to avoid collisions in debugfs
output
- fix GPIO lookup using relative paths in GPIO ACPI"
* tag 'gpio-updates-for-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (63 commits)
gpiolib: acpi: Fix GPIO lookup using relative path
gpio: legacy: Kill gpio_set_value_cansleep()
dt-bindings: gpio: pca95xx: add onnn,pca9655 with nxp,pca9555 fallback
gpiolib: acpi: Ignore GPIO 11 interrupt on Acer Nitro V 16S AI
gpio: pxa: stop reading gpio_chip::base in direction callbacks
gpio: axiado: add AX3005 SGPIO controller support
dt-bindings: gpio: add Axiado AX3005 SGPIO controller
gpiolib: acpi: Add quirk for Lenovo IdeaPad Slim 3 15ABR8
MAINTAINERS: Add ROHM BD73800 PMIC files
gpio: bd73800: Support ROHM BD73800 PMIC GPIOs
clk: bd718x7: Support ROHM BD73800
regulator: bd71828: Support ROHM BD73800
rtc: bd70528: Support RTC on ROHM BD73800
mfd: Support for ROHM BD73800 PMIC core
dt-bindings: mfd: ROHM BD73800 PMIC
dt-bindings: regulator: ROHM BD73800 regulators
dt-bindings: rohm,bd*: Ref common ROHM bindings
dt-bindings: mfd: Common ROHM PMIC properties
gpio: siox: normalize return value of gpio_get()
gpio: dln2: use assign_bit() where applicable
...
Add an hwmon intrusion alarm for the chip's chassis intrusion latch.
Reading it says whether the chassis has been opened since the latch was
last cleared; writing 0 clears it and re-arms.
Signed-off-by: Eric Liu <liuer@nvidia.com>
Link: https://patch.msgid.link/20261001054108.3346426-1-liuer@nvidia.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
i2c_set_clientdata() is a thin wrapper around
dev_set_drvdata(&client->dev, ...), so calling both in ds1307_probe()
stores the same driver-data pointer twice. The two calls were introduced
together in the regmap conversion in commit 11e5890b53 ("rtc: ds1307:
convert driver to regmap").
Keep i2c_set_clientdata(), which matches the convention used by every
other I2C RTC driver in the subsystem, and drop the redundant
dev_set_drvdata().
Signed-off-by: Guoming Chen <chenguoming88s@gmail.com>
Link: https://patch.msgid.link/20260821131644.71794-1-chenguoming88s@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
The RTC_HCTOSYS feature faces an impossible dilemma on 32-bit systems:
a) systemd requires RTC_HCTOSYS=y with the correct timestamp
for its intended operation
b) broken RTC hardware can produce random future timestamps
beyond 2038 at boot time
c) time32 userspace immediately hangs if the time is set to a
date beyond 2038 and requires timestamps to be clamped
d) time64 userspace is intended to survive the actual 2038
date and requires timestamps to not be clamped
Commit b3a5ac42ab ("rtc: hctosys: Ensure system time doesn't overflow
time_t") introduced this limit to protect time32 userspace from future
RTC dates that can break boot and address constraints a), b) and c),
but broke d) in the process by limiting RTC_HCTOSYS to the time32 range
and falling back to RTC_HCTOSYS=n behavior when the RTC time overflows
that.
Make the behavior configurable with a new RTC_HCTOSYS_TIME32_LIMIT
option that chooses between breaking c) or d). On systems with
COMPAT_32BIT_TIME=n, only RTC_HCTOSYS_TIME32_LIMIT=n is allowed since
userspace can be assumed to be fully built for time64. 64-bit kernels
running 32-bit userland never had the cutoff and continue to not offer
the option.
Warn on rejection with the RTC date and option name so users can
identify the cause and find the setting.
[arnd: reword Kconfig text and patch description,
add COMPAT_32BIT_TIME dependency]
----
I ended up rewriting most of the text but kept Karl's ownership
as he did the original patch.
Fixes: b3a5ac42ab ("rtc: hctosys: Ensure system time doesn't overflow time_t")
Link: https://lore.kernel.org/all/20220908115337.1604277-1-arnd@kernel.org/
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20261020080026.2461578-1-arnd@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
mpfs_rtc_readalarm() swaps the low and high words of the alarm time.
The RTC core reads this value during device registration to initialize
its alarm timer. This can populate the cached alarm and timer queue
with an incorrect expiry time, or leave an enabled hardware alarm out
of the timer queue if the decoded time appears to be in the past.
Read the low 32 bits from ALARM_LOWER_REG and place the masked high
11 bits from ALARM_UPPER_REG in bits 42:32. This matches the layout
used by mpfs_rtc_setalarm() and the low/high assembly in
mpfs_rtc_readtime(), so the RTC core imports the programmed alarm
time correctly during device registration.
Fixes: 0b31d70359 ("rtc: Add driver for Microchip PolarFire SoC")
Signed-off-by: Baek Kyu, Kim <pocj8ur4in@gmail.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20261019151024.2232338-1-pocj8ur4in@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
The R2223x can run in an eco mode that lowers its current consumption
from the backup supply. Follow the ricoh,eco-mode property from the
device tree: enable the mode when the property is set, turn it off when
it is not set, as the bit is in CTRL2 register, which is backed by the
same supply and keeps its contents across a reset, and no other path in
the driver touches it.
Signed-off-by: Heiko Schocher <hs@nabladev.com>
Link: https://patch.msgid.link/20260825071927.4090460-4-hs@nabladev.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>