mirror-linux/drivers/phy/st
Christian Bruel fd75f371f3 phy: stm32: Fix constant-value overflow assertion
Rework the workaround as the lookup tables always fits into the bitfield,
and the default values are defined by the hardware and cannot be 0:

Guard against false positive with a WARN_ON check to make the compiler
happy: The offset range is pre-checked against the sorted imp_lookup_table
values and overflow should not happen and would be caught by a warning and
return in error.

Also guard against a true positive found during the max_vswing lookup, as a
max vswing value can be 802000 or 803000 microvolt depending on the current
impedance. Therefore set the default impedence index.

Fixes: 2de679ecd7 ("phy: stm32: work around constant-value overflow assertion")
Signed-off-by: Christian Bruel <christian.bruel@foss.st.com>
Link: https://lore.kernel.org/r/20250210103515.2598377-1-christian.bruel@foss.st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2025-02-10 22:26:07 +05:30
..
Kconfig phy: stm32: Add support for STM32MP25 COMBOPHY. 2024-10-07 12:17:07 +05:30
Makefile phy: stm32: Add support for STM32MP25 COMBOPHY. 2024-10-07 12:17:07 +05:30
phy-miphy28lp.c phy: miphy28lp: remove unused struct 'miphy_initval' 2024-06-03 19:29:44 +05:30
phy-spear1310-miphy.c phy: constify of_phandle_args in xlate 2024-02-23 17:43:14 +05:30
phy-spear1340-miphy.c phy: constify of_phandle_args in xlate 2024-02-23 17:43:14 +05:30
phy-stih407-usb.c
phy-stm32-combophy.c phy: stm32: Fix constant-value overflow assertion 2025-02-10 22:26:07 +05:30
phy-stm32-usbphyc.c phy: Switch back to struct platform_driver::remove() 2024-10-17 20:33:03 +05:30