From patchwork Tue Jun 13 10:22:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mehdi Djait X-Patchwork-Id: 13278300 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BCC0C88CBA for ; Tue, 13 Jun 2023 10:23:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239876AbjFMKXc (ORCPT ); Tue, 13 Jun 2023 06:23:32 -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-Google-Smtp-Source: ACHHUZ6Koi3vwCwNxc37bJI9/ZzcERLeaFbxxlR8zfR4jWCsgkHZazOJBXf8fzDRdfs+HL4CDAuMTg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-iio@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) {