From: "Nuno Sá" <noname.nuno@gmail.com>
To: Ceclan Dumitru <mitrutzceclan@gmail.com>
Cc: linus.walleij@linaro.org, brgl@bgdev.pl, andy@kernel.org,
linux-gpio@vger.kernel.org,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Jonathan Cameron" <jic23@kernel.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Michael Walle" <michael@walle.cc>,
"Andy Shevchenko" <andy.shevchenko@gmail.com>,
"Arnd Bergmann" <arnd@arndb.de>,
"ChiaEn Wu" <chiaen_wu@richtek.com>,
"Niklas Schnelle" <schnelle@linux.ibm.com>,
"Leonard Göhrs" <l.goehrs@pengutronix.de>,
"Mike Looijmans" <mike.looijmans@topic.nl>,
"Haibo Chen" <haibo.chen@nxp.com>,
"Hugo Villeneuve" <hvilleneuve@dimonoff.com>,
"David Lechner" <dlechner@baylibre.com>,
"Ceclan Dumitru" <dumitru.ceclan@analog.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v13 3/3] iio: adc: ad7173: add AD7173 driver
Date: Tue, 20 Feb 2024 13:15:53 +0100 [thread overview]
Message-ID: <9edfd3481a317ada51be03fa9da824edbcede9c0.camel@gmail.com> (raw)
In-Reply-To: <3bc2c1c6-726a-4751-ae81-4d8336619025@gmail.com>
On Tue, 2024-02-20 at 13:25 +0200, Ceclan Dumitru wrote:
>
>
> On 2/20/24 12:38, Nuno Sá wrote:
> > On Tue, 2024-02-20 at 11:43 +0200, Dumitru Ceclan wrote:
>
> ...
>
> >
> > > +};
> > >
> > > + indio_dev->name = st->info->name;
> > > + indio_dev->modes = INDIO_DIRECT_MODE;
> > > + indio_dev->info = &ad7173_info;
> > > +
> > > + spi->mode = SPI_MODE_3;
> > > +
> >
> > I don't think we need the above. We should just enforce it to SPI_CPOL| SPI_CPHA
> > in
> > the bindings [2].
> >
> > [2]:
> > https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml#L45
>
> Rob Herring V1:
>
> """
> > + required:
> > + - compatible
> > + - reg
> > + - interrupts
> > + - spi-cpol
> > + - spi-cpha
>
> If the device(s) are not configurable, then you shouldn't need these 2
> properties. The driver can hardcode the correct setting.
> """
>
> ref:
> https://lore.kernel.org/linux-iio/20230810205107.GA1136590-robh@kernel.org/
>
I see. I thought it was the other way around... Then, the other thing is that I think
you should call spi_setup() after hardcoding the mode.
- Nuno Sá
next prev parent reply other threads:[~2024-02-20 12:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 9:43 [PATCH v13 1/3] dt-bindings: adc: add AD7173 Dumitru Ceclan
2024-02-20 9:43 ` [PATCH v13 2/3] iio: adc: ad_sigma_delta: Add optional irq selection Dumitru Ceclan
2024-02-20 14:11 ` Andy Shevchenko
2024-02-20 14:13 ` Ceclan Dumitru
2024-02-20 14:17 ` Andy Shevchenko
2024-02-24 17:02 ` Jonathan Cameron
2024-02-20 9:43 ` [PATCH v13 3/3] iio: adc: ad7173: add AD7173 driver Dumitru Ceclan
2024-02-20 10:38 ` Nuno Sá
2024-02-20 11:25 ` Ceclan Dumitru
2024-02-20 12:15 ` Nuno Sá [this message]
2024-02-20 12:20 ` Nuno Sá
2024-02-20 14:19 ` Andy Shevchenko
2024-02-20 18:52 ` [PATCH v13 1/3] dt-bindings: adc: add AD7173 Conor Dooley
2024-02-24 18:29 ` Jonathan Cameron
2024-02-20 20:54 ` David Lechner
2024-02-21 8:29 ` Ceclan Dumitru
2024-02-21 20:00 ` Conor Dooley
2024-02-24 17:07 ` Jonathan Cameron
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=9edfd3481a317ada51be03fa9da824edbcede9c0.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=arnd@arndb.de \
--cc=brgl@bgdev.pl \
--cc=chiaen_wu@richtek.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=dumitru.ceclan@analog.com \
--cc=haibo.chen@nxp.com \
--cc=hvilleneuve@dimonoff.com \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=l.goehrs@pengutronix.de \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@walle.cc \
--cc=mike.looijmans@topic.nl \
--cc=mitrutzceclan@gmail.com \
--cc=robh+dt@kernel.org \
--cc=schnelle@linux.ibm.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