Commit Graph

3039 Commits

Author SHA1 Message Date
Linus Torvalds
79b4f3baae MFD for v7.3
- New Support & Features
   - MediaTek MT6397: Add mt6323 AUXADC support.
   - MediaTek MT6397: Add mt6323 EFUSE support.
   - Spreadtrum SC27xx: Add SC2730 regulator cell.
 
 - Improvements & Fixes
   - Apple SMC: Fix key count endianness annotation.
   - Azoteq IQS62x: Reject zero-length firmware records.
   - ChromeOS EC: Introduce cros_ec_read_features helper and read features during
     probe to catch transfer errors.
   - Cirrus Logic CS42L43: Fix regmap defaults ordering.
   - Cirrus Logic CS42L43: Remove redundant NULL checks on SoundWire.
   - Congatec Board Controller: Fix teardown ordering in cgbc_remove().
   - HP iPAQ Micro: Fix out-of-bounds stack read in ipaq_micro_str.
   - Marvell 88PM886: Initialize the battery page.
   - QNAP MCU: Keep the reply buffer alive past a command timeout.
   - RAVE SP: Validate received frame payload lengths.
   - Silicon Labs Si476x: Drop duplicate NULL checks.
   - Silicon Labs Si476x: Modernize GPIO handling.
   - Silicon Motion SM501: Fix potential memory leaks during remove.
   - UCB1x00: Convert Assabet gpio-keys to use software nodes and register software
     node for GPIO controller.
   - Viperboard: Fix native fields type in structures as little-endian.
   - Viperboard: Remove redundant NULL check before kfree().
   - X-Powers AXP20x: Preserve other control bits when powering off.
 
 - Cleanups & Refactoring
   - Core: Drop unused assignment of spi_device_id driver data.
   - Core: Initialize spi_device_id arrays using member names.
   - Core: Unify style of spi_device_id arrays.
   - Maintainers: Add Intel LPSS section to follow the changes.
   - Maintainers: Add a mailing list entry to MFD.
   - Cirrus Logic CS42L43: Format sdw_device_id table.
   - Cirrus Logic CS42L43: Use new SoundWire enumeration helper.
   - ROHM PMIC: Factor out power button registration and convert gpio-keys to use
     software nodes.
   - ST-Ericsson DB8500: Fold dbx500 header into db8500.
 
 - Device Tree Binding Updates
   - Core: Add techvision vendor prefix.
   - Marvell 88PM886: Allow vbus regulator.
   - MediaTek MT8195 SCP: Add support for MT8189 SoC.
   - Qualcomm SPMI PMIC: Document PMG1110.
   - Qualcomm SPMI PMIC: Document haptics device.
   - Qualcomm TCSR: Add compatible for Hawi and Maili SoCs.
   - Qualcomm TCSR: Add compatible for Shikra.
   - Qualcomm TCSR: Document the IPQ9650 TCSR block.
   - STMicroelectronics STMPE: Fix typo st,stmpe601 (should be st,stmpe610).
   - Syscon: Add ESWIN EIC7700 compatible.
   - Syscon: Allow syscon compatible for Loongson-2K0300 chip id.
   - Syscon: Disallow simple-bus with syscon.
   - Syscon: Drop custom select for older dtschema.
   - TI OMAP USBHS TLL: Convert to DT schema.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmqPE0EACgkQUa+KL4f8
 d2EwsA/6Ah511L+E+sH3PMz9/9ZR7F6b4xXx+YI0WuiWANNNEdxkkIiq6smdCQI9
 oS//iJBdMigdKzjllIwnAHTcfatZE+3A6qCroM0pnxsQejDdAR0BP2VA4b7QMGg0
 ey44e5CYZgRorh9oOTtsjE/jL4sNZK6AgyZab0gZ3Q/A5qubLRiSaphHfpfCej+q
 RC3W2m3jbQSge5iNy8iIg41PH4fHcjpRNM/UxT6UVexxBWiJ6i9yiNYdfb4joCuG
 Oh4Rr4TfnoN8yIuoA8WRngYejpV5ZGGnwXwTDl47WPvoJiMeWSnpQU0u/fSJARqm
 YAMtZ+GLjSfj60SgCu6HR8AyH9q5U54pNdBiCSQ/7fGhYJwq9WS/XDjr+Xaj0+ku
 g4veatMTMaNdwJr0RAViw1RAOA97cAqfgOADnlAJM/tzvGw0VjIxdrbciywUXB2A
 At26ibT6WQX/I/fPSJqmwieEYiueikZfvuLFYAeSrLQ4GWGGgq3Aj4k1LtOVLEP3
 y3Pt4rkxJQxW3EDKseaZYsyR7EbU3PnJFTsAY0/p1XiDSeiM4d0IIi7dZQiQygg4
 3XwmqE8ODxetHna+dPXr0ooaU9UIaaT1X5AyOr6t6Tp/n0Yq50F1PpjBCS2nLAYk
 JdkgfFBMWlkOZcCTgLYMKNSnmWZihUxb0zfDaOMCe4HUoqc1WLA=
 =92XF
 -----END PGP SIGNATURE-----

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

Pull MFD updates from Lee Jones:
 "New Support & Features:
   - MediaTek MT6397: Add mt6323 AUXADC support
   - MediaTek MT6397: Add mt6323 EFUSE support
   - Spreadtrum SC27xx: Add SC2730 regulator cell

  Improvements & Fixes:
   - Apple SMC: Fix key count endianness annotation
   - Azoteq IQS62x: Reject zero-length firmware records
   - ChromeOS EC: Introduce cros_ec_read_features helper and read
     features during probe to catch transfer errors
   - Cirrus Logic CS42L43: Fix regmap defaults ordering
   - Cirrus Logic CS42L43: Remove redundant NULL checks on SoundWire
   - Congatec Board Controller: Fix teardown ordering in cgbc_remove()
   - HP iPAQ Micro: Fix out-of-bounds stack read in ipaq_micro_str
   - Marvell 88PM886: Initialize the battery page
   - QNAP MCU: Keep the reply buffer alive past a command timeout
   - RAVE SP: Validate received frame payload lengths
   - Silicon Labs Si476x: Drop duplicate NULL checks
   - Silicon Labs Si476x: Modernize GPIO handling
   - Silicon Motion SM501: Fix potential memory leaks during remove
   - UCB1x00: Convert Assabet gpio-keys to use software nodes and
     register software node for GPIO controller
   - Viperboard: Fix native fields type in structures as little-endian
   - Viperboard: Remove redundant NULL check before kfree()
   - X-Powers AXP20x: Preserve other control bits when powering off

  Cleanups & Refactoring:
   - Core: Drop unused assignment of spi_device_id driver data
   - Core: Initialize spi_device_id arrays using member names
   - Core: Unify style of spi_device_id arrays
   - Maintainers: Add Intel LPSS section to follow the changes
   - Maintainers: Add a mailing list entry to MFD
   - Cirrus Logic CS42L43: Format sdw_device_id table
   - Cirrus Logic CS42L43: Use new SoundWire enumeration helper
   - ROHM PMIC: Factor out power button registration and convert
     gpio-keys to use software nodes
   - ST-Ericsson DB8500: Fold dbx500 header into db8500

  Device Tree Binding Updates:
   - Core: Add techvision vendor prefix
   - Marvell 88PM886: Allow vbus regulator
   - MediaTek MT8195 SCP: Add support for MT8189 SoC
   - Qualcomm SPMI PMIC: Document PMG1110
   - Qualcomm SPMI PMIC: Document haptics device
   - Qualcomm TCSR: Add compatible for Hawi and Maili SoCs
   - Qualcomm TCSR: Add compatible for Shikra
   - Qualcomm TCSR: Document the IPQ9650 TCSR block
   - STMicroelectronics STMPE: Fix typo st,stmpe601 (should be
     st,stmpe610)
   - Syscon: Add ESWIN EIC7700 compatible
   - Syscon: Allow syscon compatible for Loongson-2K0300 chip id
   - Syscon: Disallow simple-bus with syscon
   - Syscon: Drop custom select for older dtschema
   - TI OMAP USBHS TLL: Convert to DT schema"

* tag 'mfd-next-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (45 commits)
  mfd: cs42l43: Fix regmap defaults ordering
  dt-bindings: mfd: syscon: Allow syscon compatible for Loongson-2K0300 chip id
  dt-bindings: mfd: syscon: Add ESWIN EIC7700 compatible
  mfd: qnap-mcu: keep the reply buffer alive past a command timeout
  dt-bindings: mfd: qcom,tcsr: Document the IPQ9650 TCSR block
  mfd: macsmc: Fix key count endianness annotation
  dt-bindings: mfd: qcom,spmi-pmic: Document haptics device
  mfd: iqs62x: Reject zero-length firmware records
  mfd: rave-sp: validate received frame payload lengths
  mfd: sm501: Fix potential memory leaks during remove
  mfd: viperboard: Fix native fields type in structures as little-endian
  mfd: si476x-i2c: Get rid of duplicate NULL checks
  dt-bindings: mfd: Convert OMAP USB TLL to DT schema
  mfd: cgbc: Fix teardown ordering in cgbc_remove()
  mfd: mt6397-core: Add mt6323 AUXADC support
  dt-bindings: mfd: qcom,tcsr: Add compatible for Hawi and Maili SoCs
  mfd: rohm: Factor out power button registration
  mfd: ucb1x00: Convert Assabet gpio-keys to use software nodes
  mfd: ucb1x00: Register software node for GPIO controller
  mfd: cs42l43: Tidy up formatting on sdw_device_id table
  ...
2026-08-27 10:45:08 -07:00
Linus Torvalds
4e1b759c06 watchdog updates for v7.3
* New Drivers
 
   - Nuvoton MA35D1
 
   - Lenovo SE30G2 and SE60
 
 * Added support to existing drivers
 
   - snps,dw-wdt: Add RV1106 compatible
 
   - apple,wdt: Add t6030, t6031, and t8132 compatibles
 
 * Other notable changes
 
   - New "dump" pretimeout governor
 
   - Propagate errors from optional IRQ lookup
 
   - Remove redundant dev_err() and dev_err_probe() messages
 
   - npcm, qcom: Improved bootstatus reports
 
   - realtek-otto: Change to use regmap API
 
   - w83627hf_wdt: Report running watchdog, identify NCT6126
 
 * Various other minor fixes and improvements
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEiHPvMQj9QTOCiqgVyx8mb86fmYEFAmqDYDcACgkQyx8mb86f
 mYGbiBAAkL3MIf4R7bguS1K9xS1iGqYEpZsnlPKcj3vrU5mTOHUrP2QxacltmDQV
 PVgwSC3ExWjGEoR/HMQqIaz3UEPZVNMc97Q/8OK1ewoSpQHTYAVIYhL9vs9GxuCc
 K2Iw5zu3A0HtLfj8bWbr4b1KxDBLsr+dK0VtVJfz+Oqk9GGKALf4H92IJogdqJXg
 ESG0Gl4Ap4GvPywSc5YtNI6BOeUUYaAPeTH8ahdXAIZjXKtbHgU6JTaTC/5MIQ5i
 Gjn+6BGjUkk1CYBxLTC+iFL/9N/CP8HxczOKBnIC3WQ32ZK17vMFo5C5JE3N2U9Y
 KiN1AKW79mzXD9VphQudB6RdPtPHusbZU8nW8MkebK0vD8wDYbHX4LcTUHn5kbyh
 V8pPNV+hXgO6WvAtqkrcb84W2M1iyWQpz0lcQ0f7sI5dtZz+K/d0tF6Chho9F9m2
 0ozR3hFWOZiJoXKZ5M1b1TcU+5c6tcGiK8WWLq/H9f29RI9eA097W2QP6ZzkOOzh
 g7KhL27YXnyHpg1FZV+qZS+kaWuskdEOHfIqS+gHGldJefUyAAHS8pCZQVaXsdK9
 grK4hBtfO65Cbw/H2GA3yz0zYhxzWCTJ9WJqQeMK3kvjqWOxGckfhEx1EbuHCmt1
 4b9CPGEvT/7x8iKfUpHbjUEZY4i2wtkqC5kQzZGXBVgQEC6sQ0A=
 =IefI
 -----END PGP SIGNATURE-----

Merge tag 'watchdog-for-v7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull watchdog updates from Guenter Roeck:
 "New Drivers:
   - Nuvoton MA35D1
   - Lenovo SE30G2 and SE60

  Added support to existing drivers:
   - snps,dw-wdt: Add RV1106 compatible
   - apple,wdt: Add t6030, t6031, and t8132 compatibles

  Other notable changes:
   - New "dump" pretimeout governor
   - Propagate errors from optional IRQ lookup
   - Remove redundant dev_err() and dev_err_probe() messages
   - npcm, qcom: Improved bootstatus reports
   - realtek-otto: Change to use regmap API
   - w83627hf_wdt: Report running watchdog, identify NCT6126

  Various other minor fixes and improvements"

* tag 'watchdog-for-v7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (40 commits)
  watchdog: orion_wdt: Propagate errors from optional IRQ lookup
  watchdog: qcom: Propagate errors from optional IRQ lookup
  watchdog: aspeed: Propagate errors from optional IRQ lookup
  watchdog: stm32_iwdg: Propagate errors from optional IRQ lookup
  watchdog: dw_wdt: Propagate errors from optional IRQ lookup
  watchdog: mediatek: Propagate errors from optional IRQ lookup
  watchdog: apple: Constify some structures
  watchdog: pretimeout: Convert dump pretimeout governor to tristate
  nmi: Export CPU backtrace APIs for loadable modules
  watchdog: booke_wdt: Document unused parameter of __booke_wdt_disable()
  watchdog: wdat_wdt: map registers that fall inside ACPI NVS
  watchdog: Add Nuvoton MA35D1 watchdog driver support
  dt-bindings: watchdog: Add MA35D1 Watchdog
  watchdog: qcom: report bootstatus on IPQ9574 and IPQ5332
  watchdog: qcom: report WDIOF_POWERUNDER in bootstatus
  watchdog: sprd: Remove redundant dev_err()
  watchdog: sama5d4: Remove redundant dev_err()
  watchdog: realtek_otto: Remove redundant dev_err_probe()
  watchdog: orion: Remove redundant dev_err()
  watchdog: marvell_gti: Remove redundant dev_err_probe()
  ...
2026-08-19 09:53:35 -07:00
Linus Torvalds
1200d84f4c powerpc updates for 7.3
- powerpc: Enable Rust for ppc64le
 
  - ppc4xx gpio driver updates
 
  - Add power12 base enablement support
 
  - Validate arch_compat against host compatibility mode
 
  - Simplify bootx_scan_dt_build_struct() in powermac platform
 
  - powerpc: implement get_direction() in cpm2
 
  - Use cpu_relax() in ps3_create_spu()
 
  - Add NULL guard for cause_ipi in smp_muxed_ipi_message_pass
 
  - fixes to handle pseries watchdogs in kdump path
 
  - powerpc/irq: Fix missing r2 clobber in PCREL inline assembly
 
  - ppc44x: Set GPIO chip parent
 
  - KVM: PPC: Introduce KVM_CAP_PPC_COMPAT_CAPS and wire up ioctl BY: Amit Machhiwal
 
  - KVM: powerpc: Use generic xfer to guest work function
 
  - Enable to run posix cpu timers in task context
 
  - misc fixes and cleanups
 
 Thanks to:
 Aditya Gupta, Alice Ryhl, Amit Machhiwal, Andrew Morton, Anushree Mathur,
 Athira Rajeev, Bartosz Golaszewski, Cédric Le Goater, Christian König,
 Christophe Leroy (CS GROUP), Gary Guo, Gaurav Batra, Gautam Menghani, Gou Hao,
 Hari Bathini, Harsh Prateek Bora, jiazhenyuan, Jinjie Ruan, Link Mauve, Linus
 Walleij, Mahesh Kumar G Mahesh Salgaonkar, Michael Walle, Michal Suchánek,
 Mukesh Kumar Chaurasiya (IBM), Nicholas Piggin, Nikhil Kumar Singh, Praveen K
 Pandey, Ritesh Harjani (IBM), Rosen Penev, Saket Kumar Bhaskar, Shrikanth
 Hegde, Sourabh Jain, Thorsten Blum, Vaibhav Jain, Venkat Rao Bagalkote, Vishal
 Chourasia, Wentao Guan, Yanfei Xu
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEqX2DNAOgU8sBX3pRpnEsdPSHZJQFAmqCj/4ACgkQpnEsdPSH
 ZJSKNg//VNpbzMKVPrdljgLn3P8/flWUUMvbjT0j2s5OExeFPjM9tvJQucMficJz
 eQWaEZbaczRPdtBDt96NXXDIoXGpfapS1Tj18OjVjCRtQdKV4DGfNdE5wC2tKwvA
 1R6x5FT6pGxCRuNY9o3aAo/qcEJLCWCtOvrgdlT8C9ZV8Zh/GRl5TXBYqB4LFYAd
 WI1Jc4s97VFNtPSh7HtImd5n8T8vNWqQzi1rUAWTYQPduV8eHKFhnyu9vIh2ISv8
 p6dZzE6mLrgn7zU8HW2z5nRyRZFRXtWt3i7/0IGSsJYtBoREsFw2d3LJfwMZXwdU
 hXNbw9OlwDmPUF8+qFIEVu3czfiFW1naNEXP00NJfM+67acXIpFEiJ/LvuLENzC4
 gtX1VKUCQthWxJESnX1WrKnP7BAjUGe691CronRoYIJNctLnrCA7SOfJ2El4i40v
 v0+oz8KceGE3AU/1SpcKC8WlrHGb7qDBHS1HD8wpdcMsL1LTUWlghAptc/CrpRSb
 vDbiQAK7RHAEVSx6CsW1pVdFGOk5k7QQgeX6ptyK2aliQhuS4UA5b7zMmE+agPY4
 Pro2bQLZYPfIW92OB1Zf+h69bUn4aVyp5ov1U1kTJuFHSEH+9+ZVemZg/f2fN8LV
 bwgErs0YPL/N5099qolj9mmNvn8RcVwub6nIGrVryGbBLprlV3o=
 =4Mg5
 -----END PGP SIGNATURE-----

Merge tag 'powerpc-7.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc updates from Madhavan Srinivasan:

 - Enable Rust for ppc64le

 - ppc4xx gpio driver updates

 - Add power12 base enablement support

 - Validate arch_compat against host compatibility mode

 - Simplify bootx_scan_dt_build_struct() in powermac platform

 - Implement get_direction() in cpm2

 - Use cpu_relax() in ps3_create_spu()

 - Add NULL guard for cause_ipi in smp_muxed_ipi_message_pass

 - Fixes to handle pseries watchdogs in kdump path

 - Fix missing r2 clobber in PCREL inline assembly

 - Set GPIO chip parent on ppc44x

 - KVM: Introduce KVM_CAP_PPC_COMPAT_CAPS and wire up ioctl

 - KVM: Use generic xfer to guest work function

 - Enable to run posix cpu timers in task context

 - Misc fixes and cleanups

Thanks to Aditya Gupta, Alice Ryhl, Amit Machhiwal, Andrew Morton,
Anushree Mathur, Athira Rajeev, Bartosz Golaszewski, Cédric Le Goater,
Christian König, Christophe Leroy (CS GROUP), Gary Guo, Gaurav Batra,
Gautam Menghani, Gou Hao, Hari Bathini, Harsh Prateek Bora, jiazhenyuan,
Jinjie Ruan, Link Mauve, Linus Walleij, Mahesh Kumar G Mahesh
Salgaonkar, Michael Walle, Michal Suchánek, Mukesh Kumar Chaurasiya
(IBM), Nicholas Piggin, Nikhil Kumar Singh, Praveen K Pandey, Ritesh
Harjani (IBM), Rosen Penev, Saket Kumar Bhaskar, Shrikanth Hegde,
Sourabh Jain, Thorsten Blum, Vaibhav Jain, Venkat Rao Bagalkote, Vishal
Chourasia, Wentao Guan, and Yanfei Xu.

* tag 'powerpc-7.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (62 commits)
  powerpc/pseries/iommu: switch to Default DMA window during kdump
  powerpc/configs: enable CONFIG_RAS to fix EDAC support
  KVM: PPC: Document KVM_PPC_GET_COMPAT_CAPS ioctl
  KVM: PPC: Book3S HV: Add support for compat CPU capabilities for KVM on PowerNV
  KVM: PPC: Book3S HV: Implement compat CPU capability retrieval for KVM on PowerVM
  KVM: PPC: Introduce KVM_CAP_PPC_COMPAT_CAPS and wire up ioctl
  gpio: ppc44x: use dev_name() for chip label
  gpio: ppc44x: fix undefined behavior in GPIO_MASK2 macro
  gpio: ppc44x: drop PPC-specific IO helpers
  gpio: ppc44x: Convert GPIO to generic MMIO
  gpio: ppc44x: Use platform resource helper for GPIO MMIO
  gpio: ppc44x: Use module platform driver helper for GPIO
  gpio: ppc44x: update all 4xx to 44x
  gpio: move ppc4xx gpio driver from arch/powerpc to drivers/gpio
  KVM: PPC: Use min() in kvm_vm_ioctl_check_extension()
  KVM: PPC: booke: Use min() in watchdog_next_timeout()
  powerpc/perf: Add power12 Base Performance Monitoring support
  powerpc: Add Power12 architected mode
  powerpc: Add Power12 raw mode
  powerpc/pseries: Limit PVR list to 16 entries for CAS negotiation
  ...
2026-08-18 12:08:13 -07:00
bui duc phuc
3bbbeb7fdd watchdog: orion_wdt: Propagate errors from optional IRQ lookup
platform_get_irq_optional() returns a positive IRQ number on success or
a negative error code on failure. For an optional IRQ, -ENXIO indicates
that no IRQ is available, while other errors should be propagated.

Propagate errors such as -EPROBE_DEFER and -EINVAL instead of continuing
probe without the IRQ.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://lore.kernel.org/r/20260810082606.42623-1-phucduc.bui@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:05 -07:00
bui duc phuc
2bab791e56 watchdog: qcom: Propagate errors from optional IRQ lookup
platform_get_irq_optional() returns a positive IRQ number on success or
a negative error code on failure. For an optional IRQ, -ENXIO indicates
that no IRQ is available, while other errors should be propagated.

Instead of only checking for -EPROBE_DEFER, propagate all error codes
returned by platform_get_irq_optional() other than -ENXIO, so that
failures are properly reported to the caller.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://lore.kernel.org/r/20260810105101.55945-1-phucduc.bui@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:05 -07:00
bui duc phuc
1f3c3fa76d watchdog: aspeed: Propagate errors from optional IRQ lookup
platform_get_irq_optional() returns a positive IRQ number on success or
a negative error code on failure. For an optional IRQ, -ENXIO indicates
that no IRQ is available, while other errors should be propagated.

Propagate errors such as -EPROBE_DEFER and -EINVAL instead of continuing
probe without the IRQ.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://lore.kernel.org/r/20260807081652.38692-4-phucduc.bui@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:05 -07:00
bui duc phuc
553edb793e watchdog: stm32_iwdg: Propagate errors from optional IRQ lookup
platform_get_irq_optional() returns a positive IRQ number on success or
a negative error code on failure. For an optional IRQ, -ENXIO indicates
that no IRQ is available, while other errors should be propagated.

Propagate errors such as -EPROBE_DEFER and -EINVAL instead of continuing
probe without the IRQ.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://lore.kernel.org/r/20260807080447.35479-2-phucduc.bui@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:05 -07:00
bui duc phuc
ac4bf51d4d watchdog: dw_wdt: Propagate errors from optional IRQ lookup
platform_get_irq_optional() returns a positive IRQ number on success or
a negative error code on failure. For an optional IRQ, -ENXIO indicates
that no IRQ is available, while other errors should be propagated.

Instead of only checking for -EPROBE_DEFER, propagate all error codes
returned by platform_get_irq_optional() other than -ENXIO, so that
failures are properly reported to the caller.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://lore.kernel.org/r/20260807081652.38692-3-phucduc.bui@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:05 -07:00
bui duc phuc
7528abb515 watchdog: mediatek: Propagate errors from optional IRQ lookup
platform_get_irq_optional() returns a positive IRQ number on success or
a negative error code on failure. For an optional IRQ, -ENXIO indicates
that no IRQ is available, while other errors should be propagated.

Instead of only checking for -EPROBE_DEFER, propagate all error codes
returned by platform_get_irq_optional() other than -ENXIO, so that
failures are properly reported to the caller.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://lore.kernel.org/r/20260807081652.38692-2-phucduc.bui@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:05 -07:00
Christophe JAILLET
799ef16e46 watchdog: apple: Constify some structures
'struct watchdog_ops' and 'struct watchdog_info' are not modified in this
driver.

Constifying these structure moves some data to a read-only section, so
increases overall security, especially when the structure holds some
function pointers.

On a x86_64, with allmodconfig:
Before:
======
   text	   data	    bss	    dec	    hex	filename
   7319	   1768	      0	   9087	   237f	drivers/watchdog/apple_wdt.o

After:
=====
   text	   data	    bss	    dec	    hex	filename
   7543	   1544	      0	   9087	   237f	drivers/watchdog/apple_wdt.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/99019b7e560c2d9c087be340e68f9cce4db1988e.1786283336.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:05 -07:00
Mayank Rungta
382a3cd59e watchdog: pretimeout: Convert dump pretimeout governor to tristate
Commit 645ad41da8b2 ("watchdog: pretimeout: Add "dump" pretimeout
governor") added the "dump" watchdog pretimeout governor, but restricted
it to built-in code because trigger_all_cpu_backtrace() was not exported
to loadable modules.

Now that CPU backtrace APIs are supported for loadable kernel modules
via cpumask_backtrace(), convert WATCHDOG_PRETIMEOUT_GOV_DUMP to
tristate. This allows kernels to deliver the pretimeout governor as a
loadable kernel module.

Signed-off-by: Mayank Rungta <mrungta@google.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Link: https://lore.kernel.org/r/20260730-export-cpu-backtrace-apis-v1-2-bace8e1cb817@google.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:05 -07:00
Babanpreet Singh
b583ce8541 watchdog: booke_wdt: Document unused parameter of __booke_wdt_disable()
scripts/kernel-doc -none reports:

  Warning: drivers/watchdog/booke_wdt.c:158 function parameter 'data'
  not described in '__booke_wdt_disable'

__booke_wdt_disable() is invoked through on_each_cpu(), so it takes a
void * argument that it does not use. Its kernel-doc comment does not
describe the parameter at all.

Document it as unused.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Babanpreet Singh <bbnpreetsingh@gmail.com>
Link: https://lore.kernel.org/r/20260730060617.7-3-bbnpreetsingh@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Renê de Souza Pinto
0ab46a83fa watchdog: wdat_wdt: map registers that fall inside ACPI NVS
Some firmwares describe WDAT registers inside memory ranges marked as
ACPI NVS in the E820 map, failing with -EBUSY during probe, leaving the
hardware watchdog unserviced and triggering periodic system resets.

This issue was observed on a OnLogic Karbon 524 device (when watchdog is
enabled in BIOS):

wdat_wdt wdat_wdt: error -EBUSY: can't request region for resource [mem 0x63df7a98]
wdat_wdt wdat_wdt: probe with driver wdat_wdt failed with error -16

Check whether the region falls inside ACPI NVS before requesting it and,
if so, map it without reservation.

Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
Link: https://lore.kernel.org/r/20260804103958.3684195-1-rene@renesp.com.br
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Zi-Yu Chen
80141041bd watchdog: Add Nuvoton MA35D1 watchdog driver support
Add driver support for the Watchdog Timer (WDT) integrated in
Nuvoton MA35D1 SoC. This driver provides standard watchdog functionality,
including timeout configuration, ping, and system reset support via
the watchdog framework.

Signed-off-by: Zi-Yu Chen <zychennvt@gmail.com>
Link: https://lore.kernel.org/r/20260804070351.1846165-3-zychennvt@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Kathiravan Thirumoorthy
6a393b0ea3 watchdog: qcom: report bootstatus on IPQ9574 and IPQ5332
Report bootstatus on IPQ5332 and IPQ9574. These SoCs use different
restart-reason values from IPQ5424 for watchdog reset and powerunder
reset events, so add separate match data for them and use it when
decoding the restart reason.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260728-qcom_wdt_powerunder-v1-2-de8d9e964e7d@oss.qualcomm.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Kathiravan Thirumoorthy
0595f74ea1 watchdog: qcom: report WDIOF_POWERUNDER in bootstatus
On IPQ platforms, identify the restart reason as POWERUNDER, similar to
CARDRESET, and expose it via the bootstatus sysfs interface.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260728-qcom_wdt_powerunder-v1-1-de8d9e964e7d@oss.qualcomm.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Pan Chuang
7aa968415c watchdog: sprd: Remove redundant dev_err()
Since commit
55b48e23f5 ("genirq/devres: Add error handling in devm_request_*_irq()"),
devm_request_irq() automatically logs detailed error messages on
failure. Remove the now-redundant driver-specific dev_err() call.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Link: https://lore.kernel.org/r/20260722084218.79073-10-panchuang@vivo.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Pan Chuang
0e2d63f85a watchdog: sama5d4: Remove redundant dev_err()
Since commit
55b48e23f5 ("genirq/devres: Add error handling in devm_request_*_irq()"),
devm_request_irq() automatically logs detailed error messages on
failure. Remove the now-redundant driver-specific dev_err() call.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20260722084218.79073-9-panchuang@vivo.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Pan Chuang
d7c4cef982 watchdog: realtek_otto: Remove redundant dev_err_probe()
Since commit
55b48e23f5 ("genirq/devres: Add error handling in devm_request_*_irq()"),
devm_request_irq() automatically logs detailed error messages on
failure. Remove the now-redundant driver-specific dev_err_probe() call.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Link: https://lore.kernel.org/r/20260722084218.79073-8-panchuang@vivo.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Pan Chuang
329b7e841f watchdog: orion: Remove redundant dev_err()
Since commit
55b48e23f5 ("genirq/devres: Add error handling in devm_request_*_irq()"),
devm_request_irq() automatically logs detailed error messages on
failure. Remove the now-redundant driver-specific dev_err() calls.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Link: https://lore.kernel.org/r/20260722084218.79073-7-panchuang@vivo.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Pan Chuang
c19929a8d8 watchdog: marvell_gti: Remove redundant dev_err_probe()
Since commit
55b48e23f5 ("genirq/devres: Add error handling in devm_request_*_irq()"),
devm_request_irq() automatically logs detailed error messages on
failure. Remove the now-redundant driver-specific dev_err_probe() call.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Link: https://lore.kernel.org/r/20260722084218.79073-6-panchuang@vivo.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Pan Chuang
9e34598b92 watchdog: keembay: Remove redundant dev_err_probe()
Since commit
55b48e23f5 ("genirq/devres: Add error handling in devm_request_*_irq()"),
devm_request_irq() automatically logs detailed error messages on
failure. Remove the now-redundant driver-specific dev_err_probe() calls.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Link: https://lore.kernel.org/r/20260722084218.79073-5-panchuang@vivo.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Pan Chuang
762d7d93ee watchdog: intel-mid_wdt: Remove redundant dev_err()
Since commit
55b48e23f5 ("genirq/devres: Add error handling in devm_request_*_irq()"),
devm_request_irq() automatically logs detailed error messages on
failure. Remove the now-redundant driver-specific dev_err() call.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Link: https://lore.kernel.org/r/20260722084218.79073-4-panchuang@vivo.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Pan Chuang
767d2416d8 watchdog: cadence_wdt: Remove redundant dev_err()
Since commit
55b48e23f5 ("genirq/devres: Add error handling in devm_request_*_irq()"),
devm_request_irq() automatically logs detailed error messages on
failure. Remove the now-redundant driver-specific dev_err() call.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Link: https://lore.kernel.org/r/20260722084218.79073-3-panchuang@vivo.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Pan Chuang
010993649a watchdog: bd96801_wdt: Remove redundant dev_err_probe()
Since commit
55b48e23f5 ("genirq/devres: Add error handling in devm_request_*_irq()"),
devm_request_threaded_irq() automatically logs detailed error messages on
failure. Remove the now-redundant driver-specific dev_err_probe() call.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Link: https://lore.kernel.org/r/20260722084218.79073-2-panchuang@vivo.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Rasmus Villemoes
19ff50d05f watchdog: take all OF aliases into account when assigning id
If some, but not all, watchdog devices have device tree aliases, those
without aliases might (depending on probe order) be assigned an id
which would otherwise be assigned to one of those with an alias.

This is problematic when for example watchdog0 is an alias for an
always-running gpio watchdog that userspace must handle, but the SOC's
watchdog device(s) get probed first and thus one of those become
/dev/watchdog0, and then at some point later, the gpio watchdog device
gets probed and becomes /dev/watchdog5.

Ensure that ids for devices without a device tree alias are allocated
from among those where no watchdogX alias exists.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Link: https://lore.kernel.org/r/20260714105356.2931450-1-linux@rasmusvillemoes.dk
[groeck: Use scnprintf() instead of snprintf() to make gcc happy]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Pengpeng Hou
5e845fe634 watchdog: via_wdt: add missing MODULE_DEVICE_TABLE()
The driver has a match table for the pci bus wired into its driver
structure, but the table is not exported with MODULE_DEVICE_TABLE().

Add the missing MODULE_DEVICE_TABLE() entry so module alias information
is generated for automatic module loading.

This is a source-level fix.  It does not claim dynamic hardware
reproduction; the evidence is the driver-owned match table, its use by
the driver registration structure, and the missing module alias
publication.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20260705001613.68871-1-pengpeng@iscas.ac.cn
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Rustam Adilov
969ca8f12d watchdog: realtek-otto: Change to use regmap API
To make the realtek watchdog driver functional when SWAP_IO_SPACE
config is enabled, change all of the register access to be done
by regmap API which helps us to tweak endianness with big-endian
or little-endian property from within the device tree node.

Add the REGMAP_MMIO as a select to REALTEK_OTTO_WDT now that the
regmap is used.

Signed-off-by: Rustam Adilov <adilov@disroot.org>
Link: https://lore.kernel.org/r/20260710074316.46643-2-adilov@disroot.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Tomer Maimon
7762911c0d watchdog: npcm: add bootstatus support
The NPCM750 uses RESSR and the NPCM845 uses INTCR2 to latch reset
indications. Read those bits during probe and map them into watchdog
bootstatus flags.

For NPCM845, cache the sampled INTCR2 state in SCRPAD10 after the reset
status bits are cleared so later probes can report the same boot-time
state. Also report WDIOF_CARDRESET for the watchdog instance whose reset
bit is latched, while leaving WPCM450 behavior unchanged.

Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
Link: https://lore.kernel.org/r/20260706144828.3517631-4-tmaimon77@gmail.com
[groeck: Declare npcm750_data and npcm845_data with __maybe_unused]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Mark Pearson
d34f921cf4 watchdog: lenovo_se30g2_se60_wdt: Watchdog for Lenovo SE30G2 and SE60
Watchdog driver implementation for Lenovo SE30G2 and SE60 platforms.

Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Link: https://lore.kernel.org/r/20260706145412.3833185-1-mpearson-lenovo@squebb.ca
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Paul Louvel
c9aab8bba2 watchdog: w83627hf_wdt: Use WDOG_HW_RUNNING for running chip on boot
If the watchdog is already running when the driver is initialized, the
driver currently refreshes it once using the default timeout of 60
seconds.

Since commit ee142889e3 ("watchdog: Introduce WDOG_HW_RUNNING flag"),
the watchdog core can kick an already running watchdog alive until
userspace open the device.

Add the WDOG_HW_RUNNING flag to the watchdog status if the watchdog is
already running.

Signed-off-by: Paul Louvel <paul.louvel@bootlin.com>
Link: https://lore.kernel.org/r/20260707-w83627hf_wdt-nct6126d-v4-3-829e5f63d548@bootlin.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:04 -07:00
Paul Louvel
3d6757a640 watchdog: w83627hf_wdt: Report the probed chip name via WDIOC_GETSUPPORT
The watchdog identity string reported via WDIOC_GETSUPPORT has always
been hardcoded to "W83627HF Watchdog", even though this driver supports
a wide range of Nuvoton/Winbond Super I/O chips.

This is misleading, since the driver itself correctly log the chip name
in wdt_init(), but could report later a different chip name with
WDIOC_GETSUPPORT.

Instead format the identity at probe time using the actual chip name
that was detected.

Signed-off-by: Paul Louvel <paul.louvel@bootlin.com>
Link: https://lore.kernel.org/r/20260707-w83627hf_wdt-nct6126d-v4-2-829e5f63d548@bootlin.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:03 -07:00
Paul Louvel
aad2cb5457 watchdog: w83627hf_wdt: Correctly identify Nuvoton NCT6126 chip
Currently, the NCT6126 is probed as a NCT6116 because the NCT6126 shares
the same high-byte chip ID as the NCT6116.

Read the low byte of the chip ID as well to distinguish between the two
devices and identify the NCT6126 correctly.

Signed-off-by: Paul Louvel <paul.louvel@bootlin.com>
Link: https://lore.kernel.org/r/20260707-w83627hf_wdt-nct6126d-v4-1-829e5f63d548@bootlin.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:03 -07:00
Tzung-Bi Shih
8bb763d4c3 watchdog: pretimeout: Add "dump" pretimeout governor
Add a new "dump" pretimeout governor that triggers a backtrace of all
CPUs (via trigger_all_cpu_backtrace()) to the kernel log buffer.  This
provides diagnostic information right before the hardware watchdog
fires.

In addition, update the WATCHDOG_PRETIMEOUT_GOV_SEL Kconfig logic to
fall back to the "panic" governor only when both "noop" and "dump"
governors are disabled.

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20260707102105.3600275-1-tzungbi@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:03 -07:00
Uwe Kleine-König (The Capable Hub)
d4011cda7f watchdog: Use named initializers for platform_device_id arrays
Named initializers are better readable and more robust to changes of the
struct definition. This robustness is relevant for a planned change to
struct platform_device_id replacing .driver_data by an anonymous union.

For one driver drop the unused assignment to .driver_data instead.

While touching these arrays unify spacing and usage of commas.

There is no effect on the compiled arrays.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/22bc09d0c9c8dfe75a205b0a9ccc98ccfba1de10.1781622532.git.u.kleine-koenig@baylibre.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 09:00:03 -07:00
Hongyan Xu
8444d66aa6 watchdog: at91sam9_wdt: prevent timer rearm during teardown
at91_ping() rearms the watchdog timer from its callback. timer_delete()
neither waits for a running callback nor prevents it from rearming the
timer, so probe failure or driver removal can leave the timer accessing the
devm-allocated at91wdt after it has been freed.

Use timer_shutdown_sync() on both teardown paths. It waits for a running
callback and rejects any attempt by the callback to rearm the timer.

Fixes: 5161b31dc3 ("watchdog: at91sam9_wdt: better watchdog support")
Signed-off-by: Hongyan Xu <getshell@seu.edu.cn>
Link: https://lore.kernel.org/r/20260806060613.1830-1-getshell@seu.edu.cn
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-06 14:23:55 -07:00
Sourabh Jain
516a254918 powerpc/pseries: Move H_WATCHDOG definitions to a common header
The H_WATCHDOG input and output definitions are currently local to the
pseries watchdog driver. The next patch in this series also needs these
definitions to issue H_WATCHDOG hypercalls outside the watchdog driver.

Move the H_WATCHDOG definitions to a new common header,
asm/papr-watchdog.h, so they can be shared without duplicating the
PAPR watchdog definitions.

No functional changes.

Cc: stable@vger.kernel.org
Suggested-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260727053416.276317-2-sourabhjain@linux.ibm.com
2026-08-03 14:05:55 +05:30
Matti Vaittinen
1246aa2b6c watchdog: bd96801_wdt: Fix timeout for enabled WDG
When watchdog is enabled at the probe time, the bd96801 driver retrieves
the timeout configuration from the registers to set-up the heart-beat
values.

As Sashiko pointed out at
https://lore.kernel.org/all/20260722085819.495211F000E9@smtp.kernel.org/
the timeout values are incorrectly computed in driver, resulting wrong
heartbeat. This leads to devere problems if watchdog was enabled at probe
time.

According to the data-sheet, the "too fast" ping limit is configured as
multiple of FASTNG_MIN. Furthermore, the "too slow" ping limit is
configured as multiples of "too fast" timeout. The FASTNG_MIN is set to
11, meaning 1.1 mS and "too fast" and "too slow" limits are computed from
this. Hence, converting the limits to mS should be done by dividing by 10,
not by dividing by USEC_PER_MSEC.

Fix this by dividing the timeout values with correct scaling factor.

While at it, fix whitespace problem (double empty line).

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Fixes: 09dad69757 ("watchdog: ROHM BD96801 PMIC WDG driver")
Link: https://lore.kernel.org/r/amxskHmQbi9v-8_l@mva-rohm
[groeck: Added reference to whitespace change to description]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-07-31 07:19:08 -07:00
Linus Walleij
b8bc38bcec mfd: db8500-prcmu: Fold dbx500 header into db8500
Move the DBx500 PRCMU definitions into the DB8500 PRCMU
header and delete the wrapper header.

Convert users of simple PRCMU wrappers to call the DB8500 helpers
directly.

The dbx500-prcmu.h header was the result of an earlier attempt to
abstract several DBx5x SoC PRCMU units to use the same abstract
header. They are deleted from the kernel and this is not just
causing maintenance burden and build errors.

The stub code is using -ENOSYS in a way checkpatch complains about
so replace these with -EINVAL while we're at it.

Assisted-by: Codex:gpt-5-5
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202606180825.vUSQntkJ-lkp@intel.com/
Signed-off-by: Linus Walleij <linusw@kernel.org>
Acked-by: Brian Masney <bmasney@redhat.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/oe-kbuild-all/202606180825.vUSQntkJ-lkp@intel.com/
Link: https://patch.msgid.link/20260619-mfd-prcmu-merge-headers-v1-1-8ea0ee23b4d6@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:32:45 +01:00
Surendra Singh Chouhan
8d2b10eef6 watchdog: atcwdt200: fix return value when watchdog is enabled
atcwdt_get_int_timer_type() returned TMR_UNKNOWN (enum value 3) when
CTRL_WDT_EN was set in the control register.

Because atcwdt_probe() checks "ret = atcwdt_get_int_timer_type(drv_data);
if (ret) return ret;", returning TMR_UNKNOWN caused probe() to return 3
instead of a valid negative error code.

Fix this by returning -EBUSY via dev_err_probe() when the watchdog is
already enabled and update the kernel-doc description accordingly.

Fixes: e4e0848ad0 ("watchdog: atcwdt200: Add driver for Andes ATCWDT200")
Signed-off-by: Surendra Singh Chouhan <kr494167@gmail.com>
Link: https://lore.kernel.org/r/20260723022634.8642-1-kr494167@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-07-27 15:08:15 -07:00
Linus Torvalds
08de7d9d24 watchdog fixes for v7.2-rc5
Notable fixes:
 
 - airoha: Prevent division by zero when clock frequency is zero
 
 - core: pretimeout: Fix UAF in watchdog_unregister_governor()
 
 - ni903x_wdt: Check ACPI_COMPANION() against NULL
 
 - s32g_wdt: remove incorrect options in watchdog_info struct
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEiHPvMQj9QTOCiqgVyx8mb86fmYEFAmpg9jQACgkQyx8mb86f
 mYECGw//fpjigslXk+hj7G/qZ+ng2Cct34tbXPCf5z9mxnmWwu678vGFs1/V3vJp
 0Ix0CbsXIAmlzgaenFFqHU0WFWbd8VrQTw0tAOwoEpMpyZ+Z2pYiZ7TY1Y3lHPhR
 bMj5Wsts2Vtni1o2/iOi3dUiqMPwQ6gpYgmCoQSPweA7CUpjvcYEjBcLSiz59eCz
 z1HiyMdOUt+elo1UUazJuLJZR5E6BfeGYmiAJ04N+yjuKcytV1I8dTLHtnQUt8Tu
 CG+DRJEGBfM0TeLQfUGtQqvCXNwhuEKgEwj+gL030fuIjyIV70nmO/jjRmitAQsu
 rpgcl9HWH0Y8ZMpYzG/ZXC1pg861aJSumPR2mqT1hHKqXqxhv4qk8hoSKH3TSBbF
 Glbzdjtd0A2LR43Z2+tCdZmCf2Q7iFgr6CyZnq/1mmGLT90HbytSYTMiZpumKuN1
 FwWUyEgMDk81L9bxzdmaGhg0XyuwzXhL8bk3tzBPKOqnmtNfIFHQVN8NKAuPzPgR
 W38R3cq7H+GsEVjVBZWkqP6Ij6HKfj186bjeeOMEWnPkicwBNi201mZTS+7arAE5
 oxlfNOLAjtsd9ml7130ddVz2zZ2Ez2zhNvf23Bu/uIHaVjSr5FId0Gnbeywf/JLh
 whflQmaMPXs4a5kzppk23PAZVwYJ8PN7QYhPoDgfJzLJSJwEqJY=
 =12+G
 -----END PGP SIGNATURE-----

Merge tag 'watchdog-for-v7.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull watchdog fixes from Guenter Roeck:

 - airoha: Prevent division by zero when clock frequency is zero

 - core: pretimeout: Fix UAF in watchdog_unregister_governor()

 - ni903x_wdt: Check ACPI_COMPANION() against NULL

 - s32g_wdt: remove incorrect options in watchdog_info struct

* tag 'watchdog-for-v7.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  watchdog: airoha: Prevent division by zero when clock frequency is zero
  watchdog: pretimeout: Fix UAF in watchdog_unregister_governor()
  docs: watchdog: Fix brackets
  watchdog: ni903x_wdt: Check ACPI_COMPANION() against NULL
  watchdog: s32g_wdt: remove incorrect options in watchdog_info struct
2026-07-22 11:15:49 -07:00
Wayen Yan
bcfcd7619f watchdog: airoha: Prevent division by zero when clock frequency is zero
clk_get_rate() can return 0 when the clock provider is not properly
configured or the clock is unmanaged. The driver uses wdt_freq as a
divisor directly in airoha_wdt_probe() to compute max_timeout and in
airoha_wdt_get_timeleft() to compute the remaining time, which results
in a division by zero.

Add a check for wdt_freq == 0 in probe and return -EINVAL with
dev_err_probe() to prevent the division by zero and provide a
diagnostic message.

Fixes: 3cf67f3769 ("watchdog: Add support for Airoha EN7851 watchdog")
Signed-off-by: Wayen Yan <win847@gmail.com>
Link: https://lore.kernel.org/r/178347932594.81327.4834644880399144119@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-07-08 07:08:50 -07:00
Tzung-Bi Shih
7362ba0f9c watchdog: pretimeout: Fix UAF in watchdog_unregister_governor()
When a watchdog governor is unregistered, it updates existing watchdog
devices that were using this governor by falling back to `default_gov`.

If the governor being unregistered is currently set as `default_gov`,
the `default_gov` is never cleared.  This leads to 2 use-after-free
issues:
1. New watchdog devices registered after this point will inherit the
   dangling `default_gov`.
2. Existing watchdog devices using the unregistered governor will have
   their `wdd->gov` reassigned to the dangling `default_gov`.

Fix the UAF by clearing `default_gov` if it matches the governor being
unregistered.

Fixes: da0d12ff2b ("watchdog: pretimeout: add panic pretimeout governor")
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20260707101803.3598173-1-tzungbi@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-07-08 07:06:59 -07:00
Uwe Kleine-König (The Capable Hub)
995832b2ce Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files)
Replace the #include of <linux/mod_devicetable.h> by the more specific
<linux/device-id/*.h> where applicable. For most cases the include
can be dropped completely, only a few drivers need one or two headers
added.

Acked-by: Danilo Krummrich <dakr@kernel.org>
Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/1a3f2007c5c5dcf555c09a4035ce3ae8ef1b6c49.1782808461.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
2026-07-03 07:38:17 +02:00
Rafael J. Wysocki
36e05e134e watchdog: ni903x_wdt: Check ACPI_COMPANION() against NULL
Every platform driver can be forced to match a device that doesn't match
its list of device IDs because of device_match_driver_override(), so
platform drivers that rely on the existence of a device's ACPI companion
object need to verify its presence.

Accordingly, add a requisite ACPI_COMPANION() check against NULL to the
ni903x_wdt watchdog driver.

Fixes: d37ec2fbab ("watchdog: ni903x_wdt: Convert to a platform driver")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/2280455.irdbgypaU6@rafael.j.wysocki
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-07-02 07:09:51 -07:00
Ethan Nelson-Moore
2b37415618 watchdog: s32g_wdt: remove incorrect options in watchdog_info struct
The s32g_wdt driver uses two incorrect constants in the options field
of its watchdog_info struct. This bit mask should contain WDIOF_*
constants, but the driver uses two WDIOC_* ioctl constants (in addition
to correct WDIOF_* constants). This causes many incorrect bits to be
set in the bit mask. The functionality indicated by these ioctl
constants is supported by all drivers using the watchdog framework, so
this patch simply removes them.

Fixes: bd3f54ec55 ("watchdog: Add the Watchdog Timer for the NXP S32 platform")
Cc: stable@vger.kernel.org # 6.18+
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Acked-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260505024409.60301-1-enelsonmoore@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-07-02 07:09:51 -07:00
Linus Torvalds
7e54cdd056 watchdog updates and fixes for v7.2
* subsystem
 
 - Unregister PM notifier on watchdog unregister
 
 - Various documentation fixes and improvements
 
 * Removed drivers
 
 - Remove AMD Elan SC520 processor watchdog driver
 - Drop SMARC-sAM67 support
 - Remove driver for integrated WDT of ZFx86 486-based SoC
 
 * New drivers
 
 - Driver for Andes ATCWDT200
 
 - Driver for Gunyah Watchdog
 
 * Added support to existing drivers
 
 - Add "apple,t8103-wdt" and "apple,t8122-wdt" compatibles to Apple
   watchdog driver
 
 - Add rockchip,rk3528-wdt and rockchip,rv1103b-wdt to snps,dw-wdt.yaml
 
 - Document IPQ9650, IPQ5210, Shikra, Nord, and Hawi in qcom-wdt.yaml
   Also document sram property and add support to get the bootstatus
   to qcom wdt driver
 
 - lenovo_se10_wdt: Fix use-after-rfree and add support for SE10 Gen 2
   platform
 
 - ti,rti-wdt: Add ti,am62l-rti-wdt compatible
 
 - renesas: Document RZ/G3L support and rework example for
   renesas,r9a09g057-wdt
 
 * Other bug fixes and improvements
 
 - Use named initializers (sc1200, ziirave_wdt)
 
 - Allow pic32-dmt and pic32-wdt to be built with COMPILE_TEST
 
 - realtek-otto: enable clock before using I/O, and prevent PHASE2 underflows
 
 - rti_wdt: Add reaction control
 
 - renesas,rzn1-wdt: Drop interrupt support and other cleanup
 
 - gpio_wdt: Add ACPI support
 
 - imx7ulp_wdt: Keep WDOG running until A55 enters WFI on i.MX94
 
 - sprd_wdt: Remove redundant sprd_wdt_disable() on register failure
 
 - bcm2835_wdt: Switch to new sys-off handler API
 
 - sama5d4_wdt: Fix WDDIS detection on SAM9X60 and SAMA7G5
 
 - hpwdt: Refine hpwdt message for UV platform
 
 - Convert TS-4800 bindings to DT schema
 
 - menz069_wdt: drop unneeded MODULE_ALIAS
 
 - sp5100_tco: Use EFCH MMIO for newer Hygon FCH
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEiHPvMQj9QTOCiqgVyx8mb86fmYEFAmowBcsACgkQyx8mb86f
 mYEbpQ/+PAN/6V5DhDecXLEpb3hf7eX0NXykvrx9IqQKm7By1rrW5TjbjqSUweuF
 9AwOjw1bV6oxvBNWo+CcEvlJiX1Agjdv7GQwBawqBf0goWmOro6BuDTFtNFKXxsc
 h1TaOUXMBjN9YZK1lyHTrhMd51Wx+ifAosqMoDBmzKdV5mQm3SM5C04xkr+MxqBN
 PAsHUKnHKqTVmq0+qnbpSES+Pv5n+IsnoeMHylu0fCpTosd7EWCBn03WQjBZpsI6
 6ISOWP7Vthbu2Ae+m+X07TUHbEYZ9mOQi3kFCjEhjehurdTriyiiBeHk8V/3e1Ax
 mH1RezC7gVM1+tmGfQlfWjskYueds0GPUOYdgI3IhB0lYwdGFvxY7u6WaYs2egv1
 qsMrgTOSGEHbK/rBPZ/JDYC3lf35ueTuFmAW5NUhB40jQ0YVR6N8vDVbRm/1mBL4
 FwrBz94Nwvi4lsS1enG7HYwQtQMtJA7iFFs1lDtOl5Lj0EzOTQwUzIMnyQ1pUZOr
 ovL/2HgP1TtKiPPAFSfiDWGHin+rZQcrrMKRZ8vHseKS89LPrpv1WiI1ZEM3Q3T2
 2mfDuQp+6u/dEUtViv0BGqHY0XNE6qjRxsK5j9NuF4KvdXplHUgY3JCz/sWCI5rw
 t/aWt0hgSBs7xFeaCBjYW6ciCKfoY8CGq1z7nCwYhGkX46rc93Q=
 =macd
 -----END PGP SIGNATURE-----

Merge tag 'watchdog-for-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull watchdog updates and fixes from Guenter Roeck:
 "Subsystem:
   - Unregister PM notifier on watchdog unregister
   - Various documentation fixes and improvements

  Removed drivers:
   - Remove AMD Elan SC520 processor watchdog driver
   - Drop SMARC-sAM67 support
   - Remove driver for integrated WDT of ZFx86 486-based SoC

  New drivers:
   - Driver for Andes ATCWDT200
   - Driver for Gunyah Watchdog

  Added support to existing drivers:
   - Add "apple,t8103-wdt" and "apple,t8122-wdt" compatibles to Apple
     watchdog driver
   - Add rockchip,rk3528-wdt and rockchip,rv1103b-wdt to snps,dw-wdt.yaml
   - Document IPQ9650, IPQ5210, Shikra, Nord, and Hawi in qcom-wdt.yaml
     Also document sram property and add support to get the bootstatus
     to qcom wdt driver
   - lenovo_se10_wdt: Fix use-after-rfree and add support for SE10 Gen 2
     platform
   - ti,rti-wdt: Add ti,am62l-rti-wdt compatible
   - renesas: Document RZ/G3L support and rework example for
     renesas,r9a09g057-wdt

  Other bug fixes and improvements:
   - Use named initializers (sc1200, ziirave_wdt)
   - Allow pic32-dmt and pic32-wdt to be built with COMPILE_TEST
   - realtek-otto: enable clock before using I/O, and prevent PHASE2 underflows
   - rti_wdt: Add reaction control
   - renesas,rzn1-wdt: Drop interrupt support and other cleanup
   - gpio_wdt: Add ACPI support
   - imx7ulp_wdt: Keep WDOG running until A55 enters WFI on i.MX94
   - sprd_wdt: Remove redundant sprd_wdt_disable() on register failure
   - bcm2835_wdt: Switch to new sys-off handler API
   - sama5d4_wdt: Fix WDDIS detection on SAM9X60 and SAMA7G5
   - hpwdt: Refine hpwdt message for UV platform
   - Convert TS-4800 bindings to DT schema
   - menz069_wdt: drop unneeded MODULE_ALIAS
   - sp5100_tco: Use EFCH MMIO for newer Hygon FCH"

* tag 'watchdog-for-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (58 commits)
  watchdog: sc1200: Drop unused assignment of pnp_device_id driver data
  watchdog: unregister PM notifier on watchdog unregister
  dt-bindings: watchdog: qcom-wdt: Document IPQ5210 watchdog
  watchdog: dev: convert to kernel-doc comments
  watchdog: core: clean up some comments
  watchdog: uapi: add comments for what bit masks apply to
  watchdog: linux/watchdog.h: repair kernel-doc comments
  watchdog: add devm_watchdog_register_device() to watchdog-kernel-api
  watchdog: ziirave_wdt: Use named initializers for struct i2c_device_id
  watchdog: realtek-otto: enable clock before using I/O
  watchdog: realtek-otto: prevent PHASE2 underflows
  dt-bindings: watchdog: qcom-wdt: Document IPQ9650 watchdog
  dt-bindings: watchdog: renesas,rzn1-wdt: interrupts are not required
  dt-bindings: watchdog: apple,wdt: Add t8122 compatible
  watchdog: apple: Add "apple,t8103-wdt" compatible
  watchdog: rzn1: remove now obsolete interrupt support
  dt-bindings: watchdog: Add watchdog compatible for RK3528
  watchdog: convert the Kconfig dependency on OF_GPIO to OF
  watchdog: Remove AMD Elan SC520 processor watchdog driver
  watchdog: lenovo_se10_wdt: Fix use-after-free and resource leak risk
  ...
2026-06-16 08:04:24 +05:30
Uwe Kleine-König (The Capable Hub)
54c726fbb5 watchdog: sc1200: Drop unused assignment of pnp_device_id driver data
The driver explicitly sets the .driver_data member of struct
pnp_device_id to zero without relying on that value. Drop this unused
assignments.

While touching this array simplify the list terminator.

This patch doesn't modify the compiled array, only its representation in
source form benefits. The former was confirmed with builds on x86 and
arm64.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/0793f81a854f9e5880ad38f54c8583b3d56e5d60.1781081216.git.u.kleine-koenig@baylibre.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-10 06:09:45 -07:00
Yuho Choi
a298c7302e watchdog: unregister PM notifier on watchdog unregister
watchdog_register_device() registers wdd->pm_nb when
WDOG_NO_PING_ON_SUSPEND is set, but watchdog_unregister_device() does not
remove it. This leaves an embedded notifier block on the PM notifier chain
after the watchdog device has been unregistered.

A later suspend/resume notification can then call watchdog_pm_notifier()
with a stale watchdog_device pointer, or at minimum after wdd->wd_data has
been cleared by watchdog_dev_unregister().

Unregister the PM notifier before tearing down the watchdog device.

Fixes: 60bcd91aaf ("watchdog: introduce watchdog_dev_suspend/resume")
Signed-off-by: Yuho Choi <dbgh9129@gmail.com>
Link: https://lore.kernel.org/r/20260601192005.1970805-1-dbgh9129@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-08 11:57:23 -07:00
Randy Dunlap
975599591f watchdog: dev: convert to kernel-doc comments
Convert multiple functions to kernel-doc format.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-08 11:53:18 -07:00