Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp486013imn; Wed, 27 Jul 2022 11:32:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tzgNQiA3QmuzRwy7CPnlDu87BBBxfcUSG4zFJHvm7o3ypjNPQqohvOogAK9TR50drJ3rfw X-Received: by 2002:a05:6402:5212:b0:43a:ad74:b336 with SMTP id s18-20020a056402521200b0043aad74b336mr24328680edd.16.1658946724288; Wed, 27 Jul 2022 11:32:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658946724; cv=none; d=google.com; s=arc-20160816; b=q4YpwMZsBFwvxLrBY8VzxQwZWL9NRG+AaNvy46mUToAGYwKI53l2UwzUcJ3p8FS3FM qCOQlaJC0Kw1KfoaR1y2w9EQuw18CS+tvpFbC57ulbZ/I7Gk10Zj2LUeNfpaRbNGaWhq idsM57eQitj8APy2yzq3B2TSKTDkvC4I9PxwYkHE8iuJNQsZkjhHGUnMy3NX0cvZVI9w rry/PCAn0umrEULYcOcXtrHEVgdv4YwuwPOk3mmD8e8gdNx9pqKi8CNjE6UYtjDPcesP g0rAnU5nPtjWXimc7eicOweN+No94sMNHezZ1/vz9lnonVVBqhF20vBZXEgsZ7f2NToV Q7AA== 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=K3Ym+UtQsCEyQrkPNALHv2+JA79xqnuPUTjg6rsBPlc=; b=A5MHsZ65NK7FLzBvnj/G61m9Pas/YEsq7Bk25LO7HgtfY87zdw+1nawzn++IkfpHd9 HMgpBEcyy1ZMp4R8M+kpQnV9YWweCSP/sv6a/c9yg3VoDU1SbJf264uaAP21ZCNpzqLf /gBl1lZ7jxgMneR5KNyX5ZHrum/HbQcGaxirS5UXLyyeZ5NSgrTXXymYaA0VAPzHmfSc ft/Wgi53bVLug2jnbY25gj7f+fHEnssEBWyWIxh2JN6ith9Thvo7D4EeUyh2zk6DKM4T Mlv1luE7Vfl1TJ/tscsWJUeiwwlyCq7E1L39u9JP6cWLY+8aUpZX6Kq57QwBxE6DwVUK Kexg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tsWSOJtV; 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-20020aa7c383000000b0043bb9f01aaesi17976393edq.335.2022.07.27.11.31.39; Wed, 27 Jul 2022 11:32:04 -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=tsWSOJtV; 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 S239982AbiG0RSA (ORCPT + 99 others); Wed, 27 Jul 2022 13:18:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233394AbiG0RRN (ORCPT ); Wed, 27 Jul 2022 13:17:13 -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 6BB7A78DD9; Wed, 27 Jul 2022 09:43:21 -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 9C152601C3; Wed, 27 Jul 2022 16:43:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3378C433C1; Wed, 27 Jul 2022 16:43:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658940200; bh=eud4DlPytkXEZKbDVsexOqCQ7QIhHImI570wrqSzK54=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tsWSOJtVdYaRtjRMaEnOD9sEyakXXBDlRJ9IpQvgC1QFMr/I04hj654rTgzKREVil U1G/O9Zvjfl5EIOfONaCnD4/3L5ufx7ygDqaEpfqr8qfmWSPIQCstJoOqm93WY58fL y70AarN2zpgKoHCRmoanMYeTeRpDzIuPvo2i/V8k= 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.15 109/201] gpio: pca953x: only use single read/write for No AI mode Date: Wed, 27 Jul 2022 18:10:13 +0200 Message-Id: <20220727161032.282415792@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220727161026.977588183@linuxfoundation.org> References: <20220727161026.977588183@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 33683295a0bf..f334c8556a22 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c @@ -351,6 +351,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