Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp7755932ybc; Fri, 29 Nov 2019 00:31:12 -0800 (PST) X-Google-Smtp-Source: APXvYqxieJ6VnXH4cV+V1NuBnhHbYjO9gfHRKcnHcGQOm8T5z3K6Eem6JVWPaiBe/svj3X2pAejE X-Received: by 2002:a17:906:3793:: with SMTP id n19mr12057470ejc.85.1575016272174; Fri, 29 Nov 2019 00:31:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575016272; cv=none; d=google.com; s=arc-20160816; b=DI1dMNH5YkPY2IBAoBkmZOrUrYLRy8rmXBVAnHtbBH2ftR3cmZwQy/KUW8+XthHXrw P6i+pjyTgAqenr0YnptD11fHy2ulQ9VqBzNed5LPluDvlK+KAy1PiuMbrITAqxgmPb5q wtd1H6D02vbIOazX4VI6aVL4HYngFufCt0jUkqUqu94guF1rwtQn3V/ZwaAIAwKPGGS/ 4W75AI85BSXUHIy5uV0MtWTZJhBzfYH3LeLXBLN55+wpgXjq7XfvAvpKwe0ix8f95Hs5 Y3K9myqb8qzO9N8oAkElS2bXlfeuWEBWHxXWmBS9mhvsXPRaYc8T9Yq1RT+dhfykC4Se 8OKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=cWGIyDGedrBpqvnGEcfpuSqDBvTplOuqKnHOt1z2nZY=; b=hFj3VBcc4aKa/IWLxoug4G2G2MCqM3q/SNRWXiMxrF9MRQKNd5Obl6xcPWbFBzoA+9 00PYqRluYi5N+sPu4d8WxEluC9WOZKnsuibBStzLigKwZmgHMAGM6esdZeXnCcMp/Vrh HuZTJGnDmg4aGejyuiTOpmaErhDjm2ePFLJl+Xkhj4swWnZ02gq7x+Nxx7GYhmsFW5FG 8UgF7j+fulJUFnk4AV3cmIXrV1ThyN2KbO87jZWZKnQqr/ostZRfqbi/GQn40nPxcYX6 HETPgpgzY7ELc9HObFA2GFXSk/imLiFEkkMI/B1S3WA5xfTcpzCSSJl9PHP7ezLYNtkP QbTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JYgDLrUj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z40si15046454edz.114.2019.11.29.00.30.47; Fri, 29 Nov 2019 00:31:12 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=JYgDLrUj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726857AbfK2I3a (ORCPT + 99 others); Fri, 29 Nov 2019 03:29:30 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:34603 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725892AbfK2I3a (ORCPT ); Fri, 29 Nov 2019 03:29:30 -0500 Received: by mail-lj1-f195.google.com with SMTP id m6so23671423ljc.1 for ; Fri, 29 Nov 2019 00:29:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cWGIyDGedrBpqvnGEcfpuSqDBvTplOuqKnHOt1z2nZY=; b=JYgDLrUje5DKLKp+k3Oade2QQs94WUDe1/8QVxUb7fsNTk/l6626+oRlXD3e/bpqq8 3rXVOCn0W8WeVVi211CVf31RgRAvuuS0547r4rO7b8Qtqnt42ewe9w+v0yZ6ApeYS/pT AhaSF/3el3gdmRajOhieiokp6NWpp5KDmsg4Vy+O4Ndx/X8ZiUvvtr9MvUBytVXKX6nq 4lzl2ls4ows7n0x+hLyiowSg7RcF2HUUiqvfF/iFHV13scJqOdo55G8+ne3TV9wbPt7D i4KUysQTFkRwCs7GHaAge7IXW0GhQ3iI5+IFlsuloczcM77XNCDWJsEqmETJcstMZeix tDAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cWGIyDGedrBpqvnGEcfpuSqDBvTplOuqKnHOt1z2nZY=; b=fbLldQ7G0Z34nkZlnxo6Z2PZVJA3yuXPdVsoXjGW3pQaFkip1cCj6XmT01w6Fpf/pw SEq8L4U+dC83gZpq+vOXTDRvut81ZRkqGqbPdHJcLLOritDfC0ro6R0OJPyeLy6FXjiB lY4fyjn3L4ztFiLKmTIhrAqMyztUJ8e5J74MNAFia0jOMgPj8N8OjYsKXoqn9atwmi08 IMfkKNli77053/1c9IcbKc3g6XmhWZSxy/pWBSPXwQhSVsHp0OHArSNuJWkxUoYbjREa mlBDv/THQY8ZmqGtrQPGJp2NmOwxQ6lBgd92jGVipe+gb77YGQw8kI27qK7N7R2N/T2u 767g== X-Gm-Message-State: APjAAAVX5mbn/63Sijl78ZYFQkPi+8i6fbV0JZWmYl/QIRUGTSdDAhcF B62QGOe2SfEEllMpXnkJOAwYY7I9ZCmAk2ftfH0A0Q== X-Received: by 2002:a2e:9a12:: with SMTP id o18mr36798466lji.191.1575016168447; Fri, 29 Nov 2019 00:29:28 -0800 (PST) MIME-Version: 1.0 References: <20191127135932.7223-1-m.felsch@pengutronix.de> <20191127135932.7223-4-m.felsch@pengutronix.de> In-Reply-To: <20191127135932.7223-4-m.felsch@pengutronix.de> From: Linus Walleij Date: Fri, 29 Nov 2019 09:29:16 +0100 Message-ID: Subject: Re: [PATCH v2 3/5] regulator: da9062: add voltage selection gpio support To: Marco Felsch Cc: Bartosz Golaszewski , Support Opensource , Lee Jones , Rob Herring , Liam Girdwood , Mark Brown , stwiss.opensource@diasemi.com, Adam Thomson , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "linux-kernel@vger.kernel.org" , Sascha Hauer Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 27, 2019 at 2:59 PM Marco Felsch wrote: > The DA9062/1 devices can switch their regulator voltages between > voltage-A (active) and voltage-B (suspend) settings. Switching the > voltages can be controlled by ther internal state-machine or by a gpio > input signal and can be configured for each individual regulator. This > commit adds the gpio-based voltage switching support. > > Signed-off-by: Marco Felsch > --- > Changelog: > > v2: > - use new public api gpiod_to_offset() OK this is better in my opinion, at least it is a lesser evil than the hacks I've seen. > + struct reg_field vsel_gpi; Again add some comments to the code describing what this is about please. A general purpose input that can be configured such that it is not a general purpose input anymore, but instead looped back internally to control a voltage on the DA9062. Part of me wonder if these lines are really "general purpose" but I suppose software could use them. Yours, Linus Walleij