From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Cameron Subject: Re: [PATCH v2 2/2] dt-bindings: iio: dac: Add docs for AD5758 DAC Date: Sat, 16 Jun 2018 18:49:07 +0100 Message-ID: <20180616184907.5831c24a@archlinux> References: <1528377065-647-1-git-send-email-stefan.popa@analog.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Linus Walleij Cc: Stefan Popa , Michael Hennerich , Lars-Peter Clausen , Hartmut Knaack , Peter Meerwald , Rob Herring , Mark Rutland , Mauro Carvalho Chehab , "David S. Miller" , Greg KH , Andrew Morton , Randy Dunlap , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-iio@vger.kernel.org, "linux-kernel@vger.kernel.org" List-Id: devicetree@vger.kernel.org On Mon, 11 Jun 2018 10:42:35 +0200 Linus Walleij wrote: > On Thu, Jun 7, 2018 at 3:11 PM, Stefan Popa wrote: > > > + - adi,slew: Array of slewrate settings should contain 3 fields: > > + 1: Should be either 0 or 1 in order to enable or disable slewrate. > > We have a standard binding in pin control for "slew-rate". > > It doesn't have a unit today though. > > > + 2: Slew rate clock: > > + Valid values for the slew rate update frequency [Hz]: > > + * 240000 > > + * 200000 > > + * 150000 > > + * 128000 > > + * 64000 > > + * 32000 > > + * 16000 > > + * 8000 > > + * 4000 > > + * 2000 > > + * 1000 > > + * 512 > > + * 256 > > + * 128 > > + * 64 > > + * 16 > > + 3: Slew rate step: > > + Defines by how much the output value changes at each update. > > + Valid values for the step size LSBs: > > + * 4 > > + * 12 > > + * 64 > > + * 120 > > + * 256 > > + * 500 > > + * 1820 > > + * 2048 > > This is pretty idiomatic and just encodes the configuration fields from the > hardware into the device tree. > > The normal slew rate unit is Volts per microsecond. > > I get the feeling that we could define that simply, and then calculate > the slew rate clock and step using that to find the best match for > a certain slew rate. > > Yours, > Linus Walleij Agreed. A single value would be nice if possible. J