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] [day] [month] [year] [list]
Message-ID: <20240222-fretted-riches-bf15f5d63018@spud>
Date: Thu, 22 Feb 2024 10:29:51 +0000
From: Conor Dooley <conor@...nel.org>
To: Marco Felsch <m.felsch@...gutronix.de>
Cc: jic23@...nel.org, lars@...afoo.de, robh+dt@...nel.org,
	krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
	denis.ciocca@...com, linus.walleij@...aro.org,
	linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, kernel@...gutronix.de
Subject: Re: [PATCH] dt-bindings: iio: st-sensors: Add IIS2MDC magnetometer

On Thu, Feb 22, 2024 at 09:47:17AM +0100, Marco Felsch wrote:
> On 24-02-21, Conor Dooley wrote:
> > On Wed, Feb 21, 2024 at 08:45:18PM +0100, Marco Felsch wrote:
> > > On 24-02-21, Conor Dooley wrote:
> > > > On Wed, Feb 21, 2024 at 08:16:44PM +0100, Marco Felsch wrote:
> > > > > On 24-02-21, Conor Dooley wrote:
> > > > > > On Wed, Feb 21, 2024 at 06:58:10PM +0100, Marco Felsch wrote:

> > > > Besides, having fallback compatibles is the norm when one device has the
> > > > same programming model as another.
> > > 
> > > Not for this binding according the driver.
> > 
> > If they don't have the same programming model, then describing them as
> > "equivalent" wouldn't be correct. That said, they seem to use the same
> > sensor settings when alls said and done (see st_magn_sensors_settings),
> > so I think they are actually compatible even if the driver has separate
> > match data for each.
> 
> I told you that I have checked the driver and skimed the datasheets and
> came to the exact same conclusion.

Did you tell me that? I did't see it.

Anyway, I think what happened is that I interpreted "Not for this
binding according the driver" as a comment about the programming model
being different, but you meant it in reference to the fallback. Since
they do have the same programming model the fallback is appropriate,
even if the driver knows about the iis2mdc compatible.
I'd squash in the following, similar to what was done for the
st,iis328dq that was added recently:

diff --git a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
index ee593c8bbb65..ee6c3800436d 100644
--- a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
+++ b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
@@ -64,7 +64,6 @@ properties:
           - st,lsm9ds0-gyro
       - description: STMicroelectronics Magnetometers
         enum:
-          - st,iis2mdc
           - st,lis2mdl
           - st,lis3mdl-magn
           - st,lsm303agr-magn
@@ -73,6 +72,9 @@ properties:
           - st,lsm303dlhc-magn
           - st,lsm303dlm-magn
           - st,lsm9ds1-magn
+      - items:
+          - const: st,iis2mdc
+          - const: st,lis2mdl
       - description: STMicroelectronics Pressure Sensors
         enum:
           - st,lps001wp-press

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ