]> www.infradead.org Git - users/jedix/linux-maple.git/commit
spi: spi-fsl-lpspi: Fix off-by-one in prescale max
authorStefan Wahren <wahrenst@gmx.net>
Thu, 5 Sep 2024 11:15:37 +0000 (13:15 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 5 Sep 2024 11:55:59 +0000 (12:55 +0100)
commitff949d981c775332be94be70397ee1df20bc68e5
tree422dbf55af089fa0366c92e9f035952aab4c04a8
parent5478a4f7b94414def7b56d2f18bc2ed9b0f3f1f2
spi: spi-fsl-lpspi: Fix off-by-one in prescale max

The commit 783bf5d09f86 ("spi: spi-fsl-lpspi: limit PRESCALE bit in
TCR register") doesn't implement the prescaler maximum as intended.
The maximum allowed value for i.MX93 should be 1 and for i.MX7ULP
it should be 7. So this needs also a adjustment of the comparison
in the scldiv calculation.

Fixes: 783bf5d09f86 ("spi: spi-fsl-lpspi: limit PRESCALE bit in TCR register")
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://patch.msgid.link/20240905111537.90389-1-wahrenst@gmx.net
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-lpspi.c