From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matti Vaittinen Subject: Re: [PATCH 8/9] regulator: bd71837: BD71837 PMIC regulator driver Date: Fri, 25 May 2018 08:08:25 +0300 Message-ID: <20180525050825.GA16888@localhost.localdomain> References: <20180524060036.GI4249@localhost.localdomain> <20180524141427.GU4828@sirena.org.uk> <042F8805D2046347BB8420BEAE397A4016C06B60@WILL-MAIL002.REu.RohmEu.com> <20180524175940.GC4828@sirena.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20180524175940.GC4828@sirena.org.uk> Sender: linux-kernel-owner@vger.kernel.org To: Mark Brown Cc: "Vaittinen, Matti" , "mturquette@baylibre.com" , "sboyd@kernel.org" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "lee.jones@linaro.org" , "lgirdwood@gmail.com" , "mazziesaccount@gmail.com" , "linux-clk@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Mutanen, Mikko" , "Haikola, Heikki" List-Id: devicetree@vger.kernel.org On Thu, May 24, 2018 at 06:59:40PM +0100, Mark Brown wrote: > On Thu, May 24, 2018 at 05:51:27PM +0000, Vaittinen, Matti wrote: > > > > what is the lock doing and what is this wrapper function intended to do? > > > This was the other spot which I was unsure how to handle. Datasheet for > > the chip says that if voltage is to be changed, the regulator must be > > disabled. Thus my voltage changing function checks if regulator is enabled > > Ugh, this chip is not very good is it? I am not the correct guy to judge that as I don't have too wide experience on PMICs. (This is first PMIC I have been working with). Probably this chip has some other advantages and is thus used. > Don't bounce the supply to > change the voltage silently, that's clearly a bad idea - the devices > using the supply are going to get very upset when the power gets removed > just because they changed the voltage. Instead implement a custom set > operation that returns an error if the user attempts to change the > voltage while the regualtor is enabled. Makes perfect sense. I will change the operation to this. Br, Matti Vaittinen