From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750906AbcAUWLu (ORCPT ); Thu, 21 Jan 2016 17:11:50 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:39064 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750758AbcAUWLs (ORCPT ); Thu, 21 Jan 2016 17:11:48 -0500 Date: Thu, 21 Jan 2016 22:11:39 +0000 From: Mark Brown To: chenfeng Cc: lee.jones@linaro.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, yudongbin@hisilicon.com, saberlily.xia@hisilicon.com, suzhuangluan@hisilicon.com, kong.kongxinwei@hisilicon.com, xuyiping@hisilicon.com, z.liuxinliang@hisilicon.com, weidong2@hisilicon.com, w.f@huawei.com, puck.chen@foxmail.com, shimingxing@hisilicon.com, oliver.fu@hisilicon.com, albert.lubing@hisilicon.com, chenxiang9@huawei.com, liuzixing@huawei.com, haojian.zhuang@linaro.org, qijiwen@hisilicon.com, peter.panshilin@hisilicon.com, dan.zhao@hisilicon.com, linuxarm@huawei.com, dev@lists.96boards.org Message-ID: <20160121221139.GT6588@sirena.org.uk> References: <1453185124-30809-1-git-send-email-puck.chen@hisilicon.com> <1453185124-30809-6-git-send-email-puck.chen@hisilicon.com> <20160120130813.GD6588@sirena.org.uk> <56A0B3C0.8030702@hisilicon.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uHr6nJLCB5hydKEi" Content-Disposition: inline In-Reply-To: <56A0B3C0.8030702@hisilicon.com> X-Cookie: APL hackers do it in the quad. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH v6 5/5] hisilicon/dts: Add hi655x pmic dts node 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 --uHr6nJLCB5hydKEi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jan 21, 2016 at 06:32:32PM +0800, chenfeng wrote: > On 2016/1/20 21:08, Mark Brown wrote: > > On Tue, Jan 19, 2016 at 02:32:04PM +0800, Chen Feng wrote: > I will change it like this: > regulators { > ldo2: LDO2@a21 { > regulator-name = "ldo2"; > regulator-min-microvolt = <2500000>; > regulator-max-microvolt = <3200000>; > regulator-valid-modes-mask = <0x02>; > regulator-enable-ramp-delay = <120>; > }; No, do not include the voltage constraints, see the second half of my reply. > >> + regulator-min-microvolt = <2500000>; > >> + regulator-max-microvolt = <3200000>; > > This is broken as it misunderstands the purpose of specifying > > constraints. The constraints are there to say what the safe and > > supported configuration is on a given board, it is not possible to > > provide this information safely in a general include that is used by all > > systems using the PMIC. Specifying the maximum voltage range for the > > regulators is almost guaranteed to result in at least some > > configurations being enabled which will not work, in the worst case this > > may include configurations which could physically damage the system. > > In general it is very unusual to include the regulators in a .dtsi since > > essentially all the configuration for them should be board specific. > Do you mean that I should move this into dts and enable it by default? It would be more normal to put everything to do with the regulators into the board DTS. It is unlikely that a straight move would be the right thing, you would need to understand what all the voltage ranges on the board are and set them appropriately and should normally also be naming the regulators as per the schematic so users can tie the DT and the schematic together. --uHr6nJLCB5hydKEi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWoVebAAoJECTWi3JdVIfQpoIH/39++73M1U9kTh4ylevMKbsL 0lHBmrBmjc8XbpD8sMwYn/QgO5ocP4L5GMMiZzkKm59DmJm/VL18caSnJunjX/YT O35zxt4e/PWYUNqJaruzEDH8bYbLB6wXZTzf16WyciSZWUkIy6Ppm9YxBNxnU6kx rb4VSjXYOkRCGu7KDrfPyNFWuYjmgxt/t6CzHL5LT/3Pso0MzW7jAVquZpjnpTUX VQE5orC/Fo3jUuQSJeszksYyvntSsd3QszNX9QkbmRkgNZGtnuDcuytLe2DJgPVC 1iytZdq+5wS26jm4VttIxfQ1saezd2GLi/0ZE7s7UqinhrEsqa/IZfRGTCfdeb8= =5ubm -----END PGP SIGNATURE----- --uHr6nJLCB5hydKEi--