Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp481933imn; Wed, 27 Jul 2022 11:25:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vzQupNWELdkNHK8uMA7XVs6oDYnoslN27czx766yEE6BhHQChzoz0YZopV1SzM+I5BkZvl X-Received: by 2002:aa7:961d:0:b0:528:ce2b:d9ce with SMTP id q29-20020aa7961d000000b00528ce2bd9cemr23356060pfg.83.1658946335161; Wed, 27 Jul 2022 11:25:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658946335; cv=none; d=google.com; s=arc-20160816; b=OvpJp66cLm4vCWQJpPjfbFJdvj9gJo7oAVWTnopGFXDggxgI8N4xk+2CoxHg7PhMDI Yz+3IZr4AsSahheeWnMoCS0KJTchPXFIFZCF6wqX7WyMbuP000VxAAI1Rx4JGtqxubhv ur5EYx/6gl/0lKWuAwAfFhcvF9wwkMD3Faqs6akKW69uyxDrpJE9yutDUnMBdlZh9YA8 I0tTm4j7gXk3XCfswBd+j6OQSux3htEr4UXZqwpk/k50TjlfK0laSslE0ojdhQkj+V2n wDkQyIyV8Awa1NPhsO7ZW6InvTRTTXuP9a9loKq8no4BwEsBO4oAEfPIvBkWCz9IuxTz wilw== 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=tblHwIR6eQdEOY258xKJhpC/Zom9LHDce74U1i8PPXs=; b=nFQZzQBkY+md3Ws7nRlDAvDNE/yYIxFXbebPSLjP1J9r4W6a2BqOwTlPLuk3Riadso r5JjN9RhdzQUHWeSjLVRQbr1/89YRsxvIXRApS0Heg5W5u2DerlOw7UFPakj2wVUzDrv gXLdL4m9Hq/05A2V6NfEyubngVqfCK/seKZbKZu5aDIJU+2Ybvl5yG2O7qeVS+mtFwyA yVEG6Whbvgaz7XC5bSFAyOlUbhMdQcZOEX7g5W3u0FcL2diuEqyomP0IYiTz30OqV5O2 4bgS53S6SP3ITxT/2fSyjFnMDfY9Ko+vZy29MGiyv+X+xCxY9WB3CDfQSFFKpVLCi9nM Avcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XA+sWQpr; 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 lb10-20020a17090b4a4a00b001ecb608ea41si3290213pjb.167.2022.07.27.11.25.19; Wed, 27 Jul 2022 11:25:35 -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=XA+sWQpr; 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 S239656AbiG0Qli (ORCPT + 99 others); Wed, 27 Jul 2022 12:41:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239221AbiG0Qkv (ORCPT ); Wed, 27 Jul 2022 12:40:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EADDF5140A; Wed, 27 Jul 2022 09:29:24 -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 C210E619CB; Wed, 27 Jul 2022 16:29:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD695C433C1; Wed, 27 Jul 2022 16:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658939364; bh=ReCbA0I7f/QWMMwN7Z40JHNUBCBF6sIrguLmZ2hyXRc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XA+sWQpri9IsLoHITrzmWuAsFRv5lggoijCDQVwkYdvVa3fsVKoTRPY2o89geFKuY E4ppXba6pp7pKU/KmK1xTisCPWzhSDV8VHm0ha+l2DsbYpvET4+fDeLgjyNexBPtDG BecBFR1RimznKv6kFnHQMCR9UarZyX2RxNbrm0lA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Haibo Chen , Andy Shevchenko , Bartosz Golaszewski , Sasha Levin Subject: [PATCH 5.4 42/87] gpio: pca953x: only use single read/write for No AI mode Date: Wed, 27 Jul 2022 18:10:35 +0200 Message-Id: <20220727161010.755473777@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220727161008.993711844@linuxfoundation.org> References: <20220727161008.993711844@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 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 [ Upstream commit db8edaa09d7461ec08672a92a2eef63d5882bb79 ] For the device use NO AI mode(not support auto address increment), only use the single read/write when config the regmap. We meet issue on PCA9557PW on i.MX8QXP/DXL evk board, this device do not support AI mode, but when do the regmap sync, regmap will sync 3 byte data to register 1, logically this means write first data to register 1, write second data to register 2, write third data to register 3. But this device do not support AI mode, finally, these three data write only into register 1 one by one. the reault is the value of register 1 alway equal to the latest data, here is the third data, no operation happened on register 2 and register 3. This is not what we expect. Fixes: 49427232764d ("gpio: pca953x: Perform basic regmap conversion") Signed-off-by: Haibo Chen Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin --- drivers/gpio/gpio-pca953x.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index 54da66d02b0e..317f54f19477 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c @@ -379,6 +379,9 @@ static const struct regmap_config pca953x_i2c_regmap = { .reg_bits = 8, .val_bits = 8, + .use_single_read = true, + .use_single_write = true, + .readable_reg = pca953x_readable_register, .writeable_reg = pca953x_writeable_register, .volatile_reg = pca953x_volatile_register, -- 2.35.1