Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5636993rwd; Mon, 12 Jun 2023 07:46:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6PRMLHe1mXjFGjnFEARUvjChbgGY5ZQrrYj95F+TgV8f/sjxb1WyQ1Qp14zggxJjVxuxjh X-Received: by 2002:a17:907:9285:b0:96f:912e:5ec4 with SMTP id bw5-20020a170907928500b0096f912e5ec4mr8826232ejc.16.1686581192030; Mon, 12 Jun 2023 07:46:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686581192; cv=none; d=google.com; s=arc-20160816; b=tq25MkYP9RVznBLAC01Aei9uQfGgl8zp+JUl2SqB31u8xIsEGcrJkd3/NuBKVmnYI2 0h6mYTAaJZuZKXJnvLBGiCgG1yLUXderiDMuUAjnUJoUPR1vKnuQCshK//xktVTAtoCH U9hrmacYrQeGF+b3JBIkzX9arjrnf87cbEQyqQYEiFaODTe8sbco6Q5wLAoTSC6R4+ui x1Wv4Ik591PXzYq2kKVmrpw4vz5C8aRr4nVY3xKs9bDfGqN9uw30EeZvhL9LuTaKGXiR Db+YlMN4hClcKDz5mp2QoI5OtomsPI92RVJrryfsTmMNaT7vvMR/d6pJHwDr7f678Ca+ xNQg== 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=Fhxfo9jubdaq6rreLjK9+w/KO2DLgEBFFR+q3ArG03U=; b=Mom2iQSMO8Bkf+593I7Bo1JGUyYIJF8Sx2VxtzBl3kUOyN3N179ahGQus5MnWf5JwQ H+pefr/CvmEn3m6HnYd55GewKa19nwRAkjKPl7LM3+AYspe+bVQLP6LjODK8OsTsFpT7 fAO5sUEPYJvb2eheR3YzQF0wZswUoI98+4aA2X6J5iXwbeunPQSyv68zp51yNOsHNIZL vDrOKEKTX+Gd87QI+X4W9JYkg/iSirj3ZzrOIIbg206/SswT2tPSRrdnuVMpZTzZpEPv NvIXZN1mg2NSlqHgarv7RbYEZgflzIahChc+roAbuU4Au2fBwey7RxIeOGJ0NwgyetOV MdxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=FiiK9bmK; 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 ay5-20020a170906d28500b00973943e93efsi5330014ejb.237.2023.06.12.07.46.08; Mon, 12 Jun 2023 07:46:32 -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=FiiK9bmK; 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 S238616AbjFLOYr (ORCPT + 99 others); Mon, 12 Jun 2023 10:24:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237743AbjFLOYI (ORCPT ); Mon, 12 Jun 2023 10:24:08 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E8081717; Mon, 12 Jun 2023 07:22:36 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2b1b30445cfso52395101fa.1; Mon, 12 Jun 2023 07:22:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686579752; x=1689171752; 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=Fhxfo9jubdaq6rreLjK9+w/KO2DLgEBFFR+q3ArG03U=; b=FiiK9bmK66Iw/mpParxnMkjQqkclvlfkvieuK+0KhErTJPvSqmxsMxP1XuEDTEYG5E a14M1UZbO7IhcLGrYw7LTf/iQOsxHYy5Cua+1/7GZh7AJQCU15yyIVJ0LyrTWzptvy/q P/Xz0UQvCBzfkVLNPvzrVvQk/HEhJzJ0yLCCmkAWARJ9Ggtg5Hc3qafpDd4BlVf4e52t MoNrcK56F2Zt/w/1bdDs8FPlc0vzIU+P9x28AAn1nLJZvakdosZi4D4K/tFwAoxG2bLB 2X5pR5o3V85tc0BoNWxJBcWRpT2NEgB8RJ349Qf80xzpQd81H6GYc7vjcHxIWSRLT9Lt x9RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686579752; x=1689171752; 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=Fhxfo9jubdaq6rreLjK9+w/KO2DLgEBFFR+q3ArG03U=; b=dfPdqZG3Hpnt1JwYR3cSoFwLwlGKujIv4q/mqvf4YKUKo7Dx7pTVYPWCqivyD8j2ui 2C+/8F+aGBe4kKR8MrkzgUW9GAdeedmPDaU0X0QFFMl359xqHL4EEanOYSN5BQe5oZEs J0r0xFm/pYgx4mc8Aaw7M8PWAwpdDS64VlYQ31ngQ2P9qVD1b/LpK29NVPSpDBcSqV9E t3uCd8LpuIEbLbJVDFXyspsvjJc2HB1ADtlfEFj/cawyzGE4NU3m05Rpl2NA6Tw9iK9G 5t0etkmRZYDFxVqWR3HI31KdvVsoiWiXb36I8jz1e80uqGMl2XRqote4LAKiY/Kxtnbx JwmA== X-Gm-Message-State: AC+VfDwawXKoL1Dn06j+h0jvuFMcfs1fxqia08NlxgNPvLIKKXAKH9/1 eCkH6k/xlznwteBf0jNm1bA= X-Received: by 2002:a2e:3c10:0:b0:2b1:fda8:e653 with SMTP id j16-20020a2e3c10000000b002b1fda8e653mr2506642lja.27.1686579752215; Mon, 12 Jun 2023 07:22:32 -0700 (PDT) Received: from localhost.localdomain ([2a02:8109:aa3f:ead8::d8a0]) by smtp.gmail.com with ESMTPSA id i8-20020a17090671c800b009659fa6eeddsm5262528ejk.196.2023.06.12.07.22.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 07:22:31 -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 v5 3/7] iio: accel: kionix-kx022a: Warn on failed matches and assume compatibility Date: Mon, 12 Jun 2023 16:22:06 +0200 Message-Id: <2c69e918cb6dfab663bb62952c554b6b72f58390.1686578554.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 --- 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