# Re: \[PATCH v4 05/15\] pinctrl: add a pincontrol driver for BCM6328

- From: Andy Shevchenko \<hidden\>
- Date: 2021-03-04 10:51:58 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2021/03/6288140
- Thread: https://ratatoskr.run/linux-gpio/2021/03/6287993/t.md

```text
On Thu, Mar 4, 2021 at 10:57 AM Álvaro Fernández Rojas
[ref] wrote:
>
> Add a pincontrol driver for BCM6328. BCM628 supports muxing 32 pins as
> GPIOs, as LEDs for the integrated LED controller, or various other
> functions. Its pincontrol mux registers also control other aspects, like
> switching the second USB port between host and device mode.

...

> +static inline unsigned int bcm6328_mux_off(unsigned int pin)
> +{
> +       static const unsigned int bcm6328_mux[] = {
> +               BCM6328_MUX_LO_REG,
> +               BCM6328_MUX_HI_REG,

> +               BCM6328_MUX_OTHER_REG

When it's not terminator add a comma, otherwise remove a comma.

Also, why is it inside a function? It's anyway global and constant.

> +       };

...

> +       regmap_update_bits(pc->regs, bcm6328_mux_off(pin),
> +                          3UL << ((pin % 16) * 2),

3UL => #define BLABLA  GENMASK(1, 0)

> +                          mux << ((pin % 16) * 2));

...

> +static const struct of_device_id bcm6328_pinctrl_match[] = {
> +       { .compatible = "brcm,bcm6328-pinctrl", },
> +       { },

No comma.

> +};

Above comments to all your patches.

-- 
With Best Regards,
Andy Shevchenko

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```
