devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	ALSA Development Mailing List <alsa-devel@alsa-project.org>,
	Russell King <linux@arm.linux.org.uk>,
	Stephen Warren <swarren@wwwdotorg.org>,
	lFlorian Meier <florian.meier@koalo.de>,
	Michael Turquette <mturquette@baylibre.com>,
	Lee Jones <lee@kernel.org>, Takashi Iwai <tiwai@suse.com>,
	Eric Anholt <eric@anholt.net>, Remi Pommarel <repk@triplefau.lt>,
	Mark Brown <broonie@kernel.org>,
	linux-rpi-kernel@lists.infradead.org,
	Martin Sperl <kernel@martin.sperl.org>,
	Matthias Reichl <hias@horus.com>,
	linux-clk <linux-clk@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [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@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@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
     [not found] ` <1452331558-2520-1-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2016-01-09  9:25   ` [PATCH 1/5] ASoC: bcm2835: cleanup includes by ordering them alphabetically kernel-TqfNSX0MhmxHKSADF0wUEw
2016-01-09  9:25 ` [PATCH 2/5] clk: bcm2835: enable management of PCM clock kernel
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
     [not found]                     ` <93C244A0-20B7-4E21-A183-E09F83CFE035-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
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
2016-01-09  9:25 ` [PATCH 4/5] ARM: bcm2835: I2S: use new register-range and " kernel
2016-01-09  9:25 ` [PATCH 5/5] dt-bindings: bsm2835: fix bindings documentation to use new " kernel
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=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=eric@anholt.net \
    --cc=florian.meier@koalo.de \
    --cc=hias@horus.com \
    --cc=kernel@martin.sperl.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mturquette@baylibre.com \
    --cc=repk@triplefau.lt \
    --cc=swarren@wwwdotorg.org \
    --cc=tiwai@suse.com \
    /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).