From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161622AbbKEOZa (ORCPT ); Thu, 5 Nov 2015 09:25:30 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:48460 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032504AbbKEOZ2 (ORCPT ); Thu, 5 Nov 2015 09:25:28 -0500 Date: Thu, 5 Nov 2015 14:23:47 +0000 From: Mark Brown To: Chen Feng Cc: w.f@huawei.com, sameo@linux.intel.com, lee.jones@linaro.org, linux-kernel@vger.kernel.org, lgirdwood@gmail.com, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, joro@8bytes.org, iommu@lists.linux-foundation.org, haojian.zhuang@linaro.org, devicetree@vger.kernel.org, xuwei5@hisilicon.com, xuyiping@hisilicon.com, kong.kongxinwei@hisilicon.com, z.liuxinliang@hisilicon.com, yudongbin@hisilicon.com, weidong2@hisilicon.com, saberlily.xia@hisilicon.com, haojian.zhuang@outlook.com, leo.yan@linaro.org, linuxarm@huawei.com, dan.zhao@hisilicon.com, peter.panshilin@hisilicon.com, qijiwen@hisilicon.com Message-ID: <20151105142347.GI18409@sirena.org.uk> References: <1446730488-31930-1-git-send-email-puck.chen@hisilicon.com> <1446730488-31930-4-git-send-email-puck.chen@hisilicon.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xQR6quUbZ63TTuTU" Content-Disposition: inline In-Reply-To: <1446730488-31930-4-git-send-email-puck.chen@hisilicon.com> X-Cookie: Put your trust in those who are worthy. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 92.40.249.56 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH 3/7] doc:bindings:Document for hi655x pmic driver X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --xQR6quUbZ63TTuTU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 05, 2015 at 09:34:44PM +0800, Chen Feng wrote: > +Required properties: > +- compatible: Must be "hisilicon,hi655x-regulator-pmic"; If this is a subfunction of a MFD it shouldn't have a compatible string. If it is instead a standalone device it should just have a name in the form "vendor,chip" without any random suffixes. > +- regulator-name: Regulator name in SoC. > +- regulator-min-microvolt: Smallest voltage support. > +- regulator-max-microvolt: Largest voltages support. These should *never* be mandatory properties and the generic regulator bindings should be reference rather than copied into the binding for a specific device, that way the standard definitions for things are always used and people know about any other properties that are available as standard. > +- regulator-off-on-delay: The time wait for power steady > +- regulator-ctrl-regs: Registers offset of control register. > + In turn with enable disable and status register offset. > +- regulator-ctrl-mask: The control mask of the register. > +- regulator-vset-regs: Voltage set register offset. > +- regulator-vset-mask: voltage set control mask. > +- regulator-n-vol: The num of support voltages. > +- regulator-vset-table: The table of support voltages. Why is this in the binding? This is a binding for a specific device, there is no point in putting all these data tables in the DT - it just bloats the DT and makes it harder for us to enhance our support for this device in the future. Just=20 > + > +Example: > + pmic: pmic@f8000000 { > + compatible =3D "hisilicon,hi655x-pmic-driver"; > + ... > + ldo2: regulator@a21 { > + compatible =3D "hisilicon,hi655x-regulator-pmic"; > + regulator-name =3D "ldo2"; > + regulator-min-microvolt =3D <2500000>; > + regulator-max-microvolt =3D <3200000>; > + regulator-valid-modes-mask =3D <0x02>; > + regulator-initial-mode =3D <0x02>; > + regulator-off-on-delay =3D <120>; > + regulator-ctrl-regs =3D <0x029 0x02a 0x02b>; > + regulator-ctrl-mask =3D <0x1>; > + regulator-vset-regs =3D <0x072>; > + regulator-vset-mask =3D <0x3>; > + regulator-n-vol =3D <8>; > + regulator-vset-table =3D <2500000>,<2600000>, > + <2700000>,<2800000>, > + <2900000>,<3000000>, > + <3100000>,<3200000>; > + }; > + ... > + } > --=20 > 1.9.1 >=20 >=20 --xQR6quUbZ63TTuTU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWO2ZyAAoJECTWi3JdVIfQRjYH/15bCAD+yeC34ZD8dRLzBYuU 5MwOy/3knMKzgOuHyXVqaDOm5y1ttWY5rOQljrdGJh67K+DHTRnYkApW9iESEcQ4 k1WYKcRvUzLsHStsS94O/ve5/cXvgBEoMA3cPravUrcKOZQ8sDwjZQFrbm1WbybX zcfBkrVEaxiI0nC5O1AFwCd63JYjsMMYLtJbGDbjEHZprDvy8kMrDEdz+OhBBro/ A56zwkIUVbBr4oBQVNbJBpivDqPCiOlfqH8qFhkdKw2bimguuT5xeg+uW8ncGbti AWKU4514d4P4Hr5UX/LT1pehtl4pgfhuX1erp5MqPqoE1WYalhR0Jkx2KnLj8tQ= =U5j/ -----END PGP SIGNATURE----- --xQR6quUbZ63TTuTU--