From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935469AbcA1SO5 (ORCPT ); Thu, 28 Jan 2016 13:14:57 -0500 Received: from arrakis.dune.hu ([78.24.191.176]:37725 "EHLO arrakis.dune.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934748AbcA1SOF (ORCPT ); Thu, 28 Jan 2016 13:14:05 -0500 Subject: Re: [PATCH V4 2/2] regulator: mt6323: Add support for MT6323 regulator To: Mark Brown References: <1453896059-44589-1-git-send-email-blogic@openwrt.org> <1453896059-44589-2-git-send-email-blogic@openwrt.org> <20160127144105.GQ6042@sirena.org.uk> Cc: Liam Girdwood , Chen Zhong , Matthias Brugger , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, =?UTF-8?B?SGVucnlDIENoZW4gKOmZs+W7uuixqik=?= From: John Crispin X-Enigmail-Draft-Status: N1110 Message-ID: <56AA5A5C.9080402@openwrt.org> Date: Thu, 28 Jan 2016 19:13:48 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160127144105.GQ6042@sirena.org.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/01/2016 15:41, Mark Brown wrote: > On Wed, Jan 27, 2016 at 01:00:59PM +0100, John Crispin wrote: > >> + /* Constrain board-specific capabilities according to what >> + * this driver and the chip itself can actually do. >> + */ >> + c = rdev->constraints; >> + c->valid_modes_mask |= REGULATOR_MODE_NORMAL | >> + REGULATOR_MODE_STANDBY; >> + c->valid_ops_mask |= REGULATOR_CHANGE_MODE; > > No, drivers should *never* enable things that weren't explictly enabled > by the machine constraints. This misses the whole point of having > constraints. They are there so that the system integrator can enable > the functionality that is safe on a given board. > > The comment is also inaccurate, it claims it's imposing constraints but > in fact it's adding additional permissions. > Hi Mark would the following two bindings be ok ? I would create patches to add them. * regulator-allow-mode; or regulator-allow-change-mode; * regulator-modes = ; John