@@ -24,12 +24,17 @@ struct visionox_rm69299_panel_desc {
24
24
25
25
struct visionox_rm69299 {
26
26
struct drm_panel panel ;
27
- struct regulator_bulk_data supplies [ 2 ] ;
27
+ struct regulator_bulk_data * supplies ;
28
28
struct gpio_desc * reset_gpio ;
29
29
struct mipi_dsi_device * dsi ;
30
30
const struct visionox_rm69299_panel_desc * desc ;
31
31
};
32
32
33
+ static const struct regulator_bulk_data visionox_rm69299_supplies [] = {
34
+ { .supply = "vdda" , .init_load_uA = 32000 },
35
+ { .supply = "vdd3p3" , .init_load_uA = 13200 },
36
+ };
37
+
33
38
static const u8 visionox_rm69299_1080x2248_60hz_init_seq [][2 ] = {
34
39
{ 0xfe , 0x00 }, { 0xc2 , 0x08 }, { 0x35 , 0x00 }, { 0x51 , 0xff },
35
40
};
@@ -43,7 +48,8 @@ static int visionox_rm69299_power_on(struct visionox_rm69299 *ctx)
43
48
{
44
49
int ret ;
45
50
46
- ret = regulator_bulk_enable (ARRAY_SIZE (ctx -> supplies ), ctx -> supplies );
51
+ ret = regulator_bulk_enable (ARRAY_SIZE (visionox_rm69299_supplies ),
52
+ ctx -> supplies );
47
53
if (ret < 0 )
48
54
return ret ;
49
55
@@ -66,7 +72,8 @@ static int visionox_rm69299_power_off(struct visionox_rm69299 *ctx)
66
72
{
67
73
gpiod_set_value (ctx -> reset_gpio , 0 );
68
74
69
- return regulator_bulk_disable (ARRAY_SIZE (ctx -> supplies ), ctx -> supplies );
75
+ return regulator_bulk_disable (ARRAY_SIZE (visionox_rm69299_supplies ),
76
+ ctx -> supplies );
70
77
}
71
78
72
79
static int visionox_rm69299_unprepare (struct drm_panel * panel )
@@ -174,12 +181,8 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi)
174
181
175
182
ctx -> dsi = dsi ;
176
183
177
- ctx -> supplies [0 ].supply = "vdda" ;
178
- ctx -> supplies [0 ].init_load_uA = 32000 ;
179
- ctx -> supplies [1 ].supply = "vdd3p3" ;
180
- ctx -> supplies [1 ].init_load_uA = 13200 ;
181
-
182
- ret = devm_regulator_bulk_get (dev , ARRAY_SIZE (ctx -> supplies ), ctx -> supplies );
184
+ ret = devm_regulator_bulk_get_const (dev , ARRAY_SIZE (visionox_rm69299_supplies ),
185
+ visionox_rm69299_supplies , & ctx -> supplies );
183
186
if (ret < 0 )
184
187
return ret ;
185
188
0 commit comments