[PATCH v2 00/16] serial: sc16is7xx: fixes, cleanups and improvements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>

Hello,
this patch series brings a few fixes, clean-ups and improvements to the
sc16is7xx driver.

Some of the patches have been suggested by Andy Shevchenko following this
dicussion:

Link: https://lore.kernel.org/all/CAHp75VebCZckUrNraYQj9k=Mrn2kbYs1Lx26f5-8rKJ3RXeh-w@xxxxxxxxxxxxxx/

I have tested the changes on a custom board with two SC16IS752 DUART over
a SPI interface using a Variscite IMX8MN NANO SOM. The four UARTs are
configured in RS-485 mode.

I did not test the change on a SC16is7xx using I2C interface, as my custom
board is only using SPI.

Thank you.

Link: [v1] https://lore.kernel.org/all/20231219171903.3530985-1-hugo@xxxxxxxxxxx/

Changes for V2:
- Invert statements in "improve do/while loop in sc16is7xx_irq()".
- Drop patch "use in_range() for DT properties bound checks" at Andy's
  suggestion.
- Drop patch "fix whitespace in sc16is7xx_startup() comments".
- Drop patch "fix segfault when removing driver".
- Fix some commit descriptions after reviews.
- Remove casting in spi_get_device_match_data() and i2c_get_match_data(),
  and use dev_err_probe().
- Fix indentation and comments style.
- Add patch to fix SPI default frequency if unspecified and merge it with
  patch "use HZ_PER_MHZ macro to improve readability".
- Add patch to detect wrong SPI mode.
- Optimize struct sc16is7xx_one based on Andy's comment and running pahole.
- Use git diff histogram algo when generating patches.
- Revert to ARRAY_SIZE() macro in "add macro for max number of UART ports"
  and remove WARN_ON().

Hugo Villeneuve (16):
  serial: sc16is7xx: fix invalid sc16is7xx_lines bitfield in case of
    probe error
  serial: sc16is7xx: add check for unsupported SPI modes during probe
  serial: sc16is7xx: set safe default SPI clock frequency
  serial: sc16is7xx: remove obsolete loop in sc16is7xx_port_irq()
  serial: sc16is7xx: improve do/while loop in sc16is7xx_irq()
  serial: sc16is7xx: use DECLARE_BITMAP for sc16is7xx_lines bitfield
  serial: sc16is7xx: use spi_get_device_match_data()
  serial: sc16is7xx: use i2c_get_match_data()
  serial: sc16is7xx: add driver name to struct uart_driver
  serial: sc16is7xx: add macro for max number of UART ports
  serial: sc16is7xx: add explicit return for some switch default cases
  serial: sc16is7xx: replace hardcoded divisor value with BIT() macro
  serial: sc16is7xx: drop unneeded MODULE_ALIAS
  serial: sc16is7xx: refactor FIFO access functions to increase
    commonality
  serial: sc16is7xx: reorder code to remove prototype declarations
  serial: sc16is7xx: refactor EFR lock

 drivers/tty/serial/sc16is7xx.c | 386 ++++++++++++++++-----------------
 1 file changed, 184 insertions(+), 202 deletions(-)


base-commit: 43f012df3c1e979966524f79b5371fde6545488a
-- 
2.39.2





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux