xref: /linux/include/linux/regulator/fan53555.h (revision 56fb34d86e875dbb0d3e6a81c5d3d035db373031)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * fan53555.h - Fairchild Regulator FAN53555 Driver
4  *
5  * Copyright (C) 2012 Marvell Technology Ltd.
6  * Yunfan Zhang <yfzhang@marvell.com>
7  */
8 
9 #ifndef __FAN53555_H__
10 #define __FAN53555_H__
11 
12 /* VSEL ID */
13 enum {
14 	FAN53555_VSEL_ID_0 = 0,
15 	FAN53555_VSEL_ID_1,
16 };
17 
18 /* Transition slew rate limiting from a low to high voltage.
19  * -----------------------
20  *   Bin |Slew Rate(mV/uS)
21  * ------|----------------
22  *   000 |    64.00
23  * ------|----------------
24  *   001 |    32.00
25  * ------|----------------
26  *   010 |    16.00
27  * ------|----------------
28  *   011 |     8.00
29  * ------|----------------
30  *   100 |     4.00
31  * ------|----------------
32  *   101 |     2.00
33  * ------|----------------
34  *   110 |     1.00
35  * ------|----------------
36  *   111 |     0.50
37  * -----------------------
38  */
39 enum {
40 	FAN53555_SLEW_RATE_64MV = 0,
41 	FAN53555_SLEW_RATE_32MV,
42 	FAN53555_SLEW_RATE_16MV,
43 	FAN53555_SLEW_RATE_8MV,
44 	FAN53555_SLEW_RATE_4MV,
45 	FAN53555_SLEW_RATE_2MV,
46 	FAN53555_SLEW_RATE_1MV,
47 	FAN53555_SLEW_RATE_0_5MV,
48 };
49 
50 struct fan53555_platform_data {
51 	struct regulator_init_data *regulator;
52 	unsigned int slew_rate;
53 	/* Sleep VSEL ID */
54 	unsigned int sleep_vsel_id;
55 };
56 
57 #endif /* __FAN53555_H__ */
58