From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753339AbcD0OkP (ORCPT ); Wed, 27 Apr 2016 10:40:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55922 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753137AbcD0OkL (ORCPT ); Wed, 27 Apr 2016 10:40:11 -0400 Subject: Re: [PATCH 1/2] regulator: core: Allow use of "status = disabled" in regulator dts nodes To: Mark Brown References: <1461765825-15915-1-git-send-email-hdegoede@redhat.com> <1461765825-15915-2-git-send-email-hdegoede@redhat.com> <20160427142432.GR3217@sirena.org.uk> <20160427143711.GT3217@sirena.org.uk> Cc: Liam Girdwood , Maxime Ripard , Chen-Yu Tsai , Linux Kernel Mailing List From: Hans de Goede Message-ID: Date: Wed, 27 Apr 2016 16:40:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <20160427143711.GT3217@sirena.org.uk> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 27-04-16 16:37, Mark Brown wrote: > On Wed, Apr 27, 2016 at 04:31:02PM +0200, Hans de Goede wrote: >> On 27-04-16 16:24, Mark Brown wrote: > >>> The regulator API should not touch any regulators that it doesn't have >>> permission to change the state for. All other regulators are strictly >>> read only. > >> How do we give permission to change state ? Is omitting the dts node, >> and thus not returning a node / constrains from regulator_of_get_init_data >> enough for the regulator API to not have permission ? > > Yes, omit the DT node or mark it always on at the minute. Or, since regulator_of_get_init_data uses for_each_available_child_of_node which checks the "status" value we can actually already use "status=disabled" cool. So this simply already works :) Regards, Hans