On Tue, Sep 22, 2015 at 5:44 PM, Geert Uytterhoeven <geert+renesas@xxxxxxxxx> wrote: > Switch from the old "renesas,cpg-mstp-clocks" bindings to the new > "renesas,r8a7791-cpg-mssr" bindings: [...] > - Change the R8A7791_CLK_* macro definitions to include the MSTP > register number, so the user-visible numbers match the datasheet > clock numbers, and pack them to avoid wasting space in sparse > clk_onecell_data arrays. Apparently the packing can be handled purely inside the driver, instead of in <dt-bindings/clock/r8a7791-clock.h>, by passing a custom variant of of_clk_src_onecell_get() to of_clk_add_provider(). > --- a/include/dt-bindings/clock/r8a7791-clock.h > +++ b/include/dt-bindings/clock/r8a7791-clock.h > @@ -23,141 +23,143 @@ > #define R8A7791_CLK_RCAN 9 > #define R8A7791_CLK_ADSP 10 > > +#define MSTP(n) (n / 100 * 32 + n % 100) Hence this macro can be removed... > + > /* MSTP0 */ > -#define R8A7791_CLK_MSIOF0 0 > +#define R8A7791_CLK_MSIOF0 MSTP(0) ... and all of these can just become plain human-readable numbers that match the datasheets. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- 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