lkml.org 
[lkml]   [2022]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v5 2/2] iio: humidity: hdc100x: add manufacturer and device ID check
On Mon, Aug 1, 2022 at 3:52 AM Potin Lai <potin.lai.pt@gmail.com> wrote:
> On 7/31/22 20:09, Jonathan Cameron wrote:

...

> In our hardware board, we have "ti,hdc1080" as main source, and "silabs,si7020"
> for 2nd source. This two chip are locate at same bus and same slave address,
> and we want to use multiple compatibles to support both chips with single device
> node in device tree.
>
> Ex:
> compatible = "ti,hdc1099", "silabs,si7020";

This is simply broken DT, you must not put incompatible hardware on
the same compatible string. DT is by definition the description of a
certain platform. What you showed is a combination of incompatible
chips in a single DT.

> In order to support this, I need to add ID checking mechanism into the current
> hdc100x driver, so the si7020 chip will fail to probe with hdc100x driver
> (because the ID checking is not failed), then success probe with si7020.
>
> Base on you explanation, it looks multiple compatibles is not suitable in this
> case? Would you mind advise us what would be the better approach for our case?

If I may advise... fix your DT by dropping the wrong compatible item.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2022-08-01 10:24    [W:0.134 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site