Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2908356iog; Mon, 27 Jun 2022 05:33:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vh6zyGGh10T55cY11H7hO7zTn/AEKVcbK6BdY/HPtp5jUSvsrzDhHQqoriFHjgF0l2KmVm X-Received: by 2002:a17:90a:1c02:b0:1e0:df7:31f2 with SMTP id s2-20020a17090a1c0200b001e00df731f2mr20189511pjs.222.1656333190251; Mon, 27 Jun 2022 05:33:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656333190; cv=none; d=google.com; s=arc-20160816; b=v1laYnSuaKwfmTJEhsYm18rewFbhAMD64yvs/z8j18PZlwncTnn8OY/3t9y4hryn5s s7E84JLuSWN9I89sMSW/UZtXH+voZFidNBS7i2+gnhdKMB5Mhe+M6Sw/BjXSniuDwc9y 7EpAJIvEWQ0ojUI5qbFRGV9E1h4lX/WRD9qF5rNbqZlzM5y1M4B+qY85srODDxDuABoq toJyX3GQZ7Rm0hIdom7EO7NOmlM2Jn3fuySwXY10iLq7t+KIrKYszp4OMZzUtZx0BSir 2Ni7xtPPlWPdPInDlruPXJVVDFWHngZuxC1y1NefZ5OKtI1aY/lOmm8YgvgiwVPf++cc 07OQ== 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=/wRN96dcGLvJZNcBWbSwyOdyj8bfoAMc1eM5+83xNK4=; b=pKHHAmPcM9fpXV26BoO+T2FzfdiGQ+2Xvtg+YudNqtc8ijPn7jtIfY0dSyXBsAgMaB g4WvCuKr6xc2RW+I2ulH0Z0deRqHxXfPr05YdGk42OmgefTJ3YeUWizv0pqXs1pnjyMx DZ+omHLyV/q0RWJ30tmRkBZNMdclKyLWriQexFLLU1mXFCGB3VMkVPoa+S9qXxFJOqf8 ExpsSVcxmRAeuZQR3esFVw/0fE7NDBETXE1a4h/ExqbJPWSC/j/gEEhz1rt4syTIhr/K 0/tyVwB1o21sYk9L0y0hoM9InM8lQ0cNtJwQ8a1v7aKyRqMEb4XIlW1yR6W2MNRRDLt4 cFaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jIFi1AHi; 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 o18-20020a170902e29200b00168cca61b42si12366595plc.125.2022.06.27.05.32.58; Mon, 27 Jun 2022 05:33: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=jIFi1AHi; 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 S235118AbiF0L1e (ORCPT + 99 others); Mon, 27 Jun 2022 07:27:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235099AbiF0L0l (ORCPT ); Mon, 27 Jun 2022 07:26:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A507DE8; Mon, 27 Jun 2022 04:26:22 -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 2716F61494; Mon, 27 Jun 2022 11:26:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA0DAC3411D; Mon, 27 Jun 2022 11:26:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656329181; bh=LLzPG23zo9T/7uQSdcduFmQ1qDCPxAi1LOn2QxtTcbg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jIFi1AHi7pG710RMYRVehNgPM7ReRUi1wOKXhHJ5g8EA4SQXJvnhtireUiDAkyShh dRsQO3MH9Fmqngdrc3WGb26Zg4Cli9lfQPde4b1v6YaDSGKueYUFk7U4OiC2og9sRv QPn7O99zmAyKuD92u3+a2pPnvego5O5XD0t307tc= 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 5.10 076/102] iio: accel: mma8452: ignore the return value of reset operation Date: Mon, 27 Jun 2022 13:21:27 +0200 Message-Id: <20220627111935.723702026@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627111933.455024953@linuxfoundation.org> References: <20220627111933.455024953@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 @@ -1496,10 +1496,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);