Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp653522iog; Thu, 30 Jun 2022 07:44:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1upFlCrJVOSPORd9+z4/qITvotdE3wFzi3rOui79i+tL2X1137/odVlzUiuFiYq5q3igwz4 X-Received: by 2002:a17:90a:c705:b0:1ec:83e2:777c with SMTP id o5-20020a17090ac70500b001ec83e2777cmr10496324pjt.89.1656600298783; Thu, 30 Jun 2022 07:44:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656600298; cv=none; d=google.com; s=arc-20160816; b=NKp26rUXnMhWFHJp43mb/1/CzGHhIK3qkT2dyF17ukmHbE4HXRiIhwcJKh3/cohAnU 6ahRdBO438o6V1u6ut3f8aM0LxnzKwBGtBN9CKsSroWK+YQLMcEOTEKK0W8TzoMi+SPf ROaFobNArwd+55e0wPq6+IWsw+nD5ZXk0Sdok27y2m/ENr2DlY9kMRDg+hoPg1EqtIaT 9DJizx5fF3eUChncQ0yomWHPJ7IZiUYp+V+PkzkyC2osA9i4n/zj4YVKjPLJrGp4DL4w Vb6lmrCGPRNvmLkpULpTUJSD7sWk95GQc7m158K+13Hk7tyjb/Pw628o9s1+fRla2nth Xo0w== 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=RCIqYoyy2FRy77puqjzZp9lnKIZ1rpLv6Bbvs45VgLI=; b=yDzK+Ozuv1M3daWnjhCLAE7x/Y5W1SuRFwOEau3ciffY4aAn5+9wS919Xp7Pu5eb+Y GP6aFAWIrDeFV180WcbtB7FQa3QRnBi6PMWf9tb5fImgIGs1fP15d2siPRKkOtS6zCKc ZPsJU2xko4xRETGY7oUmJNYehTMJ4TEIX7vmLDJF5gyZrn7KuD5BMipqvg8+Q7AEtNmY GwIJc/BaOKpHU+s7Wr8Jw+Bg+YHOJl2WwonA3bJoB7yI3fiPypXnbQyRRUsASaAaprkU jt9Ri/GsU5/+l6R1hEtTaOSnLrU+44cCsQMTa421a+q+Hw4fCv0/0C7AzNAe8tltZZ/M wvWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lQhcLbdN; 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 k3-20020a635a43000000b0040a88eddccfsi25113495pgm.441.2022.06.30.07.44.46; Thu, 30 Jun 2022 07:44:58 -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=lQhcLbdN; 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 S235758AbiF3OA3 (ORCPT + 99 others); Thu, 30 Jun 2022 10:00:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236593AbiF3N7N (ORCPT ); Thu, 30 Jun 2022 09:59:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C9E95C9DC; Thu, 30 Jun 2022 06:52:01 -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 C17DCB82AF0; Thu, 30 Jun 2022 13:51:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18B49C34115; Thu, 30 Jun 2022 13:51:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656597094; bh=9pFnt4Tljffl4natwPHL1q2QboxEpLx0K3ObN0lkqLA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lQhcLbdN3KM33Gij4sNWE+v4p/pVImZSOfVVlFF8rp15ZRoT+I19qtfXEuxAoQF8t zoZ1Dy53oqgVGjr7/RAo0H1/CYZ7Mnj7RohuLInER2kEhi91BuWdra/H5R49LgJFAX rOrkDsx/01a9XqrIgZFgF9qCA6y1BGF1KQRp383U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Haibo Chen , Hans de Goede , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 4.19 26/49] iio: accel: mma8452: ignore the return value of reset operation Date: Thu, 30 Jun 2022 15:46:39 +0200 Message-Id: <20220630133234.668762216@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220630133233.910803744@linuxfoundation.org> References: <20220630133233.910803744@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.5 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=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 From: Haibo Chen commit bf745142cc0a3e1723f9207fb0c073c88464b7b4 upstream. On fxls8471, after set the reset bit, the device will reset immediately, will not give ACK. So ignore the return value of this reset operation, let the following code logic to check whether the reset operation works. Signed-off-by: Haibo Chen Fixes: ecabae713196 ("iio: mma8452: Initialise before activating") Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/1655292718-14287-1-git-send-email-haibo.chen@nxp.com Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/accel/mma8452.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) --- a/drivers/iio/accel/mma8452.c +++ b/drivers/iio/accel/mma8452.c @@ -1486,10 +1486,14 @@ static int mma8452_reset(struct i2c_clie int i; int ret; - ret = i2c_smbus_write_byte_data(client, MMA8452_CTRL_REG2, + /* + * Find on fxls8471, after config reset bit, it reset immediately, + * and will not give ACK, so here do not check the return value. + * The following code will read the reset register, and check whether + * this reset works. + */ + i2c_smbus_write_byte_data(client, MMA8452_CTRL_REG2, MMA8452_CTRL_REG2_RST); - if (ret < 0) - return ret; for (i = 0; i < 10; i++) { usleep_range(100, 200);