Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752115AbaJJM3G (ORCPT ); Fri, 10 Oct 2014 08:29:06 -0400 Received: from mail-qc0-f173.google.com ([209.85.216.173]:64492 "EHLO mail-qc0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751347AbaJJM3C (ORCPT ); Fri, 10 Oct 2014 08:29:02 -0400 MIME-Version: 1.0 In-Reply-To: References: <1412711104-15902-1-git-send-email-romain.perier@gmail.com> Date: Fri, 10 Oct 2014 14:29:00 +0200 Message-ID: Subject: Re: [RFC PATCH v2 1/4] regulator: Add helper function to get "poweroff-source" property From: PERIER Romain To: Grant Likely Cc: devicetree , Mark Brown , Liam Girdwood , Linux Kernel Mailing List , =?UTF-8?Q?Heiko_St=C3=BCbner?= , "sameo@linux.intel.com" , Lee Jones , robh , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , Anton Vorontsov , Laxman Dewangan , "linux-omap@vger.kernel.org" , "linux-tegra@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > What I'm more concerned about is the semantics of the property. What > do the generic code paths gain by standardizing this property? Is it > expected that We really need to come up with a standard property for this and document it rather than continuing to add individual device specific properties each time a driver adds poweroff capability, all doing the same thing (a lot of regulators driver, mfd drivers, soc specific drivers, power drivers already do that, that's very redudant) . This is a simple unification logic. About its name, I found my inspiration with "wakeup-source" which marks an device as able to wakeup the system, poweroff capability is exactly the same except that the device will control the power of the system, so I choose "poweroff-source". However, suggestions are welcome ;) About of_regulator.c, I agree with Mark. poweroff capability is not really specific to regulators, so it does not make sense to put the helper there, imho. Romain -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/