Received: by 10.192.165.148 with SMTP id m20csp537428imm; Wed, 25 Apr 2018 03:54:41 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+DhJvdH6Px2rmJ6N3Q/LKP7aHyrIXGNfJCHbDzoOdRrRnyYf322Dr+Lx0fvoOnYR/eqNGH X-Received: by 2002:a17:902:6d0f:: with SMTP id s15-v6mr28488129plk.241.1524653681919; Wed, 25 Apr 2018 03:54:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524653681; cv=none; d=google.com; s=arc-20160816; b=iYgCPqDdlTL7WlG5EYP9l+HiJbgbc9WByoff4Vb1WF4OtHnMy2o1+X0p2ILP05TCdO H+esX/1RvH/5AuCas0uEK8XWVK+bSN4Rmhtp2kIVgNP6cazU7jIkONJ8QqiENTuDXP7S RPm9AXZYkO+ceGWCihuzn/uFXY8LTOWP0AMr5Z/KXgZUDMPcKOBunjZMK4M59wJNkWJg tCzgNvHfd7qf97mIBXLqrpI5q36Ur0l/k2DJYDzKCNQ7xE3QTuz6wsWuFDPUybgFpJXz SzX4QnIQEuvnZ/dQf5I9fghzbu86fvbuYsdQx2L8LOo4XXISml0KozQW7wdaOyh8FXVt zSiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=YKbWh3RWmF2YAB3Wib61N5gfzNsXuQTzhsAHqzHA+Ew=; b=x6JlVfPsa15NDYepjRrxpzulF0q0JWJZJ34WfqfAydl6qd38ncIX8u1w2r8r78WYQ9 jS04BWy+1LKMO73KSyTKkO0kgEfBrL6v/Hj/aeEqmTH9rGQSFfHMF3q49biosVy/zkmz kI7SrBXTpptlyhXsxQIhQSVaM2M8TpzpLv6mXGTusPDItTb9cFFqrNhK8O5Sf10LWI8i +egvnvaQx9WSMuagIniUxWFtDVDSb9TfC8EQD7/YZRO2QKNO1WMJZOpxeG2rAU02mmpK 73zZWV1R9tcwclB00Bmm14PGP7/iLHXTq4nnRMBHHrtdEwxSmYU/YtlefTSRtrfMKzOa pSdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=NDEtBKbC; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g34-v6si15855081pld.411.2018.04.25.03.54.27; Wed, 25 Apr 2018 03:54:41 -0700 (PDT) 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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=NDEtBKbC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754220AbeDYKx2 (ORCPT + 99 others); Wed, 25 Apr 2018 06:53:28 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:44898 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753819AbeDYKxS (ORCPT ); Wed, 25 Apr 2018 06:53:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=YKbWh3RWmF2YAB3Wib61N5gfzNsXuQTzhsAHqzHA+Ew=; b=NDEtBKbCM1mY/xzGNTa3cdCiY sc+pYD1PgMKKzYrkJRlMPz5BlZ9V+B/zcSmAFn9GEGJGzdEkE9xBBP7kl5+wcKDL6ad5gO2Uj7pD6 WUbKBSSMfyYBS/LJJy0DzkdOX64ft057ru82AJjUNAgV5dX6jehHlDe2Em2bKi87vWS8w=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fBI2w-0001zo-NW; Wed, 25 Apr 2018 10:53:10 +0000 Received: from broonie by debutante with local (Exim 4.90_1) (envelope-from ) id 1fBI2v-0008TH-S9; Wed, 25 Apr 2018 11:53:09 +0100 Date: Wed, 25 Apr 2018 11:53:09 +0100 From: Mark Brown To: Icenowy Zheng Cc: linux-arm-kernel@lists.infradead.org, Ondrej Jirman , devicetree@vger.kernel.org, Maxime Ripard , linux-sunxi@googlegroups.com, Liam Girdwood , linux-kernel@vger.kernel.org, Chen-Yu Tsai , Rob Herring Subject: Re: [PATCH v3 2/3] regulator: add support for SY8106A regulator Message-ID: <20180425105309.GC24769@sirena.org.uk> References: <20180423144657.63264-1-icenowy@aosc.io> <20180423144657.63264-3-icenowy@aosc.io> <20180424170733.GD22073@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="S1BNGpv0yoYahz37" Content-Disposition: inline In-Reply-To: X-Cookie: MS-DOS must die! User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --S1BNGpv0yoYahz37 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 25, 2018 at 07:41:35AM +0800, Icenowy Zheng wrote: > =E4=BA=8E 2018=E5=B9=B44=E6=9C=8825=E6=97=A5 GMT+08:00 =E4=B8=8A=E5=8D=88= 1:07:33, Mark Brown =E5=86=99=E5=88=B0: > >On Mon, Apr 23, 2018 at 10:46:56PM +0800, Icenowy Zheng wrote: > >> --- /dev/null > >> +++ b/drivers/regulator/sy8106a-regulator.c > >> @@ -0,0 +1,176 @@ > >> +// SPDX-License-Identifier: GPL-2.0+ > >> +/* > >> + * sy8106a-regulator.c - Regulator device driver for SY8106A > >Just make the entire thing a C++ comment so it looks consistent and > >joined up. > SPDX identifier is special -- it should be in a seperated > comment block. No, it just needs to be a C++ comment on the first line to ease machine parsing. The rest of the file doesn't matter for that. > >> + if (reg & SY8106A_GO_BIT) > >> + return reg & rdev->desc->vsel_mask; > >> + else > >> + return (chip->fixed_voltage - rdev->desc->min_uV) / > >> + rdev->desc->uV_step; > >You could use the standard get_voltage_sel() if you provide a mapping > >operation that set everything with _GO_BIT set to return the fixed > >voltage. Though looking at this it seems that the fixed voltage will > >always be one that could be set via the register anyway so I'm > >wondering > >if the easiest thing here isn't to just have the driver turn off > >_GO_BIT > Do you mean "turn on" here? Yes. --S1BNGpv0yoYahz37 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlrgXhUACgkQJNaLcl1U h9Dz8Af/ShUsBEhUOo12gD3i5rTHC+B7d/vXUVvbpwkxTOs9H+bKL3erRtuIA/mO IbSgSqYjR7PqsVp6IIABDUItbRN2eFVjx/WlxfsHf2WqoXDK0CMq1b8h2I7Z9rd2 3Pg/ETgOEOcG3UG6mal2JuqEPqldetHJoaOAd/k71A4Z4fGmye2fQsHHl80sG5yw Oafndtd2xNyVBaxff0NDNPCpMYPm/SFfCik0tH5VCTAENFqnS7FKkEKJW4Iv0+6+ bObcFF1mDrCzi9rfQPoTh4s+oXyqjwTdlj6jvz9zhmRv9yn5B9CWN/EI/bIvJYkg CwWqSVKCyEZahQL5p4yYkQyR2M+Ufg== =oG+g -----END PGP SIGNATURE----- --S1BNGpv0yoYahz37--