Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp998680rwd; Tue, 13 Jun 2023 03:28:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6UBZlb1PqJ0qWyUMQytBV18VDKDJDC8tbI26NzF1n+nmmRe6cwcuMqFlROZr09W5XsMNUC X-Received: by 2002:a17:907:3f12:b0:974:6287:f67f with SMTP id hq18-20020a1709073f1200b009746287f67fmr12596291ejc.28.1686652137505; Tue, 13 Jun 2023 03:28:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686652137; cv=none; d=google.com; s=arc-20160816; b=bfVvOdo/LEbMXIOqERHssEm49b7DPWju89ARHV9xZ+gIIEl5xpXl5iOvgdcGiQDAiM NzCw1pO1zKoSBo8nUe2xXZE8YJqzUi78pSHK7jw6NHtwz8i55lfFaV+TBGHlH3f38b72 8HWKJELpnsKoLebt8vb2fOLobRz9HoGu54M3yJ3cR914zYKBHd/v9XchLKrRYBLFH2yL w9R+lgEk2BY2RRokzJjdWk6zED7wN1nQWxkf4x4R+TG6LJ/PzwbAd3+vA5zc2wmkalBm DrLlKVAVmho03VUVYH3Yrzkt0+nnxvSUPjTGkB2usl6buCGkRuah7dNFryFBkdiSOjh+ Abzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=C7eS0y2fZVSHt4SziOxLfohEhzcd/dxb9fbYHjyvH3c=; b=PwHzR8W+cbMrS5uU1KegwUnUjCBWi9mQQ5vD1tKSNLwMpQnLxqf70qcTVAS8shRado lw5wwv4YlxpGQ/mzRDpvR3jbW8Vnv+Jdw3r5ik7s1utPtWnl28ueFDJmNRW3FMIZFqoL 1GGmkv9LLnp1RkroRCURIOPVj0/c2gRT3XtRbUgjCo0laxKyg4lDGMoSjJ6vCWA0c8nH f3zeDF35g10JtRRmq8+4GlXFAaWGTrMOQa4hCjsVnGhR0dlBn6WfelMAwk42lErUVmcL M8v8ByTHGllTTPbvtGeqcDs/O7pwLn6rMeNZ5TQK3N34nzwosdkcElZsDF9vAMCLZ9tO Ljzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=THEAlSXW; 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 gf15-20020a170906e20f00b00978a5c85950si2982943ejb.416.2023.06.13.03.28.31; Tue, 13 Jun 2023 03:28: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=20221208 header.b=THEAlSXW; 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 S241682AbjFMKXj (ORCPT + 99 others); Tue, 13 Jun 2023 06:23:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240135AbjFMKW6 (ORCPT ); Tue, 13 Jun 2023 06:22:58 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36B821732; Tue, 13 Jun 2023 03:22:57 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-970056276acso809743166b.2; Tue, 13 Jun 2023 03:22:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686651775; x=1689243775; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=C7eS0y2fZVSHt4SziOxLfohEhzcd/dxb9fbYHjyvH3c=; b=THEAlSXWVZdUovhdcgcOf2oWLhgC8GetER0j3qTEsOAB2suChgrYVEIFyMpZbu1fc0 bKZEc9ZdJzZPYUuD1N6gFaLG1pZ9YoAGcNqRzeIIRvRHg4x0tcN+pRMqV7h6IpNgys3n /iFg42r2jijPT/3ndWlET41dqSK45Ji1VKmkKvUHP6uiHb+8fYjw3Fhmdz5qgH2cHtus 5YezdNlnGOrNOxaURguiFubtD93hEu7I5Wwm2n9x9CAB8q7KC2XXPeB4sfsrvcpW8a2K KpRYJisXRQuilI1EEGx4cSEAOvEoAkezlqY/Y41jdCIIi/T4hug7kIK9JyQ1noA/n0Lk c+uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686651775; x=1689243775; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C7eS0y2fZVSHt4SziOxLfohEhzcd/dxb9fbYHjyvH3c=; b=CRfWOfIa/L720zpFLl2zlWZelvwbH/OIS0L+HYR0JeIfZsE3r2EL2+RMpYd47g6XE+ JVyHJC/96rj4OJ8QIW26LNbrf+GTxVceN3aGa7FuhvxHPC/h1ON3Vr7Bn9DvNXPN871D YeDPSI4LXMyK6uO8eglGXdCSR+aWEgIi0kCoHQ1ULNfpdLzrUENUtfJipj++bS1cgS/I uVGaLGiX2LEt/SHkRMzdX8uQAztdzLmuOu1GjBrbcXjohN32X5A3+2GTUO1PKNcD20TU WtiyDE1djsln9i2BiyNRw73dFbShlKCpb0IfsMloyV0f+7kOIaYbZW7wa1/I1BITfYto 1Xuw== X-Gm-Message-State: AC+VfDwK9Aka9qRWT3zh2FS+OVzfmcDVr49fR7ngX1zyHBoRfq8bknO9 VMmMpPtNuRMc3QFCc6TfLug= X-Received: by 2002:a17:907:5c6:b0:973:cc48:f19d with SMTP id wg6-20020a17090705c600b00973cc48f19dmr11366573ejb.52.1686651775372; Tue, 13 Jun 2023 03:22:55 -0700 (PDT) Received: from localhost.localdomain ([2a02:8109:aa3f:ead8::298a]) by smtp.gmail.com with ESMTPSA id b7-20020a170906038700b009787b18c253sm6492493eja.181.2023.06.13.03.22.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jun 2023 03:22:55 -0700 (PDT) From: Mehdi Djait To: jic23@kernel.org, mazziesaccount@gmail.com Cc: krzysztof.kozlowski+dt@linaro.org, andriy.shevchenko@linux.intel.com, robh+dt@kernel.org, lars@metafoo.de, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Mehdi Djait Subject: [PATCH v6 3/7] iio: accel: kionix-kx022a: Warn on failed matches and assume compatibility Date: Tue, 13 Jun 2023 12:22:36 +0200 Message-Id: <2c69e918cb6dfab663bb62952c554b6b72f58390.1686651032.git.mehdi.djait.k@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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,T_SCC_BODY_TEXT_LINE 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 Avoid error returns on a failure to match and instead just warn with assumption that we have a correct dt-binding telling us that some new device with a different ID is backwards compatible. Acked-by: Matti Vaittinen Signed-off-by: Mehdi Djait --- v6: v5: v4: - no changes v3: - changed from 'unsupported' to 'unknown' - removed the opening bracket v2: - no changes, this patch is introduced in the v2 drivers/iio/accel/kionix-kx022a.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/iio/accel/kionix-kx022a.c b/drivers/iio/accel/kionix-kx022a.c index ff8aa7b9568e..494e81ba1da9 100644 --- a/drivers/iio/accel/kionix-kx022a.c +++ b/drivers/iio/accel/kionix-kx022a.c @@ -1036,10 +1036,8 @@ int kx022a_probe_internal(struct device *dev) if (ret) return dev_err_probe(dev, ret, "Failed to access sensor\n"); - if (chip_id != KX022A_ID) { - dev_err(dev, "unsupported device 0x%x\n", chip_id); - return -EINVAL; - } + if (chip_id != KX022A_ID) + dev_warn(dev, "unknown device 0x%x\n", chip_id); irq = fwnode_irq_get_byname(fwnode, "INT1"); if (irq > 0) { -- 2.30.2