Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5761780ybp; Tue, 8 Oct 2019 07:57:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqyy8ebKwBUYalEgcEp6SjEo9adMxA/zG5D7lIVR82dLq/5+swmh+miqot3nQLcFeWvhgnuz X-Received: by 2002:a50:8961:: with SMTP id f30mr33555347edf.144.1570546635857; Tue, 08 Oct 2019 07:57:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570546635; cv=none; d=google.com; s=arc-20160816; b=bqFF6gmUy1SySRxbeepZasxAwUpud5wl+M1KYdT5Tj+/TMAKR7m/kNrowY0bhNeM3l QMxFEypVjgW83Lm9+pjgJ2AXSPyt8ndvuRvSlE9TpkZ7bvF0Zi8mYH02Q3RiZdqK400y sDBFBKOaf/p8KqQR805G6u3Gcw7DRPC3l4oRzucgN8pNeTtRG0yj954zLsIyJXNZOR1D 5E9SRKNRRchMHr8sfFH/UfYe0BE449y0VA04l6PIvNCTDDkuwmzJTAc407Q/FiTCk7LN v+IZW5LPn2e5WAhWe/BcODd0GT043jY+yShmbFKn6kkdsw0B4KSD1l5Rw7NA7IBgOWUY Tf4Q== 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; bh=MKYwwEQN1YfnxbMeMrMKUx5aOh4wn8i3AszuaEAPATA=; b=u3jEikWqrrNADwVSDddgQI9/gQO3oAUCB2fdOqvFYCRWFbwj2W8PAG4gPQVctgxfQ0 T2DL6rk+Ofi/p6+XWkrE+5LGflbdM+H2Zda1Iuk26HtvnmPkz+wto2xWsVRxsbPW2ef4 Gp2MbfFV8bd9kNmx184accRhiRplF/hzi+Q2gCSTEfIjvvXopg0d491ms62Bo9FH5/4X GaadZ8FBjaQocFfHfh15aBspKRMc3z45XTJXJ7lYV+imynouh/2ollDuKftwfezfA2hb slYtybTKpo2IuUMWLFYCw4JRAOCzdqxCuyWj0SX1eZc8owMg+RTOZ2PAmfzMuiRXbgx6 U+PA== ARC-Authentication-Results: i=1; mx.google.com; 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 l15si9006905eja.290.2019.10.08.07.56.52; Tue, 08 Oct 2019 07:57:15 -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; 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 S1727224AbfJHO4M (ORCPT + 99 others); Tue, 8 Oct 2019 10:56:12 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:52907 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726057AbfJHO4M (ORCPT ); Tue, 8 Oct 2019 10:56:12 -0400 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iHquF-0002ZH-Fw; Tue, 08 Oct 2019 16:56:07 +0200 Received: from mfe by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1iHquD-0002Ek-S7; Tue, 08 Oct 2019 16:56:05 +0200 Date: Tue, 8 Oct 2019 16:56:05 +0200 From: Marco Felsch To: Mark Brown Cc: Doug Anderson , Chunyan Zhang , Liam Girdwood , ckeepax@opensource.cirrus.com, LKML , Sascha Hauer Subject: Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage Message-ID: <20191008145605.5yf4hura7qu4fuyg@pengutronix.de> References: <20190923184907.GY2036@sirena.org.uk> <20190924182758.GC2036@sirena.org.uk> <20190927084710.mt42454vsrjm3yh3@pengutronix.de> <20191007093429.qekysnxufvkbirit@pengutronix.de> <20191007182907.GB5614@sirena.co.uk> <20191008060311.3ukim22vv7ywmlhs@pengutronix.de> <20191008125140.GK4382@sirena.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191008125140.GK4382@sirena.co.uk> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 16:52:19 up 143 days, 21:10, 96 users, load average: 0.04, 0.07, 0.02 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19-10-08 13:51, Mark Brown wrote: > On Tue, Oct 08, 2019 at 08:03:11AM +0200, Marco Felsch wrote: > > On 19-10-07 19:29, Mark Brown wrote: > > > On Mon, Oct 07, 2019 at 11:34:29AM +0200, Marco Felsch wrote: > > > > > Sorry that won't fix my problem. If I drop the regulator-boot-on state > > > > the fixed-regulator will disable this regulator but disable/enable this > > > > regulator is only valid during suspend/resume. I don't say that my fix > > > > is correct but we should fix this. > > > > I'm having a bit of trouble parsing this but it sounds like you want the > > > regulator to be always on in which case you should use the property > > > specifically for that. > > > Sorry my english wasn't the best.. Imagine this case: The bootloader > > turned the display on to show an early bootlogo. Now if I miss the > > regulator-boot-on property the display is turned off and on. The turn > > off comes from the regulator probe, the turn on comes from the cosumer. > > Is that assumption correct? > > No, we shouldn't do anything when the regulator probes - we'll only > disable unused regulators when we get to the end of boot (currently we > delay this by 30s to give userspace a chance to run, that's a hack but > we're fresh out of better ideas). During boot the regulator state will > only be changed if some consumer appears and changes the state. Okay, so this won't disable the regualtor? 8<---------------------------------------------------------------- static int reg_fixed_voltage_probe(struct platform_device *pdev) { ... if (config->enabled_at_boot) gflags = GPIOD_OUT_HIGH; else gflags = GPIOD_OUT_LOW; ... } 8<---------------------------------------------------------------- Regards, Marco