Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1841954imn; Mon, 1 Aug 2022 02:03:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vW7w3TVL5gsVO50UB7W4JDWEAXrvSmSdQhrbIwkZoWRuTtPkmRwa5JkVmkW1lbuAXBLQYa X-Received: by 2002:a17:907:d8d:b0:72f:75:9bbd with SMTP id go13-20020a1709070d8d00b0072f00759bbdmr12075786ejc.148.1659344637081; Mon, 01 Aug 2022 02:03:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659344637; cv=none; d=google.com; s=arc-20160816; b=dUFZ0TQyCv6lXKan12miw22YWM8ALwLI4b9s2uCMgMD3lgqaDt2+MiGcmuoI6oCbj9 vpB9FYf5ZKnAqf60LhyBi9Y6vUObmF0LsFF/elMRHC+n1v1rU+PfVLshS/MWTNLwN77W 5hF4z0K6PBWZEsOP8/pVABD2hym1v3hupzIjx0ytObnX2RbE9AIJJIOnnq0UNw6z3T5B tbQp2VCMjUzF2rkykcccznUFqYvWTod+W3LZDJqjDYawBqcZH/3rpUOGcA7EjNAplmkS K1SqimfL/ZF41FiULfY72Tkw8+RuyYWgKcFY3VnAMdc3gzcMj3BzMAwtzV0FAVdts+Ya OD0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=kjv0FJlI0lUU+rmPW0iCxfcBjoloU4HFBTK1BDc1WhU=; b=hCOSSIkhaKIrUvAeOwS45xyW1nTEv5A3QQFEwsXFq4TMicjb/qYY9KlCfPdX225D1R Spb9+iMS1RetcQyyolsTq9Lr6/URFw19CiRBgjTWG57o+4o2tw79xbGQszWQWKvFjp0W KD5bjQZC3QXsMPNRk5LMz7sUjxVL8N8Na5pt2S9kuHxKJvrNcCA/WSpunRMi638/EkhT hab4F1LmjjY81N2CESvM3WN4UdmwEQ3bFR2XWAlyk7r0aV+jAecd+/oMArwRlR7midag dcryosV1nGwBihdIM1ARWgdC5zG8qTtA49O/Cd/Yak38r2idMLGnDhSmAKwYfCFqcHVm rkRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SGiD99rn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hv18-20020a17090760d200b007308bc0ecaesi1519680ejc.429.2022.08.01.02.03.29; Mon, 01 Aug 2022 02:03:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SGiD99rn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230026AbiHAIW7 (ORCPT + 99 others); Mon, 1 Aug 2022 04:22:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229759AbiHAIW4 (ORCPT ); Mon, 1 Aug 2022 04:22:56 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2306F32445; Mon, 1 Aug 2022 01:22:55 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id fy29so18884271ejc.12; Mon, 01 Aug 2022 01:22:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=kjv0FJlI0lUU+rmPW0iCxfcBjoloU4HFBTK1BDc1WhU=; b=SGiD99rnB9w5Lo0zaLyFYjCLUr+HfzQo4L/onIg5UCJ2abXcfrLk0Q2J/0NhGPIOl5 SxD7lkaGT75emAzQMOxY9SUdrDlDVUjzTEue0ynK8FRv5kPZFW2ayGmoNxxeliKJFp/j 5/S5bOQSX/Z7HFoP8EgvaxtAuDmKTtAJSoGK2a/AOcUnPis74wVBWkq9zDVXRgbiUSkZ PWcapOxkFwNmFo2XT+47qaSwM9FjED5PGr+RFo/NrutdgfZ4ak0242zDBlgSWDTzpfew NW1KJ9UWEpRlj37b5SyFi5Bt+lex0J00UJ/VsTNalRTVRp5W/P0/e51LNfs/JY9CDWI5 2XlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=kjv0FJlI0lUU+rmPW0iCxfcBjoloU4HFBTK1BDc1WhU=; b=5m70kx+5NY2MGTWdvU1K+HLvQ3DwpKoHAeQpTODE/X5vy75lRzLJIA9EPWY0/e0uSi eN+xSbLv67RctiRsQ0lxulLGxThJ9QlrvQHKp9dJhCxVk15LT65EkCLOtdeca08ZAxC3 0qu42U/QFFPUpCfZV45SxISuq9co7XQwswWV/oEvGlQlNYALjzydCxYQYu5/1DMV5QzQ KoIH3De11UAr0ZK1087ZJ2oAxgi+bvQrfKnyWezPFxOmxB3gr5MRIFhFIAV3dp9GhC3u 1XmjMXvFqEzNVy92ZYwkseUgCSpktMKF9M+SO1cFPriGOxyGaZfrTR5Q/kCTpPhZr0rj PEhw== X-Gm-Message-State: ACgBeo27jFZGjAoIF2t6j7dYDWBk/jhq6FmS+jsww9Z/E7OcFGM4v+l2 EZnGWLw6s+sdLASBC5pXQtIaK+9iw6drCyW2DXA= X-Received: by 2002:a17:906:e8f:b0:730:9480:9728 with SMTP id p15-20020a1709060e8f00b0073094809728mr832222ejf.99.1659342173330; Mon, 01 Aug 2022 01:22:53 -0700 (PDT) MIME-Version: 1.0 References: <20220728125435.3336618-1-potin.lai.pt@gmail.com> <20220728125435.3336618-3-potin.lai.pt@gmail.com> <20220731130959.50826fc4@jic23-huawei> <4ea235d1-46c1-87de-760f-dc4775007ae0@gmail.com> In-Reply-To: <4ea235d1-46c1-87de-760f-dc4775007ae0@gmail.com> From: Andy Shevchenko Date: Mon, 1 Aug 2022 10:22:16 +0200 Message-ID: Subject: Re: [PATCH v5 2/2] iio: humidity: hdc100x: add manufacturer and device ID check To: Potin Lai Cc: Jonathan Cameron , Lars-Peter Clausen , Patrick Williams , Potin Lai , linux-iio , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 1, 2022 at 3:52 AM Potin Lai 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