lkml.org 
[lkml]   [2014]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 1/4] regulator: Add helper function to get "poweroff-source" property
On Tue, Sep 30, 2014 at 05:29:43PM +0000, Romain Perier wrote:

> +/**
> + * of_get_regulator_poweroff_source - Get poweroff-source for given device_node
> + * @np: Pointer to the given device_node
> + *
> + * return true if present false otherwise
> + */
> +bool of_get_regulator_poweroff_source(const struct device_node *np)
> +{
> + return of_property_read_bool(np, "poweroff-source");
> +}
> +EXPORT_SYMBOL_GPL(of_get_regulator_poweroff_source);

This isn't really a regulator specific thing - it's common for the
actual implementation to be to simply cut power but it could be
something that doesn't look like a regulator doing it like a system
monitor. I'd rename this to something like is_system_poweroff_source().

You probably also want to CC the DT maintainers on this and add some
documentation of this as a standard property, not entirely sure where
exactly but I'm sure the DT people could advise.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-10-01 20:41    [W:0.042 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site