Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3056280imm; Thu, 24 May 2018 22:09:07 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqCCBE8H7JZf0REybXREKpD6Mf26k5p2D+CiKagTXe9pFuT94tY7bx///4ilTSa8NTtq71A X-Received: by 2002:a63:41c4:: with SMTP id o187-v6mr762564pga.7.1527224947544; Thu, 24 May 2018 22:09:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527224947; cv=none; d=google.com; s=arc-20160816; b=JXilXB2IAW5FrKGbo6uUVQxYnn2jtmRe+Urhjnn1YT8L5jf1Bc6T02YjKCPNGmArJ6 H2/bbgH7XbvVW/mXBPQuvIH3velpscJVQa7qN2/47hZQ9szEdusUV2m5MjbfkvYRMAm4 g4j46tdUttTrDUWLNoZ8PT9S5vuTgHbw0isHGQ3gUuNS2Fybyt8ZT/yB8tJnU487GD7o VULAHFRNZ8oF1YR/SuBNtq1hgujb2e1oVcMo+O/crqQTDviaELdBJHwkwn/CkEcD4EWT Gfpgeuy+yUujye5MC1Nv1qNwJFd9uWhM0uDFIPUFVkyaFd5aComX472PCtmD75H0HL+a uojQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature:arc-authentication-results; bh=Yw+RFdgZ4dPai4Q3KVNStof9BQz9BYPDZGjIh1+2yi8=; b=FshRpFiBCW5S60g+D1Arq18G2LmqSZVHBb4AtO9Ms1c5mtnNMGiUbncnZhA2/jWEwr nmxNsfamsELfNo5jpn2G9oLHSPPulflfi+f7RLVk+9eyoy3f1K35gkbi5amRhMxX+v3O WU+MffD4hQBuBejTA+hydEKd3VlJpEFquAsNgIDnxFwaaTLK9q7PZ0OrbpAdyLJY43EM MOASRZVToFgjKHc1EXslNN4UlLHAn7xjVtILX3yTCatAQZVtbQHc4/niQFIBhUTWmyE0 ZlhxpISubpFFvXMRn8j3jg2FazDCpix6saEZ/JABSJRu0argaSK0kVHK5jZPZLLW/9PA R2cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Zz9qDpSw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t5-v6si22902159plo.113.2018.05.24.22.08.51; Thu, 24 May 2018 22:09:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Zz9qDpSw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935172AbeEYFIl (ORCPT + 99 others); Fri, 25 May 2018 01:08:41 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:39709 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751968AbeEYFIi (ORCPT ); Fri, 25 May 2018 01:08:38 -0400 Received: by mail-wm0-f43.google.com with SMTP id f8-v6so11041205wmc.4; Thu, 24 May 2018 22:08:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Yw+RFdgZ4dPai4Q3KVNStof9BQz9BYPDZGjIh1+2yi8=; b=Zz9qDpSw1YCdR76WBXqGemanG1+fLbOUhYXMZRwRk0UJuUBASC0e/tOZeFlshybTrY QxZOvIyqvAbXu+9DhxPGDrJBqP5xXjRO+N5akxaegT/8j7SzHSfR36PoI+7kPf1Gtple j9I6IB/BWexzKWTHjVQfYzAUG8+ZZc4dGPVpWMpyIsV/OLXE3XOfDMuOR6IRQqHyOuSb GpaY3LHYjsCTSTYA6oRZ3ma+m7lxzWf3tU/d9SixJyyfUHXy94Py2gIT3cFU5NlD4BF3 AolLe9P+oiSF3aJk//o2W1nrGkw7LRSgfITcsl8fa4cg036S/Zq35zSNoBp86mjxUvgx yoBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Yw+RFdgZ4dPai4Q3KVNStof9BQz9BYPDZGjIh1+2yi8=; b=LlAwIRA66oeXeQADDTYEQ9jltlBqKvZ1nB8Q212H2A4dXi6gxLoWE3v6dpx2XjPbG8 3Yd8NE6zJh7vnDRJFju5uOznsj3nKlcQFHt3YgFfYWu2LEh6rwahxjSIFaGeqmEvWC8r a0WCWisHEFV6w9PCkbIoheuUVVjKfDYQfjzDvOS/xmlHClnjSaDpToh5h10hmTL5klpn PTAGVYeDVepWq3CqeARfkQa2bp30O4Vzu2k+B4vr/9GKzfTfSTcWOZCNVQC+WHObGXUB holktZw2qf/sL+nyzNn4ru23HosDR2l7fey4IO33A+PmaLrTF9JLsAyGNKxSymdAUCEP Nh4Q== X-Gm-Message-State: ALKqPwcIPeciyMwqEdCKWwFFQ2uOk2e3J3XevwHfp9To+jGtME5u7fAi 1ArMh1EBthADfq3F4j49frI= X-Received: by 2002:a2e:9d41:: with SMTP id y1-v6mr465024ljj.112.1527224916550; Thu, 24 May 2018 22:08:36 -0700 (PDT) Received: from localhost.localdomain ([213.255.186.34]) by smtp.gmail.com with ESMTPSA id q78-v6sm3069274lfg.66.2018.05.24.22.08.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 May 2018 22:08:35 -0700 (PDT) From: Matti Vaittinen X-Google-Original-From: Matti Vaittinen Date: Fri, 25 May 2018 08:08:25 +0300 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" Subject: Re: [PATCH 8/9] regulator: bd71837: BD71837 PMIC regulator driver 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 Content-Disposition: inline In-Reply-To: <20180524175940.GC4828@sirena.org.uk> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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