Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp87361ybx; Wed, 6 Nov 2019 13:39:58 -0800 (PST) X-Google-Smtp-Source: APXvYqyIfsn7M2p98mOWxJRMuxZaO+Hd8DrA52Vm1fJCfeWrewKWua8pizpeymLVrrJGm895qnnu X-Received: by 2002:a17:906:494d:: with SMTP id f13mr3812026ejt.250.1573076398773; Wed, 06 Nov 2019 13:39:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573076398; cv=none; d=google.com; s=arc-20160816; b=B5kAfdybBrgtDKJx6SF5VWHvvw4m6GeLuL4pmrTBEKIyJhIyi0TanxY/3/CP7UYhCY 49/YyOU3MwWTvvje7EGRA8zIMcJSnMfS4NVUMhk4S6mtPR1Z1cUiAR0imqEzYK+q1yVv DM6FFVbKPDaOliRMLxsG8IMEbEDFLBtSdqXb0sIOAbZCbdkU+7uICgsK2oSTbuxCF/PG omm2TVf8StZ4jdJiNPegZ5J406HZytVctYHz06Gz4BWaZzBpL4eXKy5K2M1aC2rm5YXW DKg43RqLtILrbxg8iVH9oK174+PLRf9IdhIetCs9BXsd3ZWcFZi4Mjx/3kTX3RdO/ZUz 9cuw== 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=gSa0ioulMx/V4tV8aaGPUTKbe/GC25k6evW5ZAAORck=; b=auwkzaTqhpd2lDV9CPmqjShP/mh1ZCFuJQeDx1xGck6eijePGIBalpyYqoY5WBbAtC RrWOno/cm/c+dbjTspKJm87Ye3h8vucHRLpKyUCJuhN7hGzqRVrm37+e3nZG/8ip8meu VdjPxwMyl6+FkCt0lC98UMWIEAYdMQ2oov94NtOpSvgGoplrfI69ji5TS+tgZ5XZMp72 BEiqnM57k9WmPLZJbS/IbDfxZuuu3uAX3BSdbCWdvvC64IxfPLhDjuZLrzB2e5m5qHWb F3Xa7aMDip3P0YMe2yiwV066gyMRpX884+Gg4pRc5c+eE5yrwGxQGK2HY7+4AD9OL7Dn pDMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gerhold.net header.s=strato-dkim-0002 header.b=DyaHHUXK; 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 y56si13202586edd.275.2019.11.06.13.39.34; Wed, 06 Nov 2019 13:39:58 -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=DyaHHUXK; 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 S1728077AbfKFVg0 (ORCPT + 99 others); Wed, 6 Nov 2019 16:36:26 -0500 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.52]:19014 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726779AbfKFVg0 (ORCPT ); Wed, 6 Nov 2019 16:36:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1573076182; 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=gSa0ioulMx/V4tV8aaGPUTKbe/GC25k6evW5ZAAORck=; b=DyaHHUXK8uFvd/lUExHP2ldvY5VhA8A/RhcuN7af9HB/zCLwhxxsbD733sHnyx/J8C nT6dnFw5PKLaC690Xxk60QKOgNA2Ur+xPxILn0q/RcsBxlRkkZqm1ZOAeB9E4rFsU1Mp P56wiQdpm1xgmctEdFZQp1GGsXY8YnL+viEVK9B9sFJ1ly1MkySw/9n93p2ZmS5gaR5V fX3THtuB3LoAl9CdApZXwPXZTqKCoiBg680bxotmbUK1ZDah/eGRLqNSLX26X49EK35u 4AeDgJZ7HBqVOHVOZJU+TXCOyeeELh2CV7+pQNGm7699YzYfSdaS8zc0rSV9IoeMsqzG LlOQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQ/OcYgojyw4j34+u266EZF6ORJAS+MtXUdD" X-RZG-CLASS-ID: mo00 Received: from gerhold.net by smtp.strato.de (RZmta 44.29.0 AUTH) with ESMTPSA id e07688vA6LaJiDR (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); Wed, 6 Nov 2019 22:36:19 +0100 (CET) Date: Wed, 6 Nov 2019 22:36:16 +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: <20191106213359.GA130672@gerhold.net> References: <20191106183536.123070-1-stephan@gerhold.net> <20191106183536.123070-2-stephan@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 Hi JB, On Wed, Nov 06, 2019 at 07:55:20PM +0000, Jean-Baptiste Maneyrol wrote: > Hello Stephan, > > nice patch but I have an important concern. > > We are calling the core_enable/disable_regulator functions when going into suspend and resume. > With your changes, we are going to power down the chip when going into suspend and then power it up again. > This way we will loose all already set configuration, like FSR, sampling rate, init values, ... > The chip will not be able to work correctly anymore after a suspend-resume cycle. > > You need to change the resume/suspend handlers to only disable/enable the vddio regulator, not the vdd one. That is a good point, thanks! I guess we are not able to use the regulator bulk API in this case... I will send a v2 soon. Stephan