Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1488636iob; Thu, 5 May 2022 02:28:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyo6zmBHbcgqTjupmIG6xfFmViWX+fYpe/OiuPOFCVRTn224v4HKTKvK6x+/6S/dvYYbnG0 X-Received: by 2002:a05:6402:35d3:b0:427:b3c7:f7f2 with SMTP id z19-20020a05640235d300b00427b3c7f7f2mr24299542edc.152.1651742890980; Thu, 05 May 2022 02:28:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651742890; cv=none; d=google.com; s=arc-20160816; b=aRw3muG+nyDkDJEDubyeOPdj3mLGU1XK8LVGfgsms/XA8bnWgqBcAftfu1ssMeAIYi b5psTzKxosOFhBMjFViSfikAD+nvVvuhh6aJqm65IHa7TSlA50piiIBkA4ywkrV/GFo8 fllYLKv4Zs4CykouRJliLXx014x0DnZcTqPx9G2OCeKuedK6/OQO86Y33Ww+ipeQBbzG KWI5/CpQmX95q1RwEpuCRmTU0dX68wWHnVA7XHIS//qq7McKVSyvkbiMsU70JxPZe4F7 6wmOPVSIQx72chmHWwJ3Zj/WNLCrBfJWNchNwhkXuIz/Acni+XR2lJz4BLY/rt8GbYlx YMRA== 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=JUI4mIyzS0tXU7dyfvAGryynQbqH2qNTI94ui0MbLIpDuHLUZRj+vfzeXm4r6rNEHP p2h95NDtgDj3af3cuOFzhsQY377UkbFGp22+J7qUqWgfOQaOjqPNio4l0LNyGgF5jClu ZI/adDfy2IZozFl+wYciYZw6L6f0/P6rY2xkvR+7/xRkDnx4SFGPuIc/9jptBzTqb41X mCJflWBO1OrcthuEZF58diiM+O9jD7DafRpMMID+Bl0mFxjazdULJgub/LQSSwMqRTfP gutsy8CeiFSMREmDwxkmJ3tPY3dEqiFhhz+wuM55TvUzzVR8M/iaU6RlZDvwNMWhsoSD l1hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AbCcbNCA; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa40-20020a1709076d2800b006f36ce50024si1921629ejc.171.2022.05.05.02.27.47; Thu, 05 May 2022 02:28:10 -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=@linuxfoundation.org header.s=korg header.b=AbCcbNCA; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356167AbiEDRVI (ORCPT + 99 others); Wed, 4 May 2022 13:21:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355118AbiEDREI (ORCPT ); Wed, 4 May 2022 13:04:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 551E74DF75; Wed, 4 May 2022 09:52:44 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 2E05D61896; Wed, 4 May 2022 16:52:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 718D9C385BD; Wed, 4 May 2022 16:52:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651683163; bh=T3taqKNS4GW6ujjq9vOvlKK0jXWPRH8z2xtSBaw/epo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AbCcbNCAsFuo7FxTtdqEMWYceH7yupglk/KkhOShfhsz5C3NNQz0iPOoMHTEQhazO Uy1UxROVqG7ezDoZd/DmQwlzs4RkV8Mq7hI768ZT5YPhtZTBakr6jL71JlQ7MbHl3w adtrkV6s/SvagCumiDoASBl1mP0ySN5WbkjAJ+P8= 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.15 015/177] iio: imu: inv_icm42600: Fix I2C init possible nack Date: Wed, 4 May 2022 18:43:28 +0200 Message-Id: <20220504153054.799071848@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153053.873100034@linuxfoundation.org> References: <20220504153053.873100034@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=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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);