serial: max310x: use separate regmap name for each port
authorHugo Villeneuve <hvilleneuve@dimonoff.com>
Thu, 18 Jan 2024 15:22:04 +0000 (10:22 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Jan 2024 03:05:04 +0000 (19:05 -0800)
commit609aabb259d497578ffa2d66ced57c22044f821c
tree9e556c5648d928fecfc9dce6f582f7ea5ee44085
parentdbaa0083896cb44d2b9023c04fc15d1324c88d10
serial: max310x: use separate regmap name for each port

Use a separate regmap name for each port so they can each have their own
debugfs entry, allowing to access each port registers independently.

For example, a four channels/ports device like the MAX14830 will have four
entries in its regmap debugfs:

$ find /sys/kernel/debug/regmap -type d | grep spi0.0
/sys/kernel/debug/regmap/spi0.0-port0
/sys/kernel/debug/regmap/spi0.0-port1
/sys/kernel/debug/regmap/spi0.0-port2
/sys/kernel/debug/regmap/spi0.0-port3

Cc: Jan Kundrát <jan.kundrat@cesnet.cz>
Link: https://lore.kernel.org/all/77f101f1-897d-4e6d-a8fd-27b818caf768@cesnet.cz/
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://lore.kernel.org/r/20240118152213.2644269-9-hugo@hugovil.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/max310x.c