]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - include/linux/regulator/fixed.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
[mirror_ubuntu-hirsute-kernel.git] / include / linux / regulator / fixed.h
CommitLineData
2874c5fd 1/* SPDX-License-Identifier: GPL-2.0-or-later */
48d335ba
MB
2/*
3 * fixed.h
4 *
5 * Copyright 2008 Wolfson Microelectronics PLC.
6 *
7 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
8 *
86d9884b
RQ
9 * Copyright (c) 2009 Nokia Corporation
10 * Roger Quadros <ext-roger.quadros@nokia.com>
48d335ba
MB
11 */
12
13#ifndef __REGULATOR_FIXED_H
14#define __REGULATOR_FIXED_H
15
bcf3402c
MB
16struct regulator_init_data;
17
86d9884b
RQ
18/**
19 * struct fixed_voltage_config - fixed_voltage_config structure
20 * @supply_name: Name of the regulator supply
6be5bfc3 21 * @input_supply: Name of the input regulator supply
86d9884b 22 * @microvolts: Output voltage of regulator
eda79a30 23 * @startup_delay: Start-up time in microseconds
86d9884b
RQ
24 * @enabled_at_boot: Whether regulator has been enabled at
25 * boot or not. 1 = Yes, 0 = No
26 * This is used to keep the regulator at
27 * the default state
28 * @init_data: regulator_init_data
29 *
30 * This structure contains fixed voltage regulator configuration
31 * information that must be passed by platform code to the fixed
32 * voltage regulator driver.
33 */
48d335ba
MB
34struct fixed_voltage_config {
35 const char *supply_name;
6be5bfc3 36 const char *input_supply;
48d335ba 37 int microvolts;
eda79a30 38 unsigned startup_delay;
86d9884b 39 unsigned enabled_at_boot:1;
bcf3402c 40 struct regulator_init_data *init_data;
48d335ba
MB
41};
42
613330a0
SH
43struct regulator_consumer_supply;
44
45#if IS_ENABLED(CONFIG_REGULATOR)
dfad84ae 46struct platform_device *regulator_register_always_on(int id, const char *name,
15719ccc 47 struct regulator_consumer_supply *supplies, int num_supplies, int uv);
613330a0 48#else
dfad84ae 49static inline struct platform_device *regulator_register_always_on(int id, const char *name,
15719ccc 50 struct regulator_consumer_supply *supplies, int num_supplies, int uv)
613330a0
SH
51{
52 return NULL;
53}
54#endif
55
dfad84ae 56#define regulator_register_fixed(id, s, ns) regulator_register_always_on(id, \
15719ccc 57 "fixed-dummy", s, ns, 0)
dfad84ae 58
48d335ba 59#endif