From: Andrea della Porta <andrea.porta@suse.com>
To: Herve Codina <herve.codina@bootlin.com>
Cc: Andrea della Porta <andrea.porta@suse.com>,
Rob Herring <robh@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
Krzysztof Wilczynski <kw@linux.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Linus Walleij <linus.walleij@linaro.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Derek Kiernan <derek.kiernan@amd.com>,
Dragan Cvetic <dragan.cvetic@amd.com>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Saravana Kannan <saravanak@google.com>,
linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
linux-gpio@vger.kernel.org,
Masahiro Yamada <masahiroy@kernel.org>,
Stefan Wahren <wahrenst@gmx.net>,
Luca Ceresoli <luca.ceresoli@bootlin.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Andrew Lunn <andrew@lunn.ch>
Subject: Re: [PATCH v5 08/10] misc: rp1: RaspberryPi RP1 misc driver
Date: Thu, 9 Jan 2025 16:53:52 +0100 [thread overview]
Message-ID: <Z3_xEEGVWFu-bDjT@apocalypse> (raw)
In-Reply-To: <20250109155036.27b82b7e@bootlin.com>
Hi Herve,
On 15:50 Thu 09 Jan , Herve Codina wrote:
> Hi Andrea,
>
> On Thu, 9 Jan 2025 15:13:42 +0100
> Andrea della Porta <andrea.porta@suse.com> wrote:
>
> > Hi Rob,
> >
> > On 15:08 Mon 16 Dec , Andrea della Porta wrote:
> > > Hi Rob,
> > >
> > > On 16:48 Tue 10 Dec , Rob Herring wrote:
> > > > On Mon, Dec 02, 2024 at 12:19:32PM +0100, Andrea della Porta wrote:
> > > > > The RaspberryPi RP1 is a PCI multi function device containing
> > > > > peripherals ranging from Ethernet to USB controller, I2C, SPI
> > > > > and others.
> >
> > ...
> >
> > > > > +#define RP1_INT_ADC_FIFO 52
> > > > > +#define RP1_INT_PCIE_OUT 53
> > > > > +#define RP1_INT_SPI6 54
> > > > > +#define RP1_INT_SPI7 55
> > > > > +#define RP1_INT_SPI8 56
> > > > > +#define RP1_INT_SYSCFG 58
> > > > > +#define RP1_INT_CLOCKS_DEFAULT 59
> > > > > +#define RP1_INT_VBUSCTRL 60
> > > > > +#define RP1_INT_PROC_MISC 57
> > > >
> > > > Why all these defines which will never be used because they come from
> > > > DT?
> > > >
> > >
> > > Right, those defines where originally designed to be included from dts, but
> > > previous discussion deemed interrupt numbers to be hardcoded instead of being
> > > specified as mnemonics. In the driver source code I just use RP1_INT_END as the
> > > number of interrupts but I thought that the specific interrupt numbers should
> > > be documented in some way or another. Since no one is currently referencing
> > > those defines, would it be better to just turn those in a multiline comment
> > > just to describe them in a more compact form?
> >
> > So, here's a couple of proposals about the interrupt defines:
> >
> > - since they were banned from devicetree, and are not used anywhere in the code,
> > turn them into a (admittedly long) multiline comment, so they are still at
> > least documented
> >
> > - since they were banned from devicetree, and are not use anywhere in the code,
> > just drop them, we don't currently need them after all
> >
> > Not sure what's the best way here, anyone can advise?
>
> Maybe in the #interrupt-cells description in the device-tree binding?
>
> In your patch 4, you describe this interrupt controller and you have:
> '#interrupt-cells':
> const: 2
> description:
> Specifies respectively the interrupt number and flags as defined
> in include/dt-bindings/interrupt-controller/irq.h.
>
> In this description, why not add the supported interrupt number values?
> description: |
> Specifies respectively the interrupt number and flags as defined
> in include/dt-bindings/interrupt-controller/irq.h.
> The supported values for the interrupt number are:
> - IO BANK0: 0
> - IO BANK1: 1
> ...
>
> Or something similar.
>
> This kind of description is already available. For instance:
> https://elixir.bootlin.com/linux/v6.13-rc1/source/Documentation/devicetree/bindings/dma/fsl,imx-sdma.yaml#L64
>
> Does it make sense?
Seems fine to me, if there's no concern from anyone I will procede like that.
Thanks for the suggestion.
Andrea
>
> Best regards,
> Hervé
next prev parent reply other threads:[~2025-01-09 15:53 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-02 11:19 [PATCH v5 00/10] Add support for RaspberryPi RP1 PCI device using a DT overlay Andrea della Porta
2024-12-02 11:19 ` [PATCH v5 01/10] dt-bindings: clock: Add RaspberryPi RP1 clock bindings Andrea della Porta
2024-12-02 11:19 ` [PATCH v5 02/10] dt-bindings: pinctrl: Add RaspberryPi RP1 gpio/pinctrl/pinmux bindings Andrea della Porta
2024-12-17 13:00 ` Linus Walleij
2024-12-02 11:19 ` [PATCH v5 03/10] dt-bindings: pci: Add common schema for devices accessible through PCI BARs Andrea della Porta
2024-12-10 22:54 ` Rob Herring (Arm)
2024-12-02 11:19 ` [PATCH v5 04/10] dt-bindings: misc: Add device specific bindings for RaspberryPi RP1 Andrea della Porta
2024-12-10 22:55 ` Rob Herring (Arm)
2024-12-02 11:19 ` [PATCH v5 05/10] clk: rp1: Add support for clocks provided by RP1 Andrea della Porta
2024-12-02 11:19 ` [PATCH v5 06/10] pinctrl: rp1: Implement RaspberryPi RP1 gpio support Andrea della Porta
2024-12-02 11:19 ` [PATCH v5 07/10] arm64: dts: rp1: Add support for RaspberryPi's RP1 device Andrea della Porta
2024-12-02 11:19 ` [PATCH v5 08/10] misc: rp1: RaspberryPi RP1 misc driver Andrea della Porta
2024-12-10 22:48 ` Rob Herring
2024-12-16 14:08 ` Andrea della Porta
2025-01-09 14:13 ` Andrea della Porta
2025-01-09 14:50 ` Herve Codina
2025-01-09 15:53 ` Andrea della Porta [this message]
2024-12-02 11:19 ` [PATCH v5 09/10] arm64: dts: bcm2712: Add external clock for RP1 chipset on Rpi5 Andrea della Porta
2024-12-02 11:19 ` [PATCH v5 10/10] arm64: defconfig: Enable RP1 misc/clock/gpio drivers Andrea della Porta
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=Z3_xEEGVWFu-bDjT@apocalypse \
--to=andrea.porta@suse.com \
--cc=andrew@lunn.ch \
--cc=arnd@arndb.de \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bhelgaas@google.com \
--cc=brgl@bgdev.pl \
--cc=catalin.marinas@arm.com \
--cc=conor+dt@kernel.org \
--cc=derek.kiernan@amd.com \
--cc=devicetree@vger.kernel.org \
--cc=dragan.cvetic@amd.com \
--cc=florian.fainelli@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=herve.codina@bootlin.com \
--cc=krzk+dt@kernel.org \
--cc=kw@linux.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=lpieralisi@kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=manivannan.sadhasivam@linaro.org \
--cc=masahiroy@kernel.org \
--cc=mturquette@baylibre.com \
--cc=robh@kernel.org \
--cc=saravanak@google.com \
--cc=sboyd@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=wahrenst@gmx.net \
--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;
as well as URLs for NNTP newsgroup(s).