On Tue, 12 Apr 2022 10:10:11 +0200 Philippe De Muyter <phdm@xxxxxxx> wrote: > Hello Lorenzo, > > we build custom boards with different variations of st_lsm6dsx > chips, due to the shortage of components, namely the ISM330DHCX > and ISM330DLC at the moment. Is there currently a way in the > driver and device-tree to accept different variations of those > IMU sensors without getting the annoying message : > > st_lsm6dsx_i2c 2-006a: unsupported whoami [6a] > > but rather a positive message telling which variation was found ? Feel free to send a patch that allows the driver to identify that it can carry on despite missmatched parts. We can however 'muddle on' if we have one driver that happens to support both parts (as is true here). It's made more complex by the fact this driver covers parts with the same WHOAMI that are not compatible and for which there is no known safe way to discover functionality. So we need to be careful... My suggestion is we add a field to the _sensor_settings entries for 'minimal parts' to say "if matching without any other info, use this one if the whoami matches". For those we pick the least featured part with a given whoami and hope we don't end up with an even less featured part in the future. So on failure to match the whoami normally rerun but looking for that 'minimal flag' and a whoami match. Then print out some nice message about the fact that we can only support minimal functionality because of unknown subvariant with a given whoami value. What fun. Alternatively have your boot loader / firmware adjust the dt based on what is present ;) Jonathan > > Best regards > > Phlippe >