Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2540966rwd; Fri, 26 May 2023 07:54:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4tHtoQbRYElZx8Z9K/eRnU+B2AonlE/mTeDRmdxrolWEjTCwQ3PRy6OucpxWXQXzDfhCEw X-Received: by 2002:a17:90a:5911:b0:255:8063:c8dd with SMTP id k17-20020a17090a591100b002558063c8ddmr2447174pji.18.1685112878001; Fri, 26 May 2023 07:54:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685112877; cv=none; d=google.com; s=arc-20160816; b=Qp17Js+fPyIR7enLGaJl5rpiHhzxTGsDVm9wln3VGSuYuuSWfu7pWs0SPO00j56OBG 1TFlL+q3gSirEDixRV1gg4APmfF4V8D3KQJ03bKTd83bvUw0/SVYQm6GkzBs8fYbUWxG 2yKp6fVQvVm7wgdVuWM22/Fo2Z8odE4EVDC5hAJOIKcwDE1v2U3/EMr9N17hHAQTp6iZ +Dzk9ob3vgdLVinytpx/AuNdaTubPCtn4n0zkjul9FPbS7sRWzmBSskpu1qTdJv/Tz+n HRyWN2yd4JQ1jII71LjqI4aIbHMeIT7n16s2MWVtshV0luy1TbRyGRx5XU1DWfuAR4b9 mOrA== 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=bR+n0r4xZA3l73V+FeeZfa6IV+HvrfUxq6BwqD6x6q0=; b=yw2rMG8Fe8Vqj87a6ID3j5pG1uR4RY5UYCQk5LiSFsZrY8OLu+Fj+DK5e/wqqxshWf jXpwbUhGrS/fQQU54DXucqDm0bAHBlxCYS+yUS54amGoZYfTNOLUs1n2sDkpOoa40OA6 VsVrrA5h1scZBzRS9V89Dw329K0DpKa5FlYIiqrfafVMJT65UyAeXkRkZsuLKo0xQnCD UPB5ILBB32j/iEtVEeV2yr5t9syBk3sTCGfGr8le4rlZRdvse9OUprioBMl84YSDNG04 7nQb5tdpzIbIUH61nQF26hIoeawuJc9RGTm5BW9kx6t/xxIbC23sDtCGtkyfxc9if7HG PcJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Kw55PJEy; 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 bo24-20020a17090b091800b0024dd283436dsi3256608pjb.54.2023.05.26.07.54.24; Fri, 26 May 2023 07:54:37 -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=Kw55PJEy; 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 S243876AbjEZObL (ORCPT + 99 others); Fri, 26 May 2023 10:31:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243862AbjEZObH (ORCPT ); Fri, 26 May 2023 10:31:07 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4615E187; Fri, 26 May 2023 07:31:06 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-96ff9c0a103so115085466b.0; Fri, 26 May 2023 07:31:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685111464; x=1687703464; 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=bR+n0r4xZA3l73V+FeeZfa6IV+HvrfUxq6BwqD6x6q0=; b=Kw55PJEypdtQz6vZ8Q/UJvVmm0DoUjDrSczqfSyImvq2WDIrGza0xXCKvNk0Am6ZZD y8efE2xA7ZiSCvLfdPe78SSInwCL64spuPe7kdwU0faHUAEb3noMNexXxvxq/JVr3yoi HFYfLy8H8FGPQBSGJyTvaTbAEHoDrhOcp91CD3X3yzY+wuVv6tGgUDvnkLOj0HBq+fs8 zdR12Kx6EWqxCjlkqxJrXGbADHA84wxhYybO3Xebg5z2J5UFUD5oZdHJob91A1TT+hKW TYB6ye3mqGJcHYAkVe0uJeD3uSRrs/qHN9RCcBtSp6XOtxdSq43YYoS6Prgiu8mxrdb6 crAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685111464; x=1687703464; 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=bR+n0r4xZA3l73V+FeeZfa6IV+HvrfUxq6BwqD6x6q0=; b=fUSyIC4K0flr5AlRJ3uhzj/TsPvMzn9NeDQYUFPYSdLwkQdNZnto0H0K5BNyi0qIMw U0s/c9iu71/3HDyduSUsOsq1W1vsvNleyGUcbpsXWfA12/qNmdN4jS3RTFJM7ZnTF4LG Wia0gP2R+zAxK8MR3c9raxa2ZeLOAgakVvjCYpHPAwakkqRsmilUeCtEQAVcxijRUXvW NsPosI8EKKP4DruwhYKc3NiaI1c3wKJW1gntrQI+f9Re8TXO0SLr1iOrTztIJdEeA96y bGIMW54Vd7MjWLzyOIkId7X5Pr6IvHgKlfbsPkex8r0XpMnUq5M2JLAbN8UuBGsRcsdA rbAA== X-Gm-Message-State: AC+VfDxGgo6kWR8DgsEDsfdXPySRYHGCZt7ibow61nuiBHoaxNOUC0qH HNxwUODepVLowqlTheZUsao= X-Received: by 2002:a17:907:9445:b0:965:6cb9:b768 with SMTP id dl5-20020a170907944500b009656cb9b768mr1987558ejc.31.1685111464232; Fri, 26 May 2023 07:31:04 -0700 (PDT) Received: from carbian.corp.quobyte.com ([2a02:8109:aa3f:ead8::d8a0]) by smtp.gmail.com with ESMTPSA id r20-20020a170906365400b0094e7d196aa4sm2157023ejb.160.2023.05.26.07.31.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 07:31:03 -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 v4 3/7] iio: accel: kionix-kx022a: Warn on failed matches and assume compatibility Date: Fri, 26 May 2023 16:30:44 +0200 Message-Id: <18574aeeb9b66a9799972763ea6b8019fe7ffc35.1685109507.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 --- 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