1 /*
2  * fan53555.h - Fairchild Regulator FAN53555 Driver
3  *
4  * Copyright (C) 2012 Marvell Technology Ltd.
5  * Yunfan Zhang <yfzhang@marvell.com>
6  *
7  * This package is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.
10  *
11  */
12 
13 #ifndef __FAN53555_H__
14 #define __FAN53555_H__
15 
16 /* VSEL ID */
17 enum {
18 	FAN53555_VSEL_ID_0 = 0,
19 	FAN53555_VSEL_ID_1,
20 };
21 
22 /* Transition slew rate limiting from a low to high voltage.
23  * -----------------------
24  *   Bin |Slew Rate(mV/uS)
25  * ------|----------------
26  *   000 |    64.00
27  * ------|----------------
28  *   001 |    32.00
29  * ------|----------------
30  *   010 |    16.00
31  * ------|----------------
32  *   011 |     8.00
33  * ------|----------------
34  *   100 |     4.00
35  * ------|----------------
36  *   101 |     2.00
37  * ------|----------------
38  *   110 |     1.00
39  * ------|----------------
40  *   111 |     0.50
41  * -----------------------
42  */
43 enum {
44 	FAN53555_SLEW_RATE_64MV = 0,
45 	FAN53555_SLEW_RATE_32MV,
46 	FAN53555_SLEW_RATE_16MV,
47 	FAN53555_SLEW_RATE_8MV,
48 	FAN53555_SLEW_RATE_4MV,
49 	FAN53555_SLEW_RATE_2MV,
50 	FAN53555_SLEW_RATE_1MV,
51 	FAN53555_SLEW_RATE_0_5MV,
52 };
53 
54 struct fan53555_platform_data {
55 	struct regulator_init_data *regulator;
56 	unsigned int slew_rate;
57 	/* Sleep VSEL ID */
58 	unsigned int sleep_vsel_id;
59 };
60 
61 #endif /* __FAN53555_H__ */
62