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: TY_Chang[張子逸] <tychang@realtek.com>
Date: 2023-09-18 03:03:44
Also in: linux-gpio, lkml

Hi Linus,
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:
quoted
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>
(...)
quoted
+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?
Thank you for the suggestion. I'll use regmap_mmio to replace it in the next version.
Yours,
Linus Walleij

Thanks,
Tzuyi Chang
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help