1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * act8865.h  --  Voltage regulation for active-semi act88xx PMUs
4  *
5  * Copyright (C) 2013 Atmel Corporation.
6  */
7 
8 #ifndef __LINUX_REGULATOR_ACT8865_H
9 #define __LINUX_REGULATOR_ACT8865_H
10 
11 #include <linux/regulator/machine.h>
12 
13 enum {
14 	ACT8600_ID_DCDC1,
15 	ACT8600_ID_DCDC2,
16 	ACT8600_ID_DCDC3,
17 	ACT8600_ID_SUDCDC4,
18 	ACT8600_ID_LDO5,
19 	ACT8600_ID_LDO6,
20 	ACT8600_ID_LDO7,
21 	ACT8600_ID_LDO8,
22 	ACT8600_ID_LDO9,
23 	ACT8600_ID_LDO10,
24 };
25 
26 enum {
27 	ACT8865_ID_DCDC1,
28 	ACT8865_ID_DCDC2,
29 	ACT8865_ID_DCDC3,
30 	ACT8865_ID_LDO1,
31 	ACT8865_ID_LDO2,
32 	ACT8865_ID_LDO3,
33 	ACT8865_ID_LDO4,
34 	ACT8865_REG_NUM,
35 };
36 
37 enum {
38 	ACT8846_ID_REG1,
39 	ACT8846_ID_REG2,
40 	ACT8846_ID_REG3,
41 	ACT8846_ID_REG4,
42 	ACT8846_ID_REG5,
43 	ACT8846_ID_REG6,
44 	ACT8846_ID_REG7,
45 	ACT8846_ID_REG8,
46 	ACT8846_ID_REG9,
47 	ACT8846_ID_REG10,
48 	ACT8846_ID_REG11,
49 	ACT8846_ID_REG12,
50 	ACT8846_REG_NUM,
51 };
52 
53 enum {
54 	ACT8600,
55 	ACT8865,
56 	ACT8846,
57 };
58 
59 /**
60  * act8865_regulator_data - regulator data
61  * @id: regulator id
62  * @name: regulator name
63  * @init_data: regulator init data
64  * @of_node: device tree node (optional)
65  */
66 struct act8865_regulator_data {
67 	int id;
68 	const char *name;
69 	struct regulator_init_data *init_data;
70 	struct device_node *of_node;
71 };
72 
73 /**
74  * act8865_platform_data - platform data for act8865
75  * @num_regulators: number of regulators used
76  * @regulators: pointer to regulators used
77  */
78 struct act8865_platform_data {
79 	int num_regulators;
80 	struct act8865_regulator_data *regulators;
81 };
82 #endif
83