From mboxrd@z Thu Jan 1 00:00:00 1970 From: Przemyslaw Marczak Date: Wed, 05 Aug 2015 16:16:46 +0200 Subject: [U-Boot] [PATCH v2 07/19] dm: pmic: max77686: Support all BUCK regulators In-Reply-To: <1438611577-2245-8-git-send-email-sjg@chromium.org> References: <1438611577-2245-1-git-send-email-sjg@chromium.org> <1438611577-2245-8-git-send-email-sjg@chromium.org> Message-ID: <55C21ACE.2060307@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Simon, On 08/03/2015 04:19 PM, Simon Glass wrote: > Add support for all BUCK regulators, now that the correct register is > accessed for each. > > Signed-off-by: Simon Glass > --- > > Changes in v2: > - Add a comment about DVS in the driver > > drivers/power/regulator/max77686.c | 18 ++++++++++-------- > 1 file changed, 10 insertions(+), 8 deletions(-) > > diff --git a/drivers/power/regulator/max77686.c b/drivers/power/regulator/max77686.c > index 21173fc..946b87c 100644 > --- a/drivers/power/regulator/max77686.c > +++ b/drivers/power/regulator/max77686.c > @@ -81,13 +81,15 @@ static int max77686_buck_volt2hex(int buck, int uV) > /* hex = (uV - 600000) / 12500; */ > hex = (uV - MAX77686_BUCK_UV_LMIN) / MAX77686_BUCK_UV_LSTEP; > hex_max = MAX77686_BUCK234_VOLT_MAX_HEX; > - /** > - * Those use voltage scaller - temporary not implemented > - * so return just 0 > - */ > - return -ENOSYS; > + break; > default: > - /* hex = (uV - 750000) / 50000; */ > + /* > + * hex = (uV - 750000) / 50000. We assume that dynamic voltage > + * scaling via GPIOs is not enabled and don't support that. > + * If this is enabled then the driver will need to take that > + * into account anrd check different registers depending on and check > + * the current setting See the datasheet for details. setting. See ... snip ... Best regards, -- Przemyslaw Marczak Samsung R&D Institute Poland Samsung Electronics p.marczak at samsung.com