summaryrefslogtreecommitdiff
path: root/include/linux/regulator/stub-regulator.h
diff options
context:
space:
mode:
authorDevesh Jhunjhunwala <deveshj@codeaurora.org>2016-02-28 15:15:34 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:09:42 -0700
commit54b0cb4a1eb642817fbecde6fd3adc2734fc3d5c (patch)
tree579ba2c89fbf885a18ffac4f00aab52fde9281a9 /include/linux/regulator/stub-regulator.h
parent25a33bfca90a66e780344c53c99be3aa77c2d037 (diff)
regulator: msm: Add snapshot of the stub regulator driver
This is a snapshot of the Documentation and header file for the stub regulator driver as of msm-3.18 kernel commit: 2642c0adc79c06c0f3225da0177e910a1cea8cb5 ("Merge "ARM: dts: msm: Add support for truly 720p command mode panel on msmgold"") Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
Diffstat (limited to 'include/linux/regulator/stub-regulator.h')
-rw-r--r--include/linux/regulator/stub-regulator.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/include/linux/regulator/stub-regulator.h b/include/linux/regulator/stub-regulator.h
new file mode 100644
index 000000000000..1155d82ba27b
--- /dev/null
+++ b/include/linux/regulator/stub-regulator.h
@@ -0,0 +1,54 @@
+/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __STUB_REGULATOR_H__
+#define __STUB_REGULATOR_H__
+
+#include <linux/regulator/machine.h>
+
+#define STUB_REGULATOR_DRIVER_NAME "stub-regulator"
+
+/**
+ * struct stub_regulator_pdata - stub regulator device data
+ * @init_data: regulator constraints
+ * @hpm_min_load: minimum load in uA that will result in the regulator
+ * being set to high power mode
+ * @system_uA: current drawn from regulator not accounted for by any
+ * regulator framework consumer
+ */
+struct stub_regulator_pdata {
+ struct regulator_init_data init_data;
+ int hpm_min_load;
+ int system_uA;
+};
+
+#ifdef CONFIG_REGULATOR_STUB
+
+/**
+ * regulator_stub_init() - register platform driver for stub-regulator
+ *
+ * This initialization function should be called in systems in which driver
+ * registration ordering must be controlled precisely.
+ */
+
+int __init regulator_stub_init(void);
+
+#else
+
+static inline int __init regulator_stub_init(void)
+{
+ return -ENODEV;
+}
+
+#endif /* CONFIG_REGULATOR_STUB */
+
+#endif