tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
linuxPackages.ipu6-drivers: 2023-02-20 -> 2023-05-19
Martin Weinelt
2 years ago
ca45ef8e
055e998b
+6
-377
2 changed files
expand all
collapse all
unified
split
pkgs
os-specific
linux
ipu6-drivers
default.nix
pr-84-unpatched-upstream-compatiblity.patch
+6
-12
pkgs/os-specific/linux/ipu6-drivers/default.nix
···
5
5
, kernel
6
6
}:
7
7
8
8
-
stdenv.mkDerivation rec {
8
8
+
stdenv.mkDerivation {
9
9
pname = "ipu6-drivers";
10
10
-
version = "unstable-2023-02-20";
10
10
+
version = "unstable-2023-05-19";
11
11
12
12
src = fetchFromGitHub {
13
13
owner = "intel";
14
14
-
repo = pname;
15
15
-
rev = "dfedab03f3856010d37968cb384696038c73c984";
16
16
-
hash = "sha256-TKo04+fqY64SdDuWApuzRXBnaAW2DReubwFRsdfJMWM=";
14
14
+
repo = "ipu6-drivers";
15
15
+
rev = "8c02a846d1afe0e108964a2d3db4acb175712da9";
16
16
+
hash = "sha256-f2EuxVkCvEPyH0XbLCv5t/Mi0jdk7BOh1QluG/TxZr0=";
17
17
};
18
18
-
19
19
-
patches = [
20
20
-
# https://github.com/intel/ipu6-drivers/pull/84
21
21
-
./pr-84-unpatched-upstream-compatiblity.patch
22
22
-
];
23
18
24
19
postPatch = ''
25
20
cp --no-preserve=mode --recursive --verbose \
···
53
48
maintainers = with lib.maintainers; [ hexa ];
54
49
platforms = [ "x86_64-linux" ];
55
50
# requires 6.1.7 https://github.com/intel/ipu6-drivers/pull/84
56
56
-
# fails to build on 6.3 https://github.com/intel/ipu6-drivers/issues/140
57
57
-
broken = kernel.kernelOlder "6.1.7" || kernel.kernelAtLeast "6.3";
51
51
+
broken = kernel.kernelOlder "6.1.7";
58
52
};
59
53
}
-365
pkgs/os-specific/linux/ipu6-drivers/pr-84-unpatched-upstream-compatiblity.patch
···
1
1
-
From 8f4346915bb7e3a3ad3eea2c24b6da09dac257b2 Mon Sep 17 00:00:00 2001
2
2
-
From: Hans de Goede <hdegoede@redhat.com>
3
3
-
Date: Tue, 29 Nov 2022 15:06:23 +0100
4
4
-
Subject: [PATCH 1/4] sensors: Use clk-framework instead of a "clken" GPIO
5
5
-
6
6
-
Use the clk-framework to get a clk-provider reference and use
7
7
-
clk_prepare_enable() / clk_disable_unprepare() to control the clk.
8
8
-
9
9
-
This replace modelling the clock as a "clken" GPIO, which is not a valid
10
10
-
way to model it when the clk is e.g. generated by the clk-generator of
11
11
-
a TPS68470 PMIC.
12
12
-
13
13
-
This relies on the following upstream bugfix for the INT3472 clk provider:
14
14
-
15
15
-
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cf5ac2d45f6e4d11ad78e7b10ae9a4121ba5e995
16
16
-
17
17
-
"platform/x86: int3472/discrete: Ensure the clk/power enable pins are in output mode"
18
18
-
19
19
-
This patch is available since upstream kernel 6.1.7, so the new
20
20
-
code is only enabled for LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 7)
21
21
-
22
22
-
This allow susing the IPU6 sensor drivers with the upstream int3472
23
23
-
driver with unmodified upstream kernels >= 6.1.7 .
24
24
-
25
25
-
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
26
26
-
---
27
27
-
drivers/media/i2c/hm11b1.c | 18 ++++++++++++++++++
28
28
-
drivers/media/i2c/ov01a1s.c | 18 ++++++++++++++++++
29
29
-
2 files changed, 36 insertions(+)
30
30
-
31
31
-
diff --git a/drivers/media/i2c/hm11b1.c b/drivers/media/i2c/hm11b1.c
32
32
-
index 1cc5cd761fbf..e14810bdd612 100644
33
33
-
--- a/drivers/media/i2c/hm11b1.c
34
34
-
+++ b/drivers/media/i2c/hm11b1.c
35
35
-
@@ -468,8 +468,13 @@ struct hm11b1 {
36
36
-
struct gpio_desc *reset_gpio;
37
37
-
/* GPIO for powerdown */
38
38
-
struct gpio_desc *powerdown_gpio;
39
39
-
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 7)
40
40
-
/* GPIO for clock enable */
41
41
-
struct gpio_desc *clken_gpio;
42
42
-
+#else
43
43
-
+ /* Clock provider */
44
44
-
+ struct clk *clk;
45
45
-
+#endif
46
46
-
/* GPIO for privacy LED */
47
47
-
struct gpio_desc *pled_gpio;
48
48
-
#endif
49
49
-
@@ -508,7 +513,14 @@ static void hm11b1_set_power(struct hm11b1 *hm11b1, int on)
50
50
-
return;
51
51
-
gpiod_set_value_cansleep(hm11b1->reset_gpio, on);
52
52
-
gpiod_set_value_cansleep(hm11b1->powerdown_gpio, on);
53
53
-
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 7)
54
54
-
gpiod_set_value_cansleep(hm11b1->clken_gpio, on);
55
55
-
+#else
56
56
-
+ if (on)
57
57
-
+ clk_prepare_enable(hm11b1->clk);
58
58
-
+ else
59
59
-
+ clk_disable_unprepare(hm11b1->clk);
60
60
-
+#endif
61
61
-
gpiod_set_value_cansleep(hm11b1->pled_gpio, on);
62
62
-
msleep(20);
63
63
-
#elif IS_ENABLED(CONFIG_POWER_CTRL_LOGIC)
64
64
-
@@ -1093,12 +1105,18 @@ static int hm11b1_parse_dt(struct hm11b1 *hm11b1)
65
65
-
return ret;
66
66
-
}
67
67
-
68
68
-
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 7)
69
69
-
hm11b1->clken_gpio = devm_gpiod_get(dev, "clken", GPIOD_OUT_HIGH);
70
70
-
ret = PTR_ERR_OR_ZERO(hm11b1->clken_gpio);
71
71
-
if (ret < 0) {
72
72
-
dev_err(dev, "error while getting clken_gpio gpio: %d\n", ret);
73
73
-
return ret;
74
74
-
}
75
75
-
+#else
76
76
-
+ hm11b1->clk = devm_clk_get_optional(dev, "clk");
77
77
-
+ if (IS_ERR(hm11b1->clk))
78
78
-
+ return dev_err_probe(dev, PTR_ERR(hm11b1->clk), "getting clk\n");
79
79
-
+#endif
80
80
-
81
81
-
hm11b1->pled_gpio = devm_gpiod_get(dev, "pled", GPIOD_OUT_HIGH);
82
82
-
ret = PTR_ERR_OR_ZERO(hm11b1->pled_gpio);
83
83
-
diff --git a/drivers/media/i2c/ov01a1s.c b/drivers/media/i2c/ov01a1s.c
84
84
-
index e4477625ce3b..628a1dd83ddf 100644
85
85
-
--- a/drivers/media/i2c/ov01a1s.c
86
86
-
+++ b/drivers/media/i2c/ov01a1s.c
87
87
-
@@ -317,8 +317,13 @@ struct ov01a1s {
88
88
-
struct gpio_desc *reset_gpio;
89
89
-
/* GPIO for powerdown */
90
90
-
struct gpio_desc *powerdown_gpio;
91
91
-
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 7)
92
92
-
/* GPIO for clock enable */
93
93
-
struct gpio_desc *clken_gpio;
94
94
-
+#else
95
95
-
+ /* Clock provider */
96
96
-
+ struct clk *clk;
97
97
-
+#endif
98
98
-
/* GPIO for privacy LED */
99
99
-
struct gpio_desc *pled_gpio;
100
100
-
#endif
101
101
-
@@ -339,7 +344,14 @@ static void ov01a1s_set_power(struct ov01a1s *ov01a1s, int on)
102
102
-
return;
103
103
-
gpiod_set_value_cansleep(ov01a1s->reset_gpio, on);
104
104
-
gpiod_set_value_cansleep(ov01a1s->powerdown_gpio, on);
105
105
-
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 7)
106
106
-
gpiod_set_value_cansleep(ov01a1s->clken_gpio, on);
107
107
-
+#else
108
108
-
+ if (on)
109
109
-
+ clk_prepare_enable(ov01a1s->clk);
110
110
-
+ else
111
111
-
+ clk_disable_unprepare(ov01a1s->clk);
112
112
-
+#endif
113
113
-
gpiod_set_value_cansleep(ov01a1s->pled_gpio, on);
114
114
-
msleep(20);
115
115
-
#elif IS_ENABLED(CONFIG_POWER_CTRL_LOGIC)
116
116
-
@@ -945,12 +957,18 @@ static int ov01a1s_parse_dt(struct ov01a1s *ov01a1s)
117
117
-
return -EPROBE_DEFER;
118
118
-
}
119
119
-
120
120
-
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 7)
121
121
-
ov01a1s->clken_gpio = devm_gpiod_get(dev, "clken", GPIOD_OUT_HIGH);
122
122
-
ret = PTR_ERR_OR_ZERO(ov01a1s->clken_gpio);
123
123
-
if (ret < 0) {
124
124
-
dev_err(dev, "error while getting clken_gpio gpio: %d\n", ret);
125
125
-
return -EPROBE_DEFER;
126
126
-
}
127
127
-
+#else
128
128
-
+ ov01a1s->clk = devm_clk_get_optional(dev, "clk");
129
129
-
+ if (IS_ERR(ov01a1s->clk))
130
130
-
+ return dev_err_probe(dev, PTR_ERR(ov01a1s->clk), "getting clk\n");
131
131
-
+#endif
132
132
-
133
133
-
ov01a1s->pled_gpio = devm_gpiod_get(dev, "pled", GPIOD_OUT_HIGH);
134
134
-
ret = PTR_ERR_OR_ZERO(ov01a1s->pled_gpio);
135
135
-
136
136
-
From b04fdf6433f6b64840d46f92ddf3d6d18e86ede3 Mon Sep 17 00:00:00 2001
137
137
-
From: Hans de Goede <hdegoede@redhat.com>
138
138
-
Date: Tue, 29 Nov 2022 23:37:50 +0100
139
139
-
Subject: [PATCH 2/4] sensors: Make powerdown and reset signals active-low by
140
140
-
default
141
141
-
142
142
-
The powerdown and reset functions should be set to 0, as in
143
143
-
not-powered-down, not-in-reset when the sensor is turned on.
144
144
-
145
145
-
Adjust the gpiod_set() value parameters for the powerdown_gpio
146
146
-
and reset_gpio to !on to properly reflect this.
147
147
-
148
148
-
Typical sensors however have a NRESET aka /RESET pin which needs
149
149
-
to be driven low to put the device in reset and the have
150
150
-
a powerup/enable pin rather then a powerdown pin. So at
151
151
-
the physicical level the pins associated with the reset and
152
152
-
powerdown functions need to be driven low to put the chip
153
153
-
in reset / to power the chip down. Mark the pins as active-low
154
154
-
in the added gpio-lookup table entries for these pin to
155
155
-
reflect this.
156
156
-
157
157
-
This double negation has 0 net effect, but it uses the GPIO
158
158
-
subsystem functionality as intended (setting reset to 0
159
159
-
on poweron makes lot more sense then setting it to 1 on poweron)
160
160
-
and it aligns the use of these GPIOs with that of the mainline
161
161
-
kernel allowing future use of the IPU6 driver with the
162
162
-
mainline INT3472 driver without needing to patch the mainline
163
163
-
kernel.
164
164
-
165
165
-
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
166
166
-
---
167
167
-
drivers/media/i2c/hm11b1.c | 4 ++--
168
168
-
drivers/media/i2c/ov01a1s.c | 4 ++--
169
169
-
drivers/media/i2c/ov2740.c | 2 +-
170
170
-
...nt3472-support-independent-clock-and-LED-gpios-5.17+.patch | 4 ++--
171
171
-
patch/int3472-support-independent-clock-and-LED-gpios.patch | 4 ++--
172
172
-
5 files changed, 9 insertions(+), 9 deletions(-)
173
173
-
174
174
-
diff --git a/drivers/media/i2c/hm11b1.c b/drivers/media/i2c/hm11b1.c
175
175
-
index e14810bdd612..652e8f177044 100644
176
176
-
--- a/drivers/media/i2c/hm11b1.c
177
177
-
+++ b/drivers/media/i2c/hm11b1.c
178
178
-
@@ -511,8 +511,8 @@ static void hm11b1_set_power(struct hm11b1 *hm11b1, int on)
179
179
-
#if IS_ENABLED(CONFIG_INTEL_SKL_INT3472)
180
180
-
if (!(hm11b1->reset_gpio && hm11b1->powerdown_gpio))
181
181
-
return;
182
182
-
- gpiod_set_value_cansleep(hm11b1->reset_gpio, on);
183
183
-
- gpiod_set_value_cansleep(hm11b1->powerdown_gpio, on);
184
184
-
+ gpiod_set_value_cansleep(hm11b1->reset_gpio, !on);
185
185
-
+ gpiod_set_value_cansleep(hm11b1->powerdown_gpio, !on);
186
186
-
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 7)
187
187
-
gpiod_set_value_cansleep(hm11b1->clken_gpio, on);
188
188
-
#else
189
189
-
diff --git a/drivers/media/i2c/ov01a1s.c b/drivers/media/i2c/ov01a1s.c
190
190
-
index 628a1dd83ddf..2ce81d04abf6 100644
191
191
-
--- a/drivers/media/i2c/ov01a1s.c
192
192
-
+++ b/drivers/media/i2c/ov01a1s.c
193
193
-
@@ -342,8 +342,8 @@ static void ov01a1s_set_power(struct ov01a1s *ov01a1s, int on)
194
194
-
#if IS_ENABLED(CONFIG_INTEL_SKL_INT3472)
195
195
-
if (!(ov01a1s->reset_gpio && ov01a1s->powerdown_gpio))
196
196
-
return;
197
197
-
- gpiod_set_value_cansleep(ov01a1s->reset_gpio, on);
198
198
-
- gpiod_set_value_cansleep(ov01a1s->powerdown_gpio, on);
199
199
-
+ gpiod_set_value_cansleep(ov01a1s->reset_gpio, !on);
200
200
-
+ gpiod_set_value_cansleep(ov01a1s->powerdown_gpio, !on);
201
201
-
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 7)
202
202
-
gpiod_set_value_cansleep(ov01a1s->clken_gpio, on);
203
203
-
#else
204
204
-
diff --git a/drivers/media/i2c/ov2740.c b/drivers/media/i2c/ov2740.c
205
205
-
index 67fb17e08e36..a8bb101776bd 100644
206
206
-
--- a/drivers/media/i2c/ov2740.c
207
207
-
+++ b/drivers/media/i2c/ov2740.c
208
208
-
@@ -596,7 +596,7 @@ static void ov2740_set_power(struct ov2740 *ov2740, int on)
209
209
-
{
210
210
-
if (!(ov2740->reset_gpio && ov2740->pled_gpio))
211
211
-
return;
212
212
-
- gpiod_set_value_cansleep(ov2740->reset_gpio, on);
213
213
-
+ gpiod_set_value_cansleep(ov2740->reset_gpio, !on);
214
214
-
gpiod_set_value_cansleep(ov2740->pled_gpio, on);
215
215
-
msleep(20);
216
216
-
}
217
217
-
diff --git a/patch/int3472-support-independent-clock-and-LED-gpios-5.17+.patch b/patch/int3472-support-independent-clock-and-LED-gpios-5.17+.patch
218
218
-
index 57373ac85f39..66ed770b68a0 100644
219
219
-
--- a/patch/int3472-support-independent-clock-and-LED-gpios-5.17+.patch
220
220
-
+++ b/patch/int3472-support-independent-clock-and-LED-gpios-5.17+.patch
221
221
-
@@ -65,7 +65,7 @@ index ed4c9d760757..f5857ec334fa 100644
222
222
-
case INT3472_GPIO_TYPE_RESET:
223
223
-
ret = skl_int3472_map_gpio_to_sensor(int3472, agpio, "reset",
224
224
-
- GPIO_ACTIVE_LOW);
225
225
-
-+ polarity);
226
226
-
++ polarity ^ GPIO_ACTIVE_LOW);
227
227
-
if (ret)
228
228
-
err_msg = "Failed to map reset pin to sensor\n";
229
229
-
230
230
-
@@ -73,7 +73,7 @@ index ed4c9d760757..f5857ec334fa 100644
231
231
-
case INT3472_GPIO_TYPE_POWERDOWN:
232
232
-
ret = skl_int3472_map_gpio_to_sensor(int3472, agpio, "powerdown",
233
233
-
- GPIO_ACTIVE_LOW);
234
234
-
-+ polarity);
235
235
-
++ polarity ^ GPIO_ACTIVE_LOW);
236
236
-
if (ret)
237
237
-
err_msg = "Failed to map powerdown pin to sensor\n";
238
238
-
239
239
-
diff --git a/patch/int3472-support-independent-clock-and-LED-gpios.patch b/patch/int3472-support-independent-clock-and-LED-gpios.patch
240
240
-
index a2def0d76852..df70ce4a7117 100644
241
241
-
--- a/patch/int3472-support-independent-clock-and-LED-gpios.patch
242
242
-
+++ b/patch/int3472-support-independent-clock-and-LED-gpios.patch
243
243
-
@@ -65,7 +65,7 @@ index e59d79c7e82f..5cf6dd63d43f 100644
244
244
-
case INT3472_GPIO_TYPE_RESET:
245
245
-
ret = skl_int3472_map_gpio_to_sensor(int3472, agpio, "reset",
246
246
-
- GPIO_ACTIVE_LOW);
247
247
-
-+ polarity);
248
248
-
++ polarity ^ GPIO_ACTIVE_LOW);
249
249
-
if (ret)
250
250
-
err_msg = "Failed to map reset pin to sensor\n";
251
251
-
252
252
-
@@ -73,7 +73,7 @@ index e59d79c7e82f..5cf6dd63d43f 100644
253
253
-
case INT3472_GPIO_TYPE_POWERDOWN:
254
254
-
ret = skl_int3472_map_gpio_to_sensor(int3472, agpio, "powerdown",
255
255
-
- GPIO_ACTIVE_LOW);
256
256
-
-+ polarity);
257
257
-
++ polarity ^ GPIO_ACTIVE_LOW);
258
258
-
if (ret)
259
259
-
err_msg = "Failed to map powerdown pin to sensor\n";
260
260
-
261
261
-
262
262
-
From 90d4b2d9cb07292c6a2580572252938a836f4a86 Mon Sep 17 00:00:00 2001
263
263
-
From: Hans de Goede <hdegoede@redhat.com>
264
264
-
Date: Thu, 15 Dec 2022 16:00:31 +0100
265
265
-
Subject: [PATCH 3/4] sensors: Make "pled" GPIO optional
266
266
-
267
267
-
Starting with kernel 6.3 the mainline int3472 driver models the privacy
268
268
-
LED device as a LED class device rather then as a GPIO.
269
269
-
270
270
-
As part of these changed the v4l2-core subdev code in 6.3 turns
271
271
-
the LED on/off on s_stream() on/off calls on the sensor v4l2-subdev,
272
272
-
so sensor drivers don't have to take care of this themselves.
273
273
-
274
274
-
Change the devm_gpiod_get() calls for the "pled" GPIO into
275
275
-
devm_gpiod_get_optional() calls so that the sensor drivers
276
276
-
can work with both older kernel (controlling the GPIO) and
277
277
-
with newer kernels which don't have a "pled" GPIO.
278
278
-
279
279
-
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
280
280
-
---
281
281
-
drivers/media/i2c/hm11b1.c | 2 +-
282
282
-
drivers/media/i2c/ov01a1s.c | 2 +-
283
283
-
drivers/media/i2c/ov2740.c | 4 +---
284
284
-
3 files changed, 3 insertions(+), 5 deletions(-)
285
285
-
286
286
-
diff --git a/drivers/media/i2c/hm11b1.c b/drivers/media/i2c/hm11b1.c
287
287
-
index 652e8f177044..6257f7987268 100644
288
288
-
--- a/drivers/media/i2c/hm11b1.c
289
289
-
+++ b/drivers/media/i2c/hm11b1.c
290
290
-
@@ -1118,7 +1118,7 @@ static int hm11b1_parse_dt(struct hm11b1 *hm11b1)
291
291
-
return dev_err_probe(dev, PTR_ERR(hm11b1->clk), "getting clk\n");
292
292
-
#endif
293
293
-
294
294
-
- hm11b1->pled_gpio = devm_gpiod_get(dev, "pled", GPIOD_OUT_HIGH);
295
295
-
+ hm11b1->pled_gpio = devm_gpiod_get_optional(dev, "pled", GPIOD_OUT_HIGH);
296
296
-
ret = PTR_ERR_OR_ZERO(hm11b1->pled_gpio);
297
297
-
if (ret < 0) {
298
298
-
dev_err(dev, "error while getting pled gpio: %d\n", ret);
299
299
-
diff --git a/drivers/media/i2c/ov01a1s.c b/drivers/media/i2c/ov01a1s.c
300
300
-
index 2ce81d04abf6..1bc6199713f3 100644
301
301
-
--- a/drivers/media/i2c/ov01a1s.c
302
302
-
+++ b/drivers/media/i2c/ov01a1s.c
303
303
-
@@ -970,7 +970,7 @@ static int ov01a1s_parse_dt(struct ov01a1s *ov01a1s)
304
304
-
return dev_err_probe(dev, PTR_ERR(ov01a1s->clk), "getting clk\n");
305
305
-
#endif
306
306
-
307
307
-
- ov01a1s->pled_gpio = devm_gpiod_get(dev, "pled", GPIOD_OUT_HIGH);
308
308
-
+ ov01a1s->pled_gpio = devm_gpiod_get_optional(dev, "pled", GPIOD_OUT_HIGH);
309
309
-
ret = PTR_ERR_OR_ZERO(ov01a1s->pled_gpio);
310
310
-
if (ret < 0) {
311
311
-
dev_err(dev, "error while getting pled gpio: %d\n", ret);
312
312
-
diff --git a/drivers/media/i2c/ov2740.c b/drivers/media/i2c/ov2740.c
313
313
-
index a8bb101776bd..08f284d4aca1 100644
314
314
-
--- a/drivers/media/i2c/ov2740.c
315
315
-
+++ b/drivers/media/i2c/ov2740.c
316
316
-
@@ -594,8 +594,6 @@ static u64 to_pixels_per_line(u32 hts, u32 f_index)
317
317
-
318
318
-
static void ov2740_set_power(struct ov2740 *ov2740, int on)
319
319
-
{
320
320
-
- if (!(ov2740->reset_gpio && ov2740->pled_gpio))
321
321
-
- return;
322
322
-
gpiod_set_value_cansleep(ov2740->reset_gpio, !on);
323
323
-
gpiod_set_value_cansleep(ov2740->pled_gpio, on);
324
324
-
msleep(20);
325
325
-
@@ -633,7 +631,7 @@ static int ov2740_parse_dt(struct ov2740 *ov2740)
326
326
-
return ret;
327
327
-
}
328
328
-
329
329
-
- ov2740->pled_gpio = devm_gpiod_get(dev, "pled", GPIOD_OUT_HIGH);
330
330
-
+ ov2740->pled_gpio = devm_gpiod_get_optional(dev, "pled", GPIOD_OUT_HIGH);
331
331
-
ret = PTR_ERR_OR_ZERO(ov2740->pled_gpio);
332
332
-
if (ret < 0) {
333
333
-
dev_err(dev, "error while getting pled gpio: %d\n", ret);
334
334
-
335
335
-
From 5ed1980822f0cb4787d1346493d126aad1bf9210 Mon Sep 17 00:00:00 2001
336
336
-
From: Hans de Goede <hdegoede@redhat.com>
337
337
-
Date: Tue, 29 Nov 2022 15:15:15 +0100
338
338
-
Subject: [PATCH 4/4] ov01a1s: Drop unused link_freq variable
339
339
-
MIME-Version: 1.0
340
340
-
Content-Type: text/plain; charset=UTF-8
341
341
-
Content-Transfer-Encoding: 8bit
342
342
-
343
343
-
Drop the unused link_freq variable, fixing this compiler warning:
344
344
-
345
345
-
drivers/media/i2c/ov01a1s.c:994:13: warning: unused variable ‘link_freq’ [-Wunused-variable]
346
346
-
994 | s64 link_freq;
347
347
-
| ^~~~~~~~~
348
348
-
349
349
-
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
350
350
-
---
351
351
-
drivers/media/i2c/ov01a1s.c | 1 -
352
352
-
1 file changed, 1 deletion(-)
353
353
-
354
354
-
diff --git a/drivers/media/i2c/ov01a1s.c b/drivers/media/i2c/ov01a1s.c
355
355
-
index 1bc6199713f3..ab4ff255d4c1 100644
356
356
-
--- a/drivers/media/i2c/ov01a1s.c
357
357
-
+++ b/drivers/media/i2c/ov01a1s.c
358
358
-
@@ -988,7 +988,6 @@ static int ov01a1s_probe(struct i2c_client *client)
359
359
-
#if IS_ENABLED(CONFIG_INTEL_VSC)
360
360
-
struct vsc_mipi_config conf;
361
361
-
struct vsc_camera_status status;
362
362
-
- s64 link_freq;
363
363
-
#endif
364
364
-
365
365
-
ov01a1s = devm_kzalloc(&client->dev, sizeof(*ov01a1s), GFP_KERNEL);