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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, Aug 19, 2016 at 12:53 PM, Jonas Gorski <jonas.gorski@xxxxxxxxx> 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 <jonas.gorski@xxxxxxxxx>
(...)

> +#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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux