]> www.infradead.org Git - users/willy/xarray.git/commit
phy: freescale: fsl-samsung-hdmi: Simplify REG21_PMS_S_MASK lookup
authorAdam Ford <aford173@gmail.com>
Sat, 14 Sep 2024 11:27:46 +0000 (06:27 -0500)
committerVinod Koul <vkoul@kernel.org>
Thu, 17 Oct 2024 13:13:35 +0000 (18:43 +0530)
commit375ee44adb3640099508c5c0c01d86f0bdb16e97
treeb05fc7c5e873ad3f8a42fcc733390b5e338b4984
parent4a5a9e2577d61a4ee3e9788e0c2b0c1cbc5ba7b3
phy: freescale: fsl-samsung-hdmi: Simplify REG21_PMS_S_MASK lookup

The value of 'S' is writen to two places, PHY_REG3[7:4] and
PHY_REG21[3:0].  There is a lookup table which contains
the value of PHY_REG3.  Rather than using a switch statement
based on the pixel clock to search for the value of 'S' again,
just shift the contents of PHY_REG3[7:4] >> 4 and place the value
in PHY_REG21[3:0].  Doing this can eliminate an entire function.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Tested-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
Tested-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
Link: https://lore.kernel.org/r/20240914112816.520224-3-aford173@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/freescale/phy-fsl-samsung-hdmi.c