Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1312586ybx; Thu, 7 Nov 2019 10:13:15 -0800 (PST) X-Google-Smtp-Source: APXvYqzxghYK9qwxb5bPS75jKAgeNSp2i9VKWRZtyMWc7U7t/M7VBUzxHgzmE46GpN6X2wDaM+ol X-Received: by 2002:a17:906:4910:: with SMTP id b16mr4381954ejq.133.1573150394982; Thu, 07 Nov 2019 10:13:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573150394; cv=none; d=google.com; s=arc-20160816; b=ZSuspXsbkiZZNMsPkIVJYO+iyF+x2zvJuAK5nXoD84Jqje24JYOofhdEfLPnqlpyc4 qyYcXlCfEBZ3quQ9Q5oJX6nDLILIasOQ+YtTS/pdb5bS3Z9UeW5KBa4UlDpHB+QENWQg lctARSsfJ4hzpiaYeQKhhQHWxVD5wD63jrvXBLz6FV0vSdgLbkcO1MA/wWPFbsazN+dZ 0A/KURQXGZkZz/XiJYZXH8e/JivaY2grIRdUFcZPI8vrc21fzfS0Scri/DGjsbAcc2nq bY2lk/dvE2nhr4CTbwQ7fi0GwGW15lbUH5dXyDZwLxQ26sibVL6a+UgHt0F5WcauTx6M d/GQ== 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; bh=wlYx0jYIMA60CF4+HfsceKorAaRJb8L+ckAK3oldZp4=; b=qDSNoPhwKflFh5zikb6B7grKc5Xq2dcrMDdQRc1bJ+SFe/LW2wUrhiUufWRoquYDlN 6Ou3q/eMtN+BtLSFFM6jFwCLbV9N7ur5YmWF01mAcT/Qe/Nj8h/OdgzizBU5l0pAoKlb JKTAeCIbxyxNnRVliPLpffY8moaDAZbdsDdL1G96tWFjuW4m8lG38CJsb38x9ZCnKbGy UJnp37srO6YQbTvHFX/Z82t129mj3k3ZtTa8hKI2wS5mtcW3R/MmOI3mo7AkBzbidxDo FecvN/jBu6APjMCjEQraGs0MndOrArP+fXgcgPzUw1qsKC4GkmQmDISgyOuYczQn/TEH xdsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gerhold.net header.s=strato-dkim-0002 header.b="Q+i+RF/W"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z65si2604158ede.388.2019.11.07.10.12.51; Thu, 07 Nov 2019 10:13:14 -0800 (PST) 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=@gerhold.net header.s=strato-dkim-0002 header.b="Q+i+RF/W"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727879AbfKGSMH (ORCPT + 99 others); Thu, 7 Nov 2019 13:12:07 -0500 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.50]:32539 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725710AbfKGSMH (ORCPT ); Thu, 7 Nov 2019 13:12:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1573150325; s=strato-dkim-0002; d=gerhold.net; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=wlYx0jYIMA60CF4+HfsceKorAaRJb8L+ckAK3oldZp4=; b=Q+i+RF/W1DmjZLSFNL2y/Us5oLQemnoWRUGRohti3x59yv/RlRz65WwiP2GH94Lwu8 rkh/hO+nBSNhyKEKdZxR4/Z75jl4Z02dV8m51/V2luI/mwhrkkip8UIGWiD74OXXXDJN jbIMe7kqrdAezzrZglbh0tAhpEzoAheScQxSDj67kLDNpZ5K3YGDkmqXzg629qA26GrG pYYcNssYQPYhaFu2lI+FK7TNvAu5x6sOVD4DZMRqrLKpvrlhmxlLCyFNEyGFgXZ5p6zJ oQl6WZGiUl8jnd2kK+40TKSWH0jJL67rZbMSXV8w95LqlQ/ZlJed0QaX1DPhzSIlxnKF r2Cg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQ/OcYgojyw4j34+u266EZF6ORJDd+zEsL6f" X-RZG-CLASS-ID: mo00 Received: from gerhold.net by smtp.strato.de (RZmta 44.29.0 AUTH) with ESMTPSA id e07688vA7IC3oLV (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Thu, 7 Nov 2019 19:12:03 +0100 (CET) Date: Thu, 7 Nov 2019 19:12:00 +0100 From: Stephan Gerhold To: Jean-Baptiste Maneyrol Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland , Linus Walleij , Brian Masney , Jonathan Marek , "linux-iio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 2/2] iio: imu: mpu6050: Add support for vdd-supply regulator Message-ID: <20191107181140.GA908@gerhold.net> References: <20191106183536.123070-1-stephan@gerhold.net> <20191106183536.123070-2-stephan@gerhold.net> <20191106213359.GA130672@gerhold.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 07, 2019 at 01:29:33PM +0000, Jean-Baptiste Maneyrol wrote: > Hi Stephan, > > I think the regulator_bulk usage is good, and the core_enable/disable_regulator functions implemented the way you did is perfect for the init/shutdown phase. > > We just need to change the suspend/resume implementation to use something different. As far as I can tell, the regulator bulk API is designed to be used when you want to enable/disable multiple regulators at the same time. It does not really allow controlling one of its regulators separately (in a clean way). E.g. if you would use regulator_bulk_disable() but already disabled one of the regulators at some point earlier, you would run into a warning because the regulator is disabled twice. My updated patch is still clean enough (in my opinion), so I would say it is better to avoid the regulator bulk API for this situation. I will send v2 shortly. Thanks, Stephan