]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: pse-pd: tps23881: Use helpers to calculate bit offset for a channel
authorKory Maincent <kory.maincent@bootlin.com>
Fri, 10 Jan 2025 09:40:24 +0000 (10:40 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 14 Jan 2025 12:56:32 +0000 (13:56 +0100)
commit4c2bab507eb7edc8e497e91b9b7f05d76d7e32bb
treeede1818bfecd9ecb002c186dca547164d2b85b8a
parent0b567519d1152de52b29b2da2c47aa0f39a46266
net: pse-pd: tps23881: Use helpers to calculate bit offset for a channel

This driver frequently follows a pattern where two registers are read or
written in a single operation, followed by calculating the bit offset for
a specific channel.

Introduce helpers to streamline this process and reduce code redundancy,
making the codebase cleaner and more maintainable.

Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/pse-pd/tps23881.c