Add a proxy consumer driver which can be used to ensure that a given regulator maintains a certain minimum state during bootup. Enable state, voltage, and current may be forced to specified levels. Bug: 150508586 Change-Id: I0ccc63a41684462684ac737fb2f4129a3e6e4aea Signed-off-by: David Collins <collinsd@codeaurora.org> (cherry picked from commitcf03466c07) [Also squashede9a05bb4d3"spdx: Modify spdx tag from GPL-2.0 to GPL-2.0-only"] Signed-off-by: Saravana Kannan <saravanak@google.com>
34 lines
784 B
C
34 lines
784 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2013, The Linux Foundation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef _LINUX_REGULATOR_PROXY_CONSUMER_H_
|
|
#define _LINUX_REGULATOR_PROXY_CONSUMER_H_
|
|
|
|
#include <linux/device.h>
|
|
#include <linux/of.h>
|
|
|
|
struct proxy_consumer;
|
|
|
|
#ifdef CONFIG_REGULATOR_PROXY_CONSUMER
|
|
|
|
struct proxy_consumer *regulator_proxy_consumer_register(struct device *reg_dev,
|
|
struct device_node *reg_node);
|
|
|
|
int regulator_proxy_consumer_unregister(struct proxy_consumer *consumer);
|
|
|
|
#else
|
|
|
|
static inline struct proxy_consumer *regulator_proxy_consumer_register(
|
|
struct device *reg_dev, struct device_node *reg_node)
|
|
{ return NULL; }
|
|
|
|
static inline int regulator_proxy_consumer_unregister(
|
|
struct proxy_consumer *consumer)
|
|
{ return 0; }
|
|
|
|
#endif
|
|
|
|
#endif
|