linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: geert@linux-m68k.org (Geert Uytterhoeven)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/5] clk: bcm2835: enable management of PCM clock
Date: Sun, 10 Jan 2016 10:30:33 +0100	[thread overview]
Message-ID: <CAMuHMdWOt4aCzu8Ode0ZrQ-c80nqAhwD5dd17nhgVbLrRYT5og@mail.gmail.com> (raw)
In-Reply-To: <4332640.jBKM55TPAo@wuerfel>

Hi Arnd,

On Sat, Jan 9, 2016 at 9:56 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Saturday 09 January 2016 09:25:54 kernel at martin.sperl.org wrote:
>> --- a/include/dt-bindings/clock/bcm2835.h
>> +++ b/include/dt-bindings/clock/bcm2835.h
>> @@ -44,5 +44,6 @@
>>  #define BCM2835_CLOCK_EMMC             28
>>  #define BCM2835_CLOCK_PERI_IMAGE       29
>>  #define BCM2835_CLOCK_PWM              30
>> +#define BCM2835_CLOCK_PCM              31
>>
>> -#define BCM2835_CLOCK_COUNT            31
>> +#define BCM2835_CLOCK_COUNT            32
>
> The last line contains an incompatible change, please don't do that.
> If you have to add another clock, do that after the BCM2835_CLOCK_COUNT
> definition to avoid changing dts files that use that number.

While I agree this changes dts files (in an unexpected way?), not updating
BCM2835_CLOCK_COUNT makes it definition useless. Which teaches that
having such definitions in DT headers is not a good idea in the first place...

Hence it can better be replaced (it seems to be unused in dts files, but you
can keep the definition to be 100% sure) by an ARRAY_SIZE() in the C driver.
This requires changing the driver to e.g. initialize clks[] in
bcm2835_clk_probe() based on a table instead of explicit code.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

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

  reply	other threads:[~2016-01-10  9:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-09  9:25 [PATCH 0/5] ASOC: bcm2835: move bcm2835-i2s to use clock framework kernel at martin.sperl.org
2016-01-09  9:25 ` [PATCH 1/5] ASoC: bcm2835: cleanup includes by ordering them alphabetically kernel at martin.sperl.org
2016-01-09  9:25 ` [PATCH 2/5] clk: bcm2835: enable management of PCM clock kernel at martin.sperl.org
2016-01-09 20:56   ` Arnd Bergmann
2016-01-10  9:30     ` Geert Uytterhoeven [this message]
2016-01-10 10:55       ` Martin Sperl
2016-01-10 11:58         ` Mark Brown
2016-01-10 12:17           ` Martin Sperl
2016-01-10 12:30             ` Remi Pommarel
2016-01-10 13:02             ` Geert Uytterhoeven
2016-01-10 18:01               ` Martin Sperl
2016-01-10 18:56                 ` Geert Uytterhoeven
2016-01-10 19:07                   ` Martin Sperl
2016-01-10 19:13                     ` Geert Uytterhoeven
2016-01-11 13:38             ` Arnd Bergmann
2016-01-11 13:53               ` Martin Sperl
2016-01-09  9:25 ` [PATCH 3/5] ASoC: bcm2835: move to use the clock framework kernel at martin.sperl.org
2016-01-09  9:25 ` [PATCH 4/5] ARM: bcm2835: I2S: use new register-range and " kernel at martin.sperl.org
2016-01-09  9:25 ` [PATCH 5/5] dt-bindings: bsm2835: fix bindings documentation to use new " kernel at martin.sperl.org
2016-01-09 22:45   ` Rob Herring
2016-01-10 11:05     ` Martin Sperl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMuHMdWOt4aCzu8Ode0ZrQ-c80nqAhwD5dd17nhgVbLrRYT5og@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).