From: Neil Armstrong <narmstrong@baylibre.com>
To: Chris Healy <cphealy@gmail.com>, Robin Murphy <robin.murphy@arm.com>
Cc: Jiucheng Xu <jiucheng.xu@amlogic.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux ARM <linux-arm-kernel@lists.infradead.org>,
linux-amlogic@lists.infradead.org,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Subject: Re: [PATCH 1/4] perf/amlogic: Add support for Amlogic meson G12 SoC DDR PMU driver
Date: Mon, 18 Jul 2022 10:06:29 +0200 [thread overview]
Message-ID: <e47b3052-953a-1612-6c64-e2deaaed111b@baylibre.com> (raw)
In-Reply-To: <CAFXsbZqQC7Vq3bO8GtqtY2hyLjh=+C1qa49pH+9BORmFk6P9XQ@mail.gmail.com>
Hi Chris,
On 17/07/2022 22:58, Chris Healy wrote:
[...]
>>
>> [...]
>>>>> + goto err2;
>>>>> + }
>>>>> +
>>>>> + irq_name = of_get_property(node, "interrupt-names", NULL);
>>>>> + if (!irq_name)
>>>>> + irq_name = "ddr_pmu";
>>>>
>>>> That's not how the "interrupt-names" property works. If you only have
>>>> a single interrupt then there's not much need for it to be named in
>>>> the DT at all. If you do want to use named interrupts then use
>>>> platform_get_irq_byname(), and the name should probably have a bnit
>>>> more functional meaning. Either way, please don't abuse the DT like this.
>>> Okay, actually there will be multiple interrupts , but not in current
>>> G12 series.
>>
>> That's fair enough, so we should try to anticipate it in the design of
>> the DT binding. If for instance future SoCs are going to move from
>> having a single combined overflow interrupt to a separate interrupt for
>> each counter, then the driver can reasonably continue to get them by
>> index and we'll effectively only need to update maxItems in the binding.
>> If on the other hand there's still going to be one combined overflow
>> interrupt, plus some other new interrupt for something completely
>> different, then it *could* be more appropriate to have names, and thus
>> to define and use a standard "overflow" name from the beginning even
>> when it is the only one present, so that we can remain consistent later
>> once more are added.
>
> My assumption is that the goal of having this "interrupt-names" in DT
> is to cover future cases where there is more than one DRAM controller
> instance in the SoC and you want to be able to discriminate between
> the two instances with this driver's interrupt name. If this is true,
> as an alternative, you could do something like this:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/i2c/busses/i2c-mt65xx.c?h=v5.19-rc6&id=7fb9dc8109bf9713ffcda65617249099a1942f0f
>
> This should result in each instance having a unique name that includes
> the base address as the prefix to the interrupt name which should be
> sufficient for determining which instance is which.
It's ok to introduce interrupt-names in the bindings for newer SoCs,
since it's useless for the current ones, there's no need to introduce it right now.
It's also why it's simpler to introduce a compatible per SoC, so we can add
different attributes in the bindings depending on the compatible.
Neil
[...]
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
prev parent reply other threads:[~2022-07-18 8:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-12 6:36 [PATCH 1/4] perf/amlogic: Add support for Amlogic meson G12 SoC DDR PMU driver Jiucheng Xu
2022-07-12 6:36 ` [PATCH 2/4] docs/perf: Add documentation for the Amlogic G12 DDR PMU Jiucheng Xu
2022-07-12 6:36 ` [PATCH 3/4] arm64:dts:meson: Add DDR PMU node Jiucheng Xu
2022-07-12 6:36 ` [PATCH 4/4] dt-binding:perf: Add Amlogic DDR PMU Jiucheng Xu
2022-07-12 7:15 ` Krzysztof Kozlowski
2022-07-14 3:22 ` Jiucheng Xu
2022-07-12 12:54 ` Robin Murphy
2022-07-14 9:13 ` Jiucheng Xu
2022-07-12 14:26 ` Rob Herring
2022-07-12 12:36 ` [PATCH 1/4] perf/amlogic: Add support for Amlogic meson G12 SoC DDR PMU driver Robin Murphy
2022-07-14 8:17 ` Jiucheng Xu
2022-07-15 16:38 ` Robin Murphy
2022-07-17 20:58 ` Chris Healy
2022-07-18 8:06 ` Neil Armstrong [this message]
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=e47b3052-953a-1612-6c64-e2deaaed111b@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=cphealy@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=jbrunet@baylibre.com \
--cc=jiucheng.xu@amlogic.com \
--cc=khilman@baylibre.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=will@kernel.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