Thread (1 message) 1 message, 1 author, 2016-08-22

Re: [PATCH 05/13] pinctrl: add a pincontrol driver for BCM6348

From: Linus Walleij <hidden>
Date: 2016-08-22 13:19:39
Also in: linux-gpio

Possibly related (same subject, not in this thread)

On Fri, Aug 19, 2016 at 12:53 PM, Jonas Gorski [off-list ref] wrote:
Add a pincotrol driver for BCM6348. BCM6348 allow muxing five groups of
up to ten gpios into fourteen potential functions. It does not allow
muxing individual pins. Some functions require more than one group to be
muxed to the same function.

Signed-off-by: Jonas Gorski <redacted>
(...)
+#define BCM6348_NGPIO          37
(...)
+       struct gpio_chip gpio[2];
Seems unused.
+static void bcm6348_rmw_mux(struct bcm6348_pinctrl *pctl, u32 mask, u32 val)
+{
+       unsigned long flags;
+       u32 reg;
+
+       spin_lock_irqsave(&pctl->lock, flags);
+
+       reg = __raw_readl(pctl->mode);
+       reg &= ~mask;
+       reg |= val & mask;
+       __raw_writel(reg, pctl->mode);
+
+       spin_unlock_irqrestore(&pctl->lock, flags);
+}
Same comment as before on readl/writel_relaxed() to
be used rather than __raw_*.
+#ifdef CONFIG_OF
+       .dt_node_to_map         = pinconf_generic_dt_node_to_map_pin,
+       .dt_free_map            = pinctrl_utils_free_map,
+#endif
Same comment about depending on OF.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help