Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754044AbdGCPdt (ORCPT ); Mon, 3 Jul 2017 11:33:49 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:37209 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753367AbdGCPdr (ORCPT ); Mon, 3 Jul 2017 11:33:47 -0400 MIME-Version: 1.0 In-Reply-To: <20170703151133.su3uqfyimtl5vzvs@sirena.org.uk> References: <20170630104121.rf5nrf3aaqgvmktu@sirena.org.uk> <20170630121451.f2voycbmnstjpugt@sirena.org.uk> <893DB1C48C3CC746A3B52DEDE0D5BE951EB50C97@IRSMSX101.ger.corp.intel.com> <20170703151133.su3uqfyimtl5vzvs@sirena.org.uk> From: Waldemar Rymarkiewicz Date: Mon, 3 Jul 2017 17:33:03 +0200 Message-ID: Subject: Re: Where to update regulator register with initial voltage set by HW To: Mark Brown Cc: "Bartholomae, Thomas" , "linux-kernel@vger.kernel.org" , Liam Girdwood Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1184 Lines: 25 On 3 July 2017 at 17:11, Mark Brown wrote: > On Fri, Jun 30, 2017 at 12:26:52PM +0000, Bartholomae, Thomas wrote: >> Hi Mark, > >> The problem is that our used regulator TPS65273V from TI do not have >> the possibility to read the current voltage defined by the HW, means >> by the circuit of the regulator. In this case the register holding >> the voltage to be set later by software has a reset value which is >> normally the min value the regulator can support. This value can be >> out of the range of the supported rail. Therefore before the regulator >> gets registered this register needs to be set with a 'good' value. I >> assume the only practicable solution will be that we initialize this >> voltage register in the boot code where we also set the CPU frequency. > > You probably need platform data to tell the kernelw hat teh startup > value is. I've asked also on TI forum if this is typical to the regulator not to determine the startup voltage but still waiting for feedback. Anyway, if this is the case I guess a driver is a good place to update register before we register to the regulator framework. Thanks Mark for your feedback. /Waldek