[v5,3/7] iio: accel: kionix-kx022a: Warn on failed matches and assume compatibility
Message ID | 2c69e918cb6dfab663bb62952c554b6b72f58390.1686578554.git.mehdi.djait.k@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2638432vqr; Mon, 12 Jun 2023 07:44:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4JRzhkMsV60JRvk0WHsD6lmPFNb6IE36ZTXRJYao+AhLWs5+5l6oLppw8Q1fs9IvI7Tc8C X-Received: by 2002:a05:6a00:1995:b0:653:91c1:1611 with SMTP id d21-20020a056a00199500b0065391c11611mr11079244pfl.14.1686581099464; Mon, 12 Jun 2023 07:44:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686581099; cv=none; d=google.com; s=arc-20160816; b=QHj4jRxqeYbnHkkX0LNXJDnwG6paSagPUm95lr9RP0p1fUSIsGFRS2zcXRKh62WplK jglQLuqD6quoep0Y7F8ppuN0FjQiM3kz57l9XUBl+x3CJOw6ZBH36iEM7dZg8Tsp3MUc Qenfir54fBQSqxZWWMQV9v41HijczNaMs18Wfa4UfSwjmesYx3klKK3psoHcVHOFvyHI Ac36QECNVjg6FE0Rnu/jQXvKJ6l4hb21XTti135IQe6pN5cLnMkPxNxgs5XwyzwCUf/P p5z7UTbW3VcNL1bTFtrAPWNrNyB87kXcnHVF7Zv0hZGtoAkxIzykSLN+iN+3R6LYJqKl nWVg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g13-20020a63be4d000000b00544054a5f90si6958333pgo.555.2023.06.12.07.44.47; Mon, 12 Jun 2023 07:44:59 -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 S238704AbjFLOYs (ORCPT <rfc822;rust.linux@gmail.com> + 99 others); Mon, 12 Jun 2023 10:24:48 -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 <rfc822;linux-kernel@vger.kernel.org>); 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 <mehdi.djait.k@gmail.com> 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 <mehdi.djait.k@gmail.com> 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: <cover.1686578553.git.mehdi.djait.k@gmail.com> References: <cover.1686578553.git.mehdi.djait.k@gmail.com> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768508462705560891?= X-GMAIL-MSGID: =?utf-8?q?1768508462705560891?= |
Series |
iio: accel: Add support for Kionix/ROHM KX132-1211 accelerometer
|
|
Commit Message
Mehdi Djait
June 12, 2023, 2:22 p.m. UTC
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 <mazziesaccount@gmail.com> Signed-off-by: Mehdi Djait <mehdi.djait.k@gmail.com> --- 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) {