Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2944387imm; Thu, 24 May 2018 19:36:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp4YXs1xjTpHG7f2i+RJ7/fEN1/554nd7eNDuOsoNNA5qjfFQHO2yUf2ruExaCW/hvNi9C2 X-Received: by 2002:a65:53c9:: with SMTP id z9-v6mr462026pgr.356.1527215783851; Thu, 24 May 2018 19:36:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527215783; cv=none; d=google.com; s=arc-20160816; b=nFOUSPwbasikXC3nepB0EQeoWBncSJYdmgSZzNAOEu5kPAT0dwy37e26qCJ4WaIXhC diNHh3T6p3Ael6/Npi+wIV/SgVwlME5oveNbhVngXaOuGbDzN3BYdjMgaRtS9sbZiSMx USUZ+sOC97jzbZCIxUPaY5tSYe4WEr+Q6LCTeOKx13ZPaOI314eYudYaeWkxDQtEhUX3 k9n/ML0kxu8l31jZjVwvWpiNT+yfnWpnS+5tVw9fcPF50KCHTK+l0o4XWLqi+fjSDZGR R7fLaRxIfNhyjPiX3mdSgoAPbP9wSFUXEYbYTEtHcaZwmhmKx2F5F6b0AaYGMKjavykJ lgiA== 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:from:date:dkim-signature:arc-authentication-results; bh=i35l9cdSKuiFhoNhQAiyZ1kvuf9+w8XKfTdEEe8N3A8=; b=gWjXfMmeYud14TQULMcJr+5JEc0GY8FIkSoC5wSHwtf2XwVgIRWIxUG2i7tClcTaBA lLNaZ+bpCe3BQfCRTr1GfJ1Uc8xujOJazCIj4bxDGOtLV8uSDuW+aurTizA6EIELeoLx 0uisy0K4tmn0Xpg5KN9Hpk9PKFlk63ijf2corrbs3ADw2oFqf4aE7GeO9pD9kvBiQ1sw Hl6FvCahEfZ/tP5HuuHAcSLGA0v3TpWJGI/29ix4t11OHISl6YyPOrVGEJhnzS5q69JM EEfxI89mq4IM+/y+OQ2NzouGjgFtrtvr14PBfrSYUpAF7pBFM0ZfS6VZFLqekDMSflr3 ZqAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=FE7EaNWk; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t8-v6si22414715pfl.344.2018.05.24.19.36.09; Thu, 24 May 2018 19:36:23 -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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=FE7EaNWk; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032569AbeEXR7s (ORCPT + 99 others); Thu, 24 May 2018 13:59:48 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:44006 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030352AbeEXR7o (ORCPT ); Thu, 24 May 2018 13:59:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=i35l9cdSKuiFhoNhQAiyZ1kvuf9+w8XKfTdEEe8N3A8=; b=FE7EaNWkxeytRmymo+0jUwWYi MRjaL/12QvxjhizibR/ll993+LAeU6f0zuUAG2TDlvqF6cOY2IKD7jvzzNGvAtevZd3VtX/UIljwg eV4CJZCZvVNRpYH+F5Vq442OmDzahI1VbmW7fQUMOoJnk+AigeDeOwjDlR3kUEP1h5Gl4=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fLuWb-0006IY-98; Thu, 24 May 2018 17:59:41 +0000 Received: from broonie by debutante with local (Exim 4.91) (envelope-from ) id 1fLuWa-0005jW-S5; Thu, 24 May 2018 18:59:40 +0100 Date: Thu, 24 May 2018 18:59:40 +0100 From: Mark Brown To: "Vaittinen, Matti" Cc: "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: <20180524175940.GC4828@sirena.org.uk> References: <20180524060036.GI4249@localhost.localdomain> <20180524141427.GU4828@sirena.org.uk> <042F8805D2046347BB8420BEAE397A4016C06B60@WILL-MAIL002.REu.RohmEu.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="GD+uNaHYxbVPHaQt" Content-Disposition: inline In-Reply-To: <042F8805D2046347BB8420BEAE397A4016C06B60@WILL-MAIL002.REu.RohmEu.com> X-Cookie: Excellent day to have a rotten day. User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --GD+uNaHYxbVPHaQt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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? 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. --GD+uNaHYxbVPHaQt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlsG/YwACgkQJNaLcl1U h9BXpQf/WYbuiSe8ThB/68hLWXcXe3R37BpLnhEleUsosoSpg1qIgd5EcyLZol1P 4xry9Bl24RtomPJWJhsxaYEp9sRNJOr2CZ6UDoxvFzGN9EGFlDaDFyu2Zy4QmvCl f1OtoRzlLsB4iDPdpcG1Z9nPPWwS/FV7R8fN/f5sEj0GsL+6m6fo4KL0ZGl7Awln qgNLzK3U+QvstXEW7izC9C3KGi4rNDSrJL7geZDuwYcRp8nZnRRg3LPa4Zdad+gz w+yIxJEfxdqr0M0ZcDbihsfm2j76Mn8PI+4JgolZVDfyN6iaief0ANSH2R/6kI0x aT2Mc98aWauj7tVBmCeen3QNVSt1SQ== =unJ+ -----END PGP SIGNATURE----- --GD+uNaHYxbVPHaQt--