From: "Torreno, Alexis Czezar" <AlexisCzezar.Torreno@analog.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Lars-Peter Clausen" <lars@metafoo.de>,
"Hennerich, Michael" <Michael.Hennerich@analog.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Sa, Nuno" <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>,
"Uwe Kleine-König" <ukleinek@kernel.org>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-pwm@vger.kernel.org" <linux-pwm@vger.kernel.org>
Subject: RE: [PATCH v2 2/3] iio: dac: ad5706r: Add support for AD5706R DAC
Date: Thu, 12 Mar 2026 02:32:21 +0000 [thread overview]
Message-ID: <PH0PR03MB63519615ACE22ADE4055D2DBF144A@PH0PR03MB6351.namprd03.prod.outlook.com> (raw)
In-Reply-To: <abFVl8NhfBkvyI4I@ashevche-desk.local>
> ...
>
> > +#include <linux/device.h>
> > +#include <linux/iio/iio.h>
> > +#include <linux/module.h>
> > +#include <linux/spi/spi.h>
>
> IWYU, please.
> Yet another typical issue with ADI patches. Really, talk to your senior colleagues
> who are experienced kernel developers before sending it to ML.
>
I'll bring this up. As per your suggestion in the other mail, compiling common issues
like this may be needed. Lessens pitfalls for newer devs.
> ...
>
> > +#define AD5706R_DAC_RESOLUTION 16
> > +#define AD5706R_DAC_MAX_CODE
> BIT(AD5706R_DAC_RESOLUTION) /* 65536 */
>
> Useless comment, use the same number explicitly instead
>
> BIT(16)
>
> which is much more readable.
>
> ...
>
> > + st->tx_buf = cpu_to_be32((((u32)reg) << 16) |
> > + ((u32)val << (16 - (num_bytes * 8))));
>
> What the heck is this?
I'll make this more readable.
but the format goal is:
if num_bytes = 1
tx_buf [31:0] = [reg 31:16] [val 15:8] [ XXXX]
if num_bytes = 2
tx_buf [31:0] = [reg 31:16] [ val 15:0 ]
>
> ...
>
> > +static const struct of_device_id ad5706r_of_match[] = {
> > + { .compatible = "adi,ad5706r" },
> > + { },
>
> Even inside a single file this is inconsistent, besides being third of
> 101 IIO patch issues.
Will note the other feedback and track the common issues.
Thank you,
next prev parent reply other threads:[~2026-03-12 2:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 0:23 [PATCH v2 0/3] " Alexis Czezar Torreno
2026-03-11 0:23 ` [PATCH v2 1/3] dt-bindings: iio: dac: Add binding for AD5706R Alexis Czezar Torreno
2026-03-11 0:48 ` Torreno, Alexis Czezar
2026-03-11 0:23 ` [PATCH v2 2/3] iio: dac: ad5706r: Add support for AD5706R DAC Alexis Czezar Torreno
2026-03-11 11:44 ` Andy Shevchenko
2026-03-12 2:32 ` Torreno, Alexis Czezar [this message]
2026-03-12 13:03 ` Andy Shevchenko
2026-03-11 0:23 ` [PATCH v2 3/3] MAINTAINERS: Add entry for AD5706R DAC driver Alexis Czezar Torreno
2026-03-11 11:36 ` Andy Shevchenko
2026-03-11 11:38 ` [PATCH v2 0/3] Add support for AD5706R DAC Andy Shevchenko
2026-03-13 9:35 ` Uwe Kleine-König
2026-03-18 4:48 ` Torreno, Alexis Czezar
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=PH0PR03MB63519615ACE22ADE4055D2DBF144A@PH0PR03MB6351.namprd03.prod.outlook.com \
--to=alexisczezar.torreno@analog.com \
--cc=Michael.Hennerich@analog.com \
--cc=Nuno.Sa@analog.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=robh@kernel.org \
--cc=ukleinek@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®