lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9edfd3481a317ada51be03fa9da824edbcede9c0.camel@gmail.com>
Date: Tue, 20 Feb 2024 13:15:53 +0100
From: Nuno Sá <noname.nuno@...il.com>
To: Ceclan Dumitru <mitrutzceclan@...il.com>
Cc: linus.walleij@...aro.org, brgl@...ev.pl, andy@...nel.org, 
 linux-gpio@...r.kernel.org, Lars-Peter Clausen <lars@...afoo.de>, Jonathan
 Cameron <jic23@...nel.org>, Rob Herring <robh+dt@...nel.org>, Krzysztof
 Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley
 <conor+dt@...nel.org>,  Michael Walle <michael@...le.cc>, Andy Shevchenko
 <andy.shevchenko@...il.com>, Arnd Bergmann <arnd@...db.de>,  ChiaEn Wu
 <chiaen_wu@...htek.com>, Niklas Schnelle <schnelle@...ux.ibm.com>, Leonard
 Göhrs <l.goehrs@...gutronix.de>, Mike Looijmans
 <mike.looijmans@...ic.nl>, Haibo Chen <haibo.chen@....com>, Hugo Villeneuve
 <hvilleneuve@...onoff.com>, David Lechner <dlechner@...libre.com>, Ceclan
 Dumitru <dumitru.ceclan@...log.com>,  linux-iio@...r.kernel.org,
 devicetree@...r.kernel.org,  linux-kernel@...r.kernel.org
Subject: Re: [PATCH v13 3/3] iio: adc: ad7173: add AD7173 driver

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á

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ