Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6188260rwr; Mon, 24 Apr 2023 15:27:40 -0700 (PDT) X-Google-Smtp-Source: AKy350YrgRnfNnHzU5Ht1a8dFudghXjcl7v52OsgzSis39f1yCUDWPxwr7u5si75HMqpCAfdtTVr X-Received: by 2002:a17:902:d2d2:b0:1a6:9d98:e763 with SMTP id n18-20020a170902d2d200b001a69d98e763mr21035145plc.26.1682375259808; Mon, 24 Apr 2023 15:27:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682375259; cv=none; d=google.com; s=arc-20160816; b=prQz8ScDvl6zbmICse9pMm55azFgJnMyu49MP66wtZicMS0fih/BBUgeyVWMXby1HV AYqgs+KntDfgvaXSgsvVbHvW9Sy0YR1MNmMJ7eKYPtp39embSxA64cHUKdKjoBhnpywa bSyH4LTR0jliFd7QZJ907pgteO5t5k2MuAnd90jq9D2VX9WyHPEVwszkSQ95JkJGzOTs DJC7FBrHAHS39KZR5VaZgdSckat0HiZ1OqLKL8C/Gml88iwZ+2c8wwFeZD/5hUoorUHM 5RCI+hSWI3KKdUtH2gnkZ20N+BEgnVDHQ1/DSfDlALAnkFJnK1oLaQxpaz3SG/YDNGBk POag== 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=yh9lumEkpeARra20zUI3XX4mAupJvGL3brx+659+U9U=; b=nx6P3u4MkWJ9iaauO9hgnLILdm2eSZQDCyJFQOP69vluBUBjbipt1pc3sP1onPnnLx Omha29/FMiYF3GSQK951NE2X8//DcP50r7lfFBvJPluD037pfyP/j05sfLQxquWsByZn nEQq9dL7ztEUQOq+Oy1xU6NjNx5RCTdQVTuABlb/yOPY+/M1uyeT54jFpfVaBKzMuyXQ 2dV9HlgWfcvTi00Xde+naCFzA+ohOLyPQ7CinTmtjGcpkXzscbVuzkgrm8KF7hF5+aF1 2C2MiN8qd1082z1/PQqjKD7O10qMoK+u0gxZSALS5nEi/EAxIWiVMhF/VLssaPdDw2lB Nv1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=RuNCYqi6; 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 l7-20020a170903244700b0019b7766afdfsi8705744pls.626.2023.04.24.15.27.26; Mon, 24 Apr 2023 15:27:39 -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=RuNCYqi6; 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 S233276AbjDXWWv (ORCPT + 99 others); Mon, 24 Apr 2023 18:22:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233267AbjDXWWn (ORCPT ); Mon, 24 Apr 2023 18:22:43 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41E0393E6; Mon, 24 Apr 2023 15:22:42 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-958bb7731a9so466163366b.0; Mon, 24 Apr 2023 15:22:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682374960; x=1684966960; 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=yh9lumEkpeARra20zUI3XX4mAupJvGL3brx+659+U9U=; b=RuNCYqi6q3aeCvyZ8WU2zbiE3qdLNgDElaAhTMpOjPkMobuIs0jEHJG7Hxzo0EsI65 8saTwqXqQ5JJdGTYcnn1cw4wxN8Ssvu6b+FdgidA34lF/cmJhG1tqjocKglmgcp0/4EG VOg9ppRA/EiJkha0DvcIZVyr0Y3x4/AD1wQ05ooIV0qsmBGZKWUiFmLOgCX0A4U6ebGP CHRE2O3023ZjjNJVytlTEtKLaCh1kjmUILK2HfE5xcB6SdSDb7ynFh6dVspFn3ucEHsO 7pCqEZvaTv0IsvRHkPB31b4621gqF98jJvsufHqnkgLLlCV85VHDS0R0SdBlvHWKRgQc IVFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682374960; x=1684966960; 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=yh9lumEkpeARra20zUI3XX4mAupJvGL3brx+659+U9U=; b=JKJk0ksqBWDGLDxRsAMqEocvj4omZtFfwq7f7OWqKBBxRBdKuJosJUPt4V8SnFvB9C Hh4Qb73dlvBkLYk8jX1oNjORm5LCT6F6NkCTyzAwBPwkgvnDkGgtAV1vAcpKuHm4+d/b qGr4jGJHOtblP0X19mpWL03vQVH7aYZGquzWmQOuWirhEa2q1Ou2BvdULSrD0B+d0ODW +TsAMclv3weM+RtcfcYNMeNNgYKcLptMqZs7iP8ra0RcI/bHLS7JSyqqCehTtmsPLlWu VfOXkiiF+lrTDsthB+ptADM1QsVHfpEd1Jzi0BPr+RdnxhyoA+gJgGazFvjmubSRFkZG hcQQ== X-Gm-Message-State: AAQBX9fVQGodvrG2lOJVgrailIZsbHzhn5X8jVTkgzxLzT6niJEPoyLL 9alJblxGX5JbEd7JSMPj1MQ= X-Received: by 2002:a17:906:c41a:b0:94f:21cf:86c6 with SMTP id u26-20020a170906c41a00b0094f21cf86c6mr11129160ejz.51.1682374960798; Mon, 24 Apr 2023 15:22:40 -0700 (PDT) Received: from localhost.localdomain ([2a02:8109:aa3f:ead8::2fd0]) by smtp.gmail.com with ESMTPSA id g21-20020a170906539500b0094efdfe60dcsm5870886ejo.206.2023.04.24.15.22.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 15:22:40 -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 v3 3/7] iio: accel: kionix-kx022a: Warn on failed matches and assume compatibility Date: Tue, 25 Apr 2023 00:22:23 +0200 Message-Id: <18574aeeb9b66a9799972763ea6b8019fe7ffc35.1682373451.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 --- 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