Thread (18 messages) 18 messages, 4 authors, 2023-09-18

Re: [PATCH v2 1/7] pinctrl: realtek: Add common pinctrl driver for Realtek DHC RTD SoCs

From: Linus Walleij <hidden>
Date: 2023-09-11 21:18:21
Also in: linux-gpio, lkml

Hi Tzuyi,

thanks for the new version! This is starting to look really good.

On Thu, Aug 24, 2023 at 12:57 PM Tzuyi Chang [off-list ref] wrote:
The RTD SoCs share a similar design for pinmux and pinconfig.
This common pinctrl driver supports different variants within the RTD
SoCs.

Signed-off-by: Tzuyi Chang <redacted>
(...)
+static void rtd_pinctrl_update_bits(struct rtd_pinctrl *data, unsigned int offset,
+                                   unsigned int mask, unsigned int val)
+{
+       unsigned int reg = readl_relaxed(data->base + offset);
+
+       reg &= ~mask;
+       reg |= (mask & val);
+       writel_relaxed(reg, data->base + offset);
+}
This function is essentially a reimplementation of regmap_update_bits()
using regmap_mmio with .user_relaxed_mmio property set in the
config.

Have you considered just using regmap-mmio for this?

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help