Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753467AbbGIQ0F (ORCPT ); Thu, 9 Jul 2015 12:26:05 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:34967 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751125AbbGIQZy (ORCPT ); Thu, 9 Jul 2015 12:25:54 -0400 MIME-Version: 1.0 In-Reply-To: <20150709151429.6daf8fcb@bbrezillon> References: <1436281613-899-1-git-send-email-lee.jones@linaro.org> <20150709083041.3b203eb1@bbrezillon> <20150709115158.GA3445@x1> <20150709151429.6daf8fcb@bbrezillon> Date: Thu, 9 Jul 2015 09:25:53 -0700 Message-ID: Subject: Re: [PATCH v2 0/9] regulator: pwm-regulator: Introduce continuous-mode From: Doug Anderson To: Boris Brezillon Cc: Lee Jones , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "broonie@kernel.org" , kernel@stlinux.com, Liam Girdwood , =?UTF-8?Q?Heiko_St=C3=BCbner?= 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: 2217 Lines: 52 Hi, On Thu, Jul 9, 2015 at 6:14 AM, Boris Brezillon wrote: >> If you wish to add a 3rd mode, then I'm sure Mark will accept >> submissions, but I think what you are suggesting would be pretty >> complex and out-of-scope of what this patch-set is trying to achieve. > > Okay, still don't get the need to add a new mode which is almost doing > the same thing when we could have implemented it in a generic way in the > first place. But if your version has already been accepted then I think > I'll have to propose a new mode :-/. > >> >> As a side note, then if the voltage isn't directly proportional to the >> duty cycle on a large scale i.e. max => min, then it will not likely >> be very accurate between say table entries 1 => 2, or 4 => 5, etc. >> >> What I suggest you do in your case is provide a larger table with all >> of the values you find interesting, as it sounds like your PWM >> regulator isn't doing what one would normally expect. > > Well, I do not exactly agree here. Yes if you want to have a precise > mapping you'll have to add more entries in your voltage table, but > using linear interpolation between two points can be precise enough on > some ranges and prevent one to define a complete voltage table in the > DT. > > Doug, could give more details about the regulator used on the veyron > board ? There's no need for a new mode as far as veyron is concerned. The pwm regulator on veyron (as far as I understand it) acts the way that Lee describes. Try doing the math on the values in the table and you should see that it's as linear as it can be while still using integral duty cycles. Originally I only suggested using "linear interpolation" because: * It meant no bindings change, which is always nice to avoid. * It meant that old devices got this new mode, which is probably the right thing anyway (I think). Maybe nobody has published DTS files with pwm-regulator, so the point is moot. -Doug -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/