serial: sc16is7xx: set safe default SPI clock frequency
authorHugo Villeneuve <hvilleneuve@dimonoff.com>
Thu, 21 Dec 2023 23:18:10 +0000 (18:18 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:49 +0000 (15:35 -0800)
commit7ce7425537898cbe0a67863286b9f934ac0738ce
treeb8595bd4f8db3b2bead4b4d1e0057ed76c0c5734
parent9d528a81df2fc7a423311b2c35760c1a852e50b2
serial: sc16is7xx: set safe default SPI clock frequency

commit 3ef79cd1412236d884ab0c46b4d1921380807b48 upstream.

15 MHz is supported only by 76x variants.

If the SPI clock frequency is not specified, use a safe default clock value
of 4 MHz that is supported by all variants.

Also use HZ_PER_MHZ macro to improve readability.

Fixes: 2c837a8a8f9f ("sc16is7xx: spi interface is added")
Cc: <stable@vger.kernel.org>
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://lore.kernel.org/r/20231221231823.2327894-4-hugo@hugovil.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sc16is7xx.c