From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Subject: Re: [PATCH v2] gpio: mvebu: fix regmap_update_bits usage Date: Fri, 9 Jun 2017 13:01:25 +0200 Message-ID: <20170609130125.43b8258f@free-electrons.com> References: <20170609100917.26660-1-gregory.clement@free-electrons.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20170609100917.26660-1-gregory.clement@free-electrons.com> Sender: linux-kernel-owner@vger.kernel.org To: Gregory CLEMENT Cc: Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , linux-arm-kernel@lists.infradead.org, Chris Packham , Ralph Sennhauser List-Id: linux-gpio@vger.kernel.org Hello, On Fri, 9 Jun 2017 12:09:17 +0200, Gregory CLEMENT wrote: > In some place in the driver regmap_update_bits was misused. Indeed the > last argument is not the value of the bit (or group of bits) itself but > the mask value inside the register. > > So when setting the bit N, then the value must be BIT(N) and not 1. > > CC: Chris Packham > CC: Ralph Sennhauser > Signed-off-by: Gregory CLEMENT Reviewed-by: Thomas Petazzoni Thanks for fixing this so quickly! Best regards, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni) Date: Fri, 9 Jun 2017 13:01:25 +0200 Subject: [PATCH v2] gpio: mvebu: fix regmap_update_bits usage In-Reply-To: <20170609100917.26660-1-gregory.clement@free-electrons.com> References: <20170609100917.26660-1-gregory.clement@free-electrons.com> Message-ID: <20170609130125.43b8258f@free-electrons.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hello, On Fri, 9 Jun 2017 12:09:17 +0200, Gregory CLEMENT wrote: > In some place in the driver regmap_update_bits was misused. Indeed the > last argument is not the value of the bit (or group of bits) itself but > the mask value inside the register. > > So when setting the bit N, then the value must be BIT(N) and not 1. > > CC: Chris Packham > CC: Ralph Sennhauser > Signed-off-by: Gregory CLEMENT Reviewed-by: Thomas Petazzoni Thanks for fixing this so quickly! Best regards, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com