Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4614842iob; Sun, 8 May 2022 19:17:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfBT/X0rD/vVz8n236Z+3mmVFBtjMToCjttt5NjOtA+WLBB7LQpg0TPdE20H1HMYLUVy3E X-Received: by 2002:a17:90b:4c4d:b0:1dc:7c94:b821 with SMTP id np13-20020a17090b4c4d00b001dc7c94b821mr15583945pjb.84.1652062660915; Sun, 08 May 2022 19:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652062660; cv=none; d=google.com; s=arc-20160816; b=daccEdG6QIKXEMg5AyOW2tUKVIZ2WIK01pTMJcFXlnSZHfOJqzdPWp7ZZz1N1YQWfK HTbl7/U3tZ8egKGCnGMrW6X2PR42emw3P8IFeNaJEBE3Coo/q3vmcVFRkqBPW+u+gX7w gRMGceiNJCI7HeuRPqdJ4KRFXYyN8q/Tu07f1jINc3zFdS6sXlU/bY+RINBcpSbUgnUk vj/9TK23NpzrnxnAypdf/H2L2RATfz02g26Zgf70s7r7b+dYC9EM/6pjafiqkYHe6E8L PfCAIEfiUrayH87iZ4DyNyNCqRliUx7fYEDPNJWhmPheaKh8X0Yz7roeeuGPalF1VP/l wNlA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=elZfc5nXMk81AjZWApVhSssEXRuzhpZxyNSS9COSuPM=; b=Astcy4ZVOr1rYsuDDe4o04AA84OYVlF4TenLGkFuZ+dB2qEHU1yO/tOxq1AF4sDu8m bvN3iS2zdsWfRrqbeEmMUR4T1uuwiAsaYrI4vchdAehkuKNdtxRhiPGyu/dZo9AmcYtP syX+P20DU7nB/2+gfK+iaxbJFDzhEdlwJwHTlFEZG0Wwa8KrjrNnRe6V8AScXgLQwO1P nZK+CBqqh1D9EPxjjEA5HZx/OqvtCtVlrxDY7x/7jDZ4XeQsFNoo52VcfblxrZLK9/v3 q+KcsIAAdF+3FBitcetSEKMHwgS2sKE8hEi7NEGdiVH9b3tSqvAR1bvXpajqHfAC7ejD 6rWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=T3qUaOew; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s136-20020a632c8e000000b003aa563d774dsi12012880pgs.36.2022.05.08.19.17.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 19:17:40 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=T3qUaOew; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 33AF0580CF; Sun, 8 May 2022 19:17:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345070AbiEDRCu (ORCPT + 99 others); Wed, 4 May 2022 13:02:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354391AbiEDQ5B (ORCPT ); Wed, 4 May 2022 12:57:01 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30BF74754E; Wed, 4 May 2022 09:49:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8789FB827A3; Wed, 4 May 2022 16:49:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E10EC385A4; Wed, 4 May 2022 16:49:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651682995; bh=T3taqKNS4GW6ujjq9vOvlKK0jXWPRH8z2xtSBaw/epo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T3qUaOewnwgk4c/ZthYi08rw0OsJsKOgOhU5kCxe++s/Y5Y1GvSz7HzkBKCOOl+tq KO0EkqTokLwpg/c3MtwIgaovvAWY+VtlMxMcLfe88AiMHD30P0oZPq3V3NIKaxEank Ydpi5t6RfsQJjyc8346cfCFMrbE+0iGLVa7aVCiw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Fawzi Khaber , Jean-Baptiste Maneyrol , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 5.10 016/129] iio: imu: inv_icm42600: Fix I2C init possible nack Date: Wed, 4 May 2022 18:43:28 +0200 Message-Id: <20220504153022.588593716@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153021.299025455@linuxfoundation.org> References: <20220504153021.299025455@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Fawzi Khaber commit b5d6ba09b10d2ccb865ed9bc45941db0a41c6756 upstream. This register write to REG_INTF_CONFIG6 enables a spike filter that is impacting the line and can prevent the I2C ACK to be seen by the controller. So we don't test the return value. Fixes: 7297ef1e261672b8 ("iio: imu: inv_icm42600: add I2C driver") Signed-off-by: Fawzi Khaber Signed-off-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20220411111533.5826-1-jmaneyrol@invensense.com Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c @@ -18,12 +18,15 @@ static int inv_icm42600_i2c_bus_setup(st unsigned int mask, val; int ret; - /* setup interface registers */ - ret = regmap_update_bits(st->map, INV_ICM42600_REG_INTF_CONFIG6, - INV_ICM42600_INTF_CONFIG6_MASK, - INV_ICM42600_INTF_CONFIG6_I3C_EN); - if (ret) - return ret; + /* + * setup interface registers + * This register write to REG_INTF_CONFIG6 enables a spike filter that + * is impacting the line and can prevent the I2C ACK to be seen by the + * controller. So we don't test the return value. + */ + regmap_update_bits(st->map, INV_ICM42600_REG_INTF_CONFIG6, + INV_ICM42600_INTF_CONFIG6_MASK, + INV_ICM42600_INTF_CONFIG6_I3C_EN); ret = regmap_update_bits(st->map, INV_ICM42600_REG_INTF_CONFIG4, INV_ICM42600_INTF_CONFIG4_I3C_BUS_ONLY, 0);