From: Jonathan Cameron <jic23@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Cosmin Tanislav" <cosmin-gabriel.tanislav.xa@renesas.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Magnus Damm" <magnus.damm@gmail.com>,
linux-iio@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/7] iio: adc: add RZ/T2H / RZ/N2H ADC driver
Date: Sat, 4 Oct 2025 14:30:29 +0100 [thread overview]
Message-ID: <20251004143029.02f026a2@jic23-huawei> (raw)
In-Reply-To: <CAMuHMdXPEZJ11sfLDk=O1oZq_OKz22G9wz3Sw5acMr1QVYG_Qg@mail.gmail.com>
> > --- /dev/null
> > +++ b/drivers/iio/adc/rzt2h_adc.c
> > @@ -0,0 +1,309 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +
> > +#include <linux/bitfield.h>
> > +#include <linux/cleanup.h>
> > +#include <linux/completion.h>
> > +#include <linux/delay.h>
> > +#include <linux/iio/adc-helpers.h>
> > +#include <linux/iio/iio.h>
> > +#include <linux/interrupt.h>
> > +#include <linux/io.h>
> > +#include <linux/iopoll.h>
> > +#include <linux/mod_devicetable.h>
> > +#include <linux/module.h>
> > +#include <linux/platform_device.h>
> > +#include <linux/pm_runtime.h>
> > +#include <linux/property.h>
> > +
> > +#define RZT2H_NAME "rzt2h-adc"
> > +
> > +#define RZT2H_ADCSR_REG 0x00
>
> I would drop the "_REG"-suffix from register definitions...
>
> > +#define RZT2H_ADCSR_ADIE_MASK BIT(12)
>
> ... and the "_MASK"-suffix from single-bit definitions. But this is
> my personal preference/taste. Perhaps IIO uses a different convention?
Problem with dropping _REG is we regularly see registers with complex
multi part names and it can be come confusing at point of use wrt to
whether a given define is a register address, or field.
I don't mind dropping MASK for single bits though as there inherently can't
be confusion between those and field values as the 'mask' defines the value
as well.
Jonathan
>
> > +#define RZT2H_ADCSR_ADCS_MASK GENMASK(14, 13)
> > +#define RZT2H_ADCSR_ADCS_SINGLE 0b00
> > +#define RZT2H_ADCSR_ADST_MASK BIT(15)
>
> Gr{oetje,eeting}s,
>
> Geert
>
next prev parent reply other threads:[~2025-10-04 13:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-01 12:23 [PATCH v3 0/7] Add ADCs support for RZ/T2H and RZ/N2H Cosmin Tanislav
2025-10-01 12:23 ` [PATCH v3 1/7] clk: renesas: r9a09g077: Add ADC modules clock Cosmin Tanislav
2025-10-01 13:35 ` Geert Uytterhoeven
2025-10-01 13:39 ` Cosmin-Gabriel Tanislav
2025-10-01 12:23 ` [PATCH v3 2/7] dt-bindings: iio: adc: document RZ/T2H and RZ/N2H ADC Cosmin Tanislav
2025-10-02 12:22 ` Geert Uytterhoeven
2025-10-01 12:23 ` [PATCH v3 3/7] iio: adc: add RZ/T2H / RZ/N2H ADC driver Cosmin Tanislav
2025-10-02 12:28 ` Geert Uytterhoeven
2025-10-04 13:30 ` Jonathan Cameron [this message]
2025-10-04 13:39 ` Jonathan Cameron
2025-10-04 14:33 ` Geert Uytterhoeven
2025-10-01 12:23 ` [PATCH v3 4/7] arm64: dts: renesas: r9a09g077: Add ADCs support Cosmin Tanislav
2025-10-02 12:22 ` Geert Uytterhoeven
2025-10-01 12:23 ` [PATCH v3 5/7] arm64: dts: renesas: r9a09g087: " Cosmin Tanislav
2025-10-02 12:23 ` Geert Uytterhoeven
2025-10-01 12:23 ` [PATCH v3 6/7] arm64: dts: renesas: rzt2h/rzn2h-evk: enable ADCs Cosmin Tanislav
2025-10-02 12:39 ` Geert Uytterhoeven
2025-10-01 12:23 ` [PATCH v3 7/7] arm64: defconfig: enable RZ/T2H / RZ/N2H ADC driver Cosmin Tanislav
2025-10-02 12:23 ` Geert Uytterhoeven
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=20251004143029.02f026a2@jic23-huawei \
--to=jic23@kernel.org \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=cosmin-gabriel.tanislav.xa@renesas.com \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=geert@linux-m68k.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=nuno.sa@analog.com \
--cc=robh@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
all inboxes | Powered by JetHome®