[PATCH v3 01/32] clk: at91: pmc: add macros for clk_parent_data
Brian Masney
bmasney at redhat.com
Thu Aug 28 09:52:14 PDT 2025
On Thu, Jul 10, 2025 at 01:06:54PM -0700, Ryan.Wanner at microchip.com wrote:
> From: Claudiu Beznea <claudiu.beznea at tuxon.dev>
>
> Add helpers to set parent_data objects in platform specific drivers.
>
> Signed-off-by: Claudiu Beznea <claudiu.beznea at tuxon.dev>
> [ryan.wanner at microchip.com: enclose complex macro with parentheses.]
> Signed-off-by: Ryan Wanner <Ryan.Wanner at microchip.com>
> ---
> drivers/clk/at91/pmc.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h
> index 4fb29ca111f7..0b721a65b77f 100644
> --- a/drivers/clk/at91/pmc.h
> +++ b/drivers/clk/at91/pmc.h
> @@ -15,6 +15,12 @@
>
> #include <dt-bindings/clock/at91.h>
>
> +#define AT91_CLK_PD_NAME(n, i) ((struct clk_parent_data){ \
> + .hw = NULL, .name = (n), .fw_name = (n), .index = (i), \
> +})
> +
> +#define AT91_CLK_PD_HW(h) ((struct clk_parent_data){ .hw = (h) })
If you have to spin a new series, then personally I would put a space
before the {. I see both usages in drivers/clk/.
Reviewed-by: Brian Masney <bmasney at redhat.com>
More information about the linux-arm-kernel
mailing list