]> www.infradead.org Git - users/jedix/linux-maple.git/commit
phy: phy-snps-eusb2: refactor reference clock init
authorIvaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
Sun, 4 May 2025 14:45:25 +0000 (17:45 +0300)
committerVinod Koul <vkoul@kernel.org>
Wed, 14 May 2025 10:43:38 +0000 (11:43 +0100)
commite36a5d1ecc5f2bda92e4f954f41d65d1ddd5728e
treec30b519c25d98d080f9269a69137579a81e4cfd2
parentaba7a966b50d11deeb3e2f1a66182d150eeb7843
phy: phy-snps-eusb2: refactor reference clock init

Instead of matching frequencies with a switch and case, introduce
a table-based lookup. This improves readability, reduces redundancy,
and makes it easier to extend support for additional frequencies in
the future.

Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250504144527.1723980-9-ivo.ivanov.ivanov1@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/phy-snps-eusb2.c