[v9,3/7] iio: accel: kionix-kx022a: Warn on failed matches and assume compatibility
Message ID | b587cfec2f3350623277005f62121864bee857c7.1694867379.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:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1649207vqi; Sat, 16 Sep 2023 06:07:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHQJ0ycE51rW2/3qwCnj0pV/hPzqqNiV1OC9vIvy7xnnD6KyHiKsw/CFYY3cNeMATVHJ5SX X-Received: by 2002:a05:6a00:2446:b0:68e:236a:93d9 with SMTP id d6-20020a056a00244600b0068e236a93d9mr4098931pfj.17.1694869638805; Sat, 16 Sep 2023 06:07:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694869638; cv=none; d=google.com; s=arc-20160816; b=CD+vBdy+rmEyToRvIt3wMcoYMLsRfXd/+uAvprYMLGr5t/8GqrMa7JsYwumbfBBX/o a7crcpNOuhokzIQT/RcqDWHlgyW94KA473mZbtFK8mGyDmBmAm39e1mP8ZkxFy+58pqc zxCmkqk3a0pj+fiF5N83adT+2+8E01nSZ54nYQS0zfsqasWfLCt0s5ifCxZX3P1urUeR 7jxhx/kBxqz2luqT+9StdCNnawJayDZ8a8DmEnjBoAdkn4w1ETx80nr4QPtKwKzkDWqb nO/zOwobnaKrAdOPdmXo6G1vw7JKntYQjE7AGDFSPgh2rHNVeLCbFJj/tKnx1lS+Wgx+ H8Ow== 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=rbUZvYmQNv8XlHrBCEW1i93lPke7LBgt2Bqs3H5wtAk=; fh=2zT6FsJPdwiBkn/055SDb1wyRhELXsKlWNaRJZAGcrQ=; b=Up7zx9vsOM92QN/D542d2+n0UX6X/l8V8BrEpB9ACfqoD3eVwBcPLXm2OpqjV/b8vZ yJTUHN3+HsDLuowd9Cv0t1iKt7B8ZLkaJ1RUceVqF57r1b9vkyMDHVK1rBvn//kMwLPj eFdEnZZ/XhXr5wccU49ji2BKQQR1NiRSgHwY4ZYbmmYMj/OGJ7U9ZQEEDoRTwDpZlw8Y e9Zx1GtEy/7b1s8l5zInfkqA7wjel537rGxvGWCmQQPb+Adj4SiFvZ9zg+UpBhKAxYS/ R75kaMfrIYDlgjFCboXCoGfEM6ToCYmK/fO6p2j4ZYlBYEN5Cq7eqCoIY+tYxnE+nbQc uvJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=F6iGH7t1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id v69-20020a638948000000b005649f560ebesi4777441pgd.525.2023.09.16.06.07.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 06:07:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=F6iGH7t1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8E0278371DC4; Sat, 16 Sep 2023 05:39:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239251AbjIPMjY (ORCPT <rfc822;toshivichauhan@gmail.com> + 29 others); Sat, 16 Sep 2023 08:39:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239160AbjIPMjM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 16 Sep 2023 08:39:12 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EEA419A; Sat, 16 Sep 2023 05:39:07 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5280ef23593so3446581a12.3; Sat, 16 Sep 2023 05:39:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694867946; x=1695472746; darn=vger.kernel.org; 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=rbUZvYmQNv8XlHrBCEW1i93lPke7LBgt2Bqs3H5wtAk=; b=F6iGH7t1axChCJBQ4Uaxbg98Y4TGX5MxKr8LsU3k6OXTPdBIyGRbYuMceFsEXU4ldk 3ZHwMC6cSS6RctFKY4UaI3kdyYbS1ZakgohUvNulvlSvt3MsHJZkrPhDIxqyrSzeIHPc xHzyliViJ1HpDFqHvXBtf36UuTQtmA55r8+cJ127ZA227YBomiKH5yRANEABzXi4lW7L hsm9S90QBhmnCIWjHIRndbG24g0bRFad1g7xyPZqtuYCfETtaIJ1fuoMt8kGbYYRqz3c Sq7weyQj171yAco72DNj0n3s0aWRHGFHFqOlM1GcwX8XkXhYMcfUj1Os4fKppxauMGXC pt6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694867946; x=1695472746; 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=rbUZvYmQNv8XlHrBCEW1i93lPke7LBgt2Bqs3H5wtAk=; b=QQ3yd+tYyLW2vthZMsYSi9r00NkiJZebTGo08g/B6obVQmuxC3yg+aE7cig9kNUFUB pqE5wM9lroOE2hG29p5jnzYqgK7SOCqf+dLjlskXw1EpPHSuzyqQYE8zbYolT3b61mm+ NAxCmHA6XDCxj8n5nW4poX75U4f9e4TSMI/ASTIUY9qLdNhNE9Bb3zv2Big5chqXCAeE rwkP5UnaiaA14fHh/0HppbUsIGz93oOuiqPQCWSRjZQxEjh4CXl0OYy7rhny/s1VNzL6 94GOZLi2LZHVvsiPZs+aqZoEM6lp2PIOH9jcGesFJOdVAHTMpfSlCv+I+65qcXG00B7G GB6Q== X-Gm-Message-State: AOJu0YwOj54vqisrBxGQee9NBLZKX4rnMt316curU1/8twljBa0VlxW7 2SpcDVb66xRmSGT/vVXAkxs= X-Received: by 2002:a05:6402:14c4:b0:530:4fc4:50f8 with SMTP id f4-20020a05640214c400b005304fc450f8mr3350537edx.29.1694867945641; Sat, 16 Sep 2023 05:39:05 -0700 (PDT) Received: from localhost.localdomain ([77.134.181.150]) by smtp.gmail.com with ESMTPSA id bo6-20020a0564020b2600b0052284228e3bsm3474064edb.8.2023.09.16.05.39.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 05:39:05 -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 v9 3/7] iio: accel: kionix-kx022a: Warn on failed matches and assume compatibility Date: Sat, 16 Sep 2023 14:38:49 +0200 Message-Id: <b587cfec2f3350623277005f62121864bee857c7.1694867379.git.mehdi.djait.k@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <cover.1694867379.git.mehdi.djait.k@gmail.com> References: <cover.1694867379.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_BLOCKED,SPF_HELO_NONE,SPF_PASS 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 16 Sep 2023 05:39:57 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777199626493361545 X-GMAIL-MSGID: 1777199626493361545 |
Series |
iio: accel: Add support for Kionix/ROHM KX132-1211 accelerometer
|
|
Commit Message
Mehdi Djait
Sept. 16, 2023, 12:38 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> --- 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 2f1e7da25460..5a144f86c634 100644 --- a/drivers/iio/accel/kionix-kx022a.c +++ b/drivers/iio/accel/kionix-kx022a.c @@ -1025,10 +1025,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) {