]> git.ipfire.org Git - thirdparty/openwrt.git/blob
714123d3ded3130ee0fc0df70ef52543678dd018
[thirdparty/openwrt.git] /
1 From 9fb57f6b8920a8aceb74ceb3e171a7e5769205a5 Mon Sep 17 00:00:00 2001
2 From: Dom Cobley <popcornmix@gmail.com>
3 Date: Thu, 10 Oct 2024 17:18:39 +0100
4 Subject: [PATCH 1313/1350] Reapply "drivers: Remove downstream SenseHAT core
5 and joystick drivers"
6
7 This reverts commit e6493e2d6a1f572fbb4a1d724e54715cb748b424.
8 ---
9 drivers/input/joystick/Kconfig | 8 --
10 drivers/input/joystick/Makefile | 1 -
11 drivers/input/joystick/rpisense-js.c | 153 ---------------------
12 drivers/mfd/Kconfig | 8 --
13 drivers/mfd/Makefile | 1 -
14 drivers/mfd/rpisense-core.c | 163 -----------------------
15 drivers/video/fbdev/Kconfig | 4 +-
16 drivers/video/fbdev/rpisense-fb.c | 53 ++++----
17 include/linux/mfd/rpisense/core.h | 47 -------
18 include/linux/mfd/rpisense/framebuffer.h | 5 +-
19 10 files changed, 32 insertions(+), 411 deletions(-)
20 delete mode 100644 drivers/input/joystick/rpisense-js.c
21 delete mode 100644 drivers/mfd/rpisense-core.c
22 delete mode 100644 include/linux/mfd/rpisense/core.h
23
24 --- a/drivers/input/joystick/Kconfig
25 +++ b/drivers/input/joystick/Kconfig
26 @@ -412,12 +412,4 @@ config JOYSTICK_SENSEHAT
27 To compile this driver as a module, choose M here: the
28 module will be called sensehat_joystick.
29
30 -config JOYSTICK_RPISENSE
31 - tristate "Raspberry Pi Sense HAT joystick"
32 - depends on GPIOLIB && INPUT
33 - select MFD_RPISENSE_CORE
34 -
35 - help
36 - This is the joystick driver for the Raspberry Pi Sense HAT
37 -
38 endif
39 --- a/drivers/input/joystick/Makefile
40 +++ b/drivers/input/joystick/Makefile
41 @@ -40,4 +40,3 @@ obj-$(CONFIG_JOYSTICK_WARRIOR) += warri
42 obj-$(CONFIG_JOYSTICK_WALKERA0701) += walkera0701.o
43 obj-$(CONFIG_JOYSTICK_XPAD) += xpad.o
44 obj-$(CONFIG_JOYSTICK_ZHENHUA) += zhenhua.o
45 -obj-$(CONFIG_JOYSTICK_RPISENSE) += rpisense-js.o
46 --- a/drivers/input/joystick/rpisense-js.c
47 +++ /dev/null
48 @@ -1,153 +0,0 @@
49 -/*
50 - * Raspberry Pi Sense HAT joystick driver
51 - * http://raspberrypi.org
52 - *
53 - * Copyright (C) 2015 Raspberry Pi
54 - *
55 - * Author: Serge Schneider
56 - *
57 - * This program is free software; you can redistribute it and/or modify it
58 - * under the terms of the GNU General Public License as published by the
59 - * Free Software Foundation; either version 2 of the License, or (at your
60 - * option) any later version.
61 - *
62 - */
63 -
64 -#include <linux/module.h>
65 -
66 -#include <linux/mfd/rpisense/joystick.h>
67 -#include <linux/mfd/rpisense/core.h>
68 -
69 -static struct rpisense *rpisense;
70 -static unsigned char keymap[5] = {KEY_DOWN, KEY_RIGHT, KEY_UP, KEY_ENTER, KEY_LEFT,};
71 -
72 -static void keys_work_fn(struct work_struct *work)
73 -{
74 - int i;
75 - static s32 prev_keys;
76 - struct rpisense_js *rpisense_js = &rpisense->joystick;
77 - s32 keys = rpisense_reg_read(rpisense, RPISENSE_KEYS);
78 - s32 changes = keys ^ prev_keys;
79 -
80 - prev_keys = keys;
81 - for (i = 0; i < 5; i++) {
82 - if (changes & 1) {
83 - input_report_key(rpisense_js->keys_dev,
84 - keymap[i], keys & 1);
85 - }
86 - changes >>= 1;
87 - keys >>= 1;
88 - }
89 - input_sync(rpisense_js->keys_dev);
90 -}
91 -
92 -static irqreturn_t keys_irq_handler(int irq, void *pdev)
93 -{
94 - struct rpisense_js *rpisense_js = &rpisense->joystick;
95 -
96 - schedule_work(&rpisense_js->keys_work_s);
97 - return IRQ_HANDLED;
98 -}
99 -
100 -static int rpisense_js_probe(struct platform_device *pdev)
101 -{
102 - int ret;
103 - int i;
104 - struct rpisense_js *rpisense_js;
105 -
106 - rpisense = rpisense_get_dev();
107 - rpisense_js = &rpisense->joystick;
108 -
109 - INIT_WORK(&rpisense_js->keys_work_s, keys_work_fn);
110 -
111 - rpisense_js->keys_dev = input_allocate_device();
112 - if (!rpisense_js->keys_dev) {
113 - dev_err(&pdev->dev, "Could not allocate input device.\n");
114 - return -ENOMEM;
115 - }
116 -
117 - rpisense_js->keys_dev->evbit[0] = BIT_MASK(EV_KEY);
118 - for (i = 0; i < ARRAY_SIZE(keymap); i++) {
119 - set_bit(keymap[i],
120 - rpisense_js->keys_dev->keybit);
121 - }
122 -
123 - rpisense_js->keys_dev->name = "Raspberry Pi Sense HAT Joystick";
124 - rpisense_js->keys_dev->phys = "rpi-sense-joy/input0";
125 - rpisense_js->keys_dev->id.bustype = BUS_I2C;
126 - rpisense_js->keys_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP);
127 - rpisense_js->keys_dev->keycode = keymap;
128 - rpisense_js->keys_dev->keycodesize = sizeof(unsigned char);
129 - rpisense_js->keys_dev->keycodemax = ARRAY_SIZE(keymap);
130 -
131 - ret = input_register_device(rpisense_js->keys_dev);
132 - if (ret) {
133 - dev_err(&pdev->dev, "Could not register input device.\n");
134 - goto err_keys_alloc;
135 - }
136 -
137 - ret = gpiod_direction_input(rpisense_js->keys_desc);
138 - if (ret) {
139 - dev_err(&pdev->dev, "Could not set keys-int direction.\n");
140 - goto err_keys_reg;
141 - }
142 -
143 - rpisense_js->keys_irq = gpiod_to_irq(rpisense_js->keys_desc);
144 - if (rpisense_js->keys_irq < 0) {
145 - dev_err(&pdev->dev, "Could not determine keys-int IRQ.\n");
146 - ret = rpisense_js->keys_irq;
147 - goto err_keys_reg;
148 - }
149 -
150 - ret = devm_request_irq(&pdev->dev, rpisense_js->keys_irq,
151 - keys_irq_handler, IRQF_TRIGGER_RISING,
152 - "keys", &pdev->dev);
153 - if (ret) {
154 - dev_err(&pdev->dev, "IRQ request failed.\n");
155 - goto err_keys_reg;
156 - }
157 - return 0;
158 -err_keys_reg:
159 - input_unregister_device(rpisense_js->keys_dev);
160 -err_keys_alloc:
161 - input_free_device(rpisense_js->keys_dev);
162 - return ret;
163 -}
164 -
165 -static int rpisense_js_remove(struct platform_device *pdev)
166 -{
167 - struct rpisense_js *rpisense_js = &rpisense->joystick;
168 -
169 - input_unregister_device(rpisense_js->keys_dev);
170 - input_free_device(rpisense_js->keys_dev);
171 - return 0;
172 -}
173 -
174 -#ifdef CONFIG_OF
175 -static const struct of_device_id rpisense_js_id[] = {
176 - { .compatible = "rpi,rpi-sense-js" },
177 - { },
178 -};
179 -MODULE_DEVICE_TABLE(of, rpisense_js_id);
180 -#endif
181 -
182 -static struct platform_device_id rpisense_js_device_id[] = {
183 - { .name = "rpi-sense-js" },
184 - { },
185 -};
186 -MODULE_DEVICE_TABLE(platform, rpisense_js_device_id);
187 -
188 -static struct platform_driver rpisense_js_driver = {
189 - .probe = rpisense_js_probe,
190 - .remove = rpisense_js_remove,
191 - .driver = {
192 - .name = "rpi-sense-js",
193 - .owner = THIS_MODULE,
194 - },
195 -};
196 -
197 -module_platform_driver(rpisense_js_driver);
198 -
199 -MODULE_DESCRIPTION("Raspberry Pi Sense HAT joystick driver");
200 -MODULE_AUTHOR("Serge Schneider <serge@raspberrypi.org>");
201 -MODULE_LICENSE("GPL");
202 --- a/drivers/mfd/Kconfig
203 +++ b/drivers/mfd/Kconfig
204 @@ -11,14 +11,6 @@ config MFD_CORE
205 select IRQ_DOMAIN
206 default n
207
208 -config MFD_RPISENSE_CORE
209 - tristate "Raspberry Pi Sense HAT core functions"
210 - depends on I2C
211 - select MFD_CORE
212 - help
213 - This is the core driver for the Raspberry Pi Sense HAT. This provides
214 - the necessary functions to communicate with the hardware.
215 -
216 config MFD_CS5535
217 tristate "AMD CS5535 and CS5536 southbridge core functions"
218 select MFD_CORE
219 --- a/drivers/mfd/Makefile
220 +++ b/drivers/mfd/Makefile
221 @@ -268,7 +268,6 @@ obj-$(CONFIG_MFD_STMFX) += stmfx.o
222 obj-$(CONFIG_MFD_KHADAS_MCU) += khadas-mcu.o
223 obj-$(CONFIG_MFD_ACER_A500_EC) += acer-ec-a500.o
224 obj-$(CONFIG_MFD_QCOM_PM8008) += qcom-pm8008.o
225 -obj-$(CONFIG_MFD_RPISENSE_CORE) += rpisense-core.o
226
227 obj-$(CONFIG_SGI_MFD_IOC3) += ioc3.o
228 obj-$(CONFIG_MFD_SIMPLE_MFD_I2C) += simple-mfd-i2c.o
229 --- a/drivers/mfd/rpisense-core.c
230 +++ /dev/null
231 @@ -1,163 +0,0 @@
232 -/*
233 - * Raspberry Pi Sense HAT core driver
234 - * http://raspberrypi.org
235 - *
236 - * Copyright (C) 2015 Raspberry Pi
237 - *
238 - * Author: Serge Schneider
239 - *
240 - * This program is free software; you can redistribute it and/or modify it
241 - * under the terms of the GNU General Public License as published by the
242 - * Free Software Foundation; either version 2 of the License, or (at your
243 - * option) any later version.
244 - *
245 - * This driver is based on wm8350 implementation.
246 - */
247 -
248 -#include <linux/module.h>
249 -#include <linux/moduleparam.h>
250 -#include <linux/err.h>
251 -#include <linux/init.h>
252 -#include <linux/i2c.h>
253 -#include <linux/platform_device.h>
254 -#include <linux/mfd/rpisense/core.h>
255 -#include <linux/slab.h>
256 -
257 -static struct rpisense *rpisense;
258 -
259 -static void rpisense_client_dev_register(struct rpisense *rpisense,
260 - const char *name,
261 - struct platform_device **pdev)
262 -{
263 - int ret;
264 -
265 - *pdev = platform_device_alloc(name, -1);
266 - if (*pdev == NULL) {
267 - dev_err(rpisense->dev, "Failed to allocate %s\n", name);
268 - return;
269 - }
270 -
271 - (*pdev)->dev.parent = rpisense->dev;
272 - platform_set_drvdata(*pdev, rpisense);
273 - ret = platform_device_add(*pdev);
274 - if (ret != 0) {
275 - dev_err(rpisense->dev, "Failed to register %s: %d\n",
276 - name, ret);
277 - platform_device_put(*pdev);
278 - *pdev = NULL;
279 - }
280 -}
281 -
282 -static int rpisense_probe(struct i2c_client *i2c)
283 -{
284 - int ret;
285 - struct rpisense_js *rpisense_js;
286 -
287 - rpisense = devm_kzalloc(&i2c->dev, sizeof(struct rpisense), GFP_KERNEL);
288 - if (rpisense == NULL)
289 - return -ENOMEM;
290 -
291 - i2c_set_clientdata(i2c, rpisense);
292 - rpisense->dev = &i2c->dev;
293 - rpisense->i2c_client = i2c;
294 -
295 - ret = rpisense_reg_read(rpisense, RPISENSE_WAI);
296 - if (ret > 0) {
297 - if (ret != 's')
298 - return -EINVAL;
299 - } else {
300 - return ret;
301 - }
302 - ret = rpisense_reg_read(rpisense, RPISENSE_VER);
303 - if (ret < 0)
304 - return ret;
305 -
306 - dev_info(rpisense->dev,
307 - "Raspberry Pi Sense HAT firmware version %i\n", ret);
308 -
309 - rpisense_js = &rpisense->joystick;
310 - rpisense_js->keys_desc = devm_gpiod_get(&i2c->dev,
311 - "keys-int", GPIOD_IN);
312 - if (IS_ERR(rpisense_js->keys_desc)) {
313 - dev_warn(&i2c->dev, "Failed to get keys-int descriptor.\n");
314 - rpisense_js->keys_desc = gpio_to_desc(23);
315 - if (rpisense_js->keys_desc == NULL) {
316 - dev_err(&i2c->dev, "GPIO23 fallback failed.\n");
317 - return PTR_ERR(rpisense_js->keys_desc);
318 - }
319 - }
320 - rpisense_client_dev_register(rpisense, "rpi-sense-js",
321 - &(rpisense->joystick.pdev));
322 - rpisense_client_dev_register(rpisense, "rpi-sense-fb",
323 - &(rpisense->framebuffer.pdev));
324 -
325 - return 0;
326 -}
327 -
328 -static void rpisense_remove(struct i2c_client *i2c)
329 -{
330 - struct rpisense *rpisense = i2c_get_clientdata(i2c);
331 -
332 - platform_device_unregister(rpisense->joystick.pdev);
333 -}
334 -
335 -struct rpisense *rpisense_get_dev(void)
336 -{
337 - return rpisense;
338 -}
339 -EXPORT_SYMBOL_GPL(rpisense_get_dev);
340 -
341 -s32 rpisense_reg_read(struct rpisense *rpisense, int reg)
342 -{
343 - int ret = i2c_smbus_read_byte_data(rpisense->i2c_client, reg);
344 -
345 - if (ret < 0)
346 - dev_err(rpisense->dev, "Read from reg %d failed\n", reg);
347 - /* Due to the BCM270x I2C clock stretching bug, some values
348 - * may have MSB set. Clear it to avoid incorrect values.
349 - * */
350 - return ret & 0x7F;
351 -}
352 -EXPORT_SYMBOL_GPL(rpisense_reg_read);
353 -
354 -int rpisense_block_write(struct rpisense *rpisense, const char *buf, int count)
355 -{
356 - int ret = i2c_master_send(rpisense->i2c_client, buf, count);
357 -
358 - if (ret < 0)
359 - dev_err(rpisense->dev, "Block write failed\n");
360 - return ret;
361 -}
362 -EXPORT_SYMBOL_GPL(rpisense_block_write);
363 -
364 -static const struct i2c_device_id rpisense_i2c_id[] = {
365 - { "rpi-sense", 0 },
366 - { }
367 -};
368 -MODULE_DEVICE_TABLE(i2c, rpisense_i2c_id);
369 -
370 -#ifdef CONFIG_OF
371 -static const struct of_device_id rpisense_core_id[] = {
372 - { .compatible = "rpi,rpi-sense" },
373 - { },
374 -};
375 -MODULE_DEVICE_TABLE(of, rpisense_core_id);
376 -#endif
377 -
378 -
379 -static struct i2c_driver rpisense_driver = {
380 - .driver = {
381 - .name = "rpi-sense",
382 - .owner = THIS_MODULE,
383 - },
384 - .probe = rpisense_probe,
385 - .remove = rpisense_remove,
386 - .id_table = rpisense_i2c_id,
387 -};
388 -
389 -module_i2c_driver(rpisense_driver);
390 -
391 -MODULE_DESCRIPTION("Raspberry Pi Sense HAT core driver");
392 -MODULE_AUTHOR("Serge Schneider <serge@raspberrypi.org>");
393 -MODULE_LICENSE("GPL");
394 -
395 --- a/drivers/video/fbdev/Kconfig
396 +++ b/drivers/video/fbdev/Kconfig
397 @@ -1967,8 +1967,8 @@ config FB_SM712
398
399 config FB_RPISENSE
400 tristate "Raspberry Pi Sense HAT framebuffer"
401 - depends on FB
402 - select MFD_RPISENSE_CORE
403 + depends on FB && I2C
404 + select MFD_SIMPLE_MFD_I2C
405 select FB_SYS_FOPS
406 select FB_SYS_FILLRECT
407 select FB_SYS_COPYAREA
408 --- a/drivers/video/fbdev/rpisense-fb.c
409 +++ b/drivers/video/fbdev/rpisense-fb.c
410 @@ -23,16 +23,14 @@
411 #include <linux/delay.h>
412 #include <linux/fb.h>
413 #include <linux/init.h>
414 +#include <linux/platform_device.h>
415
416 #include <linux/mfd/rpisense/framebuffer.h>
417 -#include <linux/mfd/rpisense/core.h>
418
419 static bool lowlight;
420 module_param(lowlight, bool, 0);
421 MODULE_PARM_DESC(lowlight, "Reduce LED matrix brightness to one third");
422
423 -static struct rpisense *rpisense;
424 -
425 struct rpisense_fb_param {
426 char __iomem *vmem;
427 u8 *vmem_work;
428 @@ -116,26 +114,26 @@ static void rpisense_fb_imageblit(struct
429 }
430
431 static void rpisense_fb_deferred_io(struct fb_info *info,
432 - struct list_head *pagelist)
433 + struct list_head *pagelist)
434 {
435 int i;
436 int j;
437 u8 *vmem_work = rpisense_fb_param.vmem_work;
438 u16 *mem = (u16 *)rpisense_fb_param.vmem;
439 u8 *gamma = rpisense_fb_param.gamma;
440 + struct rpisense_fb *rpisense_fb = info->par;
441
442 - vmem_work[0] = 0;
443 for (j = 0; j < 8; j++) {
444 for (i = 0; i < 8; i++) {
445 - vmem_work[(j * 24) + i + 1] =
446 + vmem_work[(j * 24) + i] =
447 gamma[(mem[(j * 8) + i] >> 11) & 0x1F];
448 - vmem_work[(j * 24) + (i + 8) + 1] =
449 + vmem_work[(j * 24) + (i + 8)] =
450 gamma[(mem[(j * 8) + i] >> 6) & 0x1F];
451 - vmem_work[(j * 24) + (i + 16) + 1] =
452 + vmem_work[(j * 24) + (i + 16)] =
453 gamma[(mem[(j * 8) + i]) & 0x1F];
454 }
455 }
456 - rpisense_block_write(rpisense, vmem_work, 193);
457 + regmap_bulk_write(rpisense_fb->regmap, 0, vmem_work, 192);
458 }
459
460 static struct fb_deferred_io rpisense_fb_defio = {
461 @@ -200,8 +198,22 @@ static int rpisense_fb_probe(struct plat
462 int ret = -ENOMEM;
463 struct rpisense_fb *rpisense_fb;
464
465 - rpisense = rpisense_get_dev();
466 - rpisense_fb = &rpisense->framebuffer;
467 + info = framebuffer_alloc(sizeof(*rpisense_fb), &pdev->dev);
468 + if (!info) {
469 + dev_err(&pdev->dev, "Could not allocate framebuffer.\n");
470 + goto err_malloc;
471 + }
472 +
473 + rpisense_fb = info->par;
474 + platform_set_drvdata(pdev, rpisense_fb);
475 +
476 + rpisense_fb->pdev = pdev;
477 + rpisense_fb->regmap = dev_get_regmap(pdev->dev.parent, NULL);
478 + if (!rpisense_fb->regmap) {
479 + dev_err(&pdev->dev,
480 + "unable to get sensehat regmap");
481 + return -ENODEV;
482 + }
483
484 rpisense_fb_param.vmem = vzalloc(rpisense_fb_param.vmemsize);
485 if (!rpisense_fb_param.vmem)
486 @@ -211,12 +223,6 @@ static int rpisense_fb_probe(struct plat
487 if (!rpisense_fb_param.vmem_work)
488 goto err_malloc;
489
490 - info = framebuffer_alloc(0, &pdev->dev);
491 - if (!info) {
492 - dev_err(&pdev->dev, "Could not allocate framebuffer.\n");
493 - goto err_malloc;
494 - }
495 - rpisense_fb->info = info;
496
497 rpisense_fb_fix.smem_start = (unsigned long)rpisense_fb_param.vmem;
498 rpisense_fb_fix.smem_len = rpisense_fb_param.vmemsize;
499 @@ -253,7 +259,7 @@ err_malloc:
500
501 static int rpisense_fb_remove(struct platform_device *pdev)
502 {
503 - struct rpisense_fb *rpisense_fb = &rpisense->framebuffer;
504 + struct rpisense_fb *rpisense_fb = platform_get_drvdata(pdev);
505 struct fb_info *info = rpisense_fb->info;
506
507 if (info) {
508 @@ -266,19 +272,11 @@ static int rpisense_fb_remove(struct pla
509 return 0;
510 }
511
512 -#ifdef CONFIG_OF
513 static const struct of_device_id rpisense_fb_id[] = {
514 - { .compatible = "rpi,rpi-sense-fb" },
515 + { .compatible = "raspberrypi,rpi-sense-fb" },
516 { },
517 };
518 MODULE_DEVICE_TABLE(of, rpisense_fb_id);
519 -#endif
520 -
521 -static struct platform_device_id rpisense_fb_device_id[] = {
522 - { .name = "rpi-sense-fb" },
523 - { },
524 -};
525 -MODULE_DEVICE_TABLE(platform, rpisense_fb_device_id);
526
527 static struct platform_driver rpisense_fb_driver = {
528 .probe = rpisense_fb_probe,
529 @@ -286,6 +284,7 @@ static struct platform_driver rpisense_f
530 .driver = {
531 .name = "rpi-sense-fb",
532 .owner = THIS_MODULE,
533 + .of_match_table = rpisense_fb_id,
534 },
535 };
536
537 --- a/include/linux/mfd/rpisense/core.h
538 +++ /dev/null
539 @@ -1,47 +0,0 @@
540 -/*
541 - * Raspberry Pi Sense HAT core driver
542 - * http://raspberrypi.org
543 - *
544 - * Copyright (C) 2015 Raspberry Pi
545 - *
546 - * Author: Serge Schneider
547 - *
548 - * This program is free software; you can redistribute it and/or modify it
549 - * under the terms of the GNU General Public License as published by the
550 - * Free Software Foundation; either version 2 of the License, or (at your
551 - * option) any later version.
552 - *
553 - */
554 -
555 -#ifndef __LINUX_MFD_RPISENSE_CORE_H_
556 -#define __LINUX_MFD_RPISENSE_CORE_H_
557 -
558 -#include <linux/mfd/rpisense/joystick.h>
559 -#include <linux/mfd/rpisense/framebuffer.h>
560 -
561 -/*
562 - * Register values.
563 - */
564 -#define RPISENSE_FB 0x00
565 -#define RPISENSE_WAI 0xF0
566 -#define RPISENSE_VER 0xF1
567 -#define RPISENSE_KEYS 0xF2
568 -#define RPISENSE_EE_WP 0xF3
569 -
570 -#define RPISENSE_ID 's'
571 -
572 -struct rpisense {
573 - struct device *dev;
574 - struct i2c_client *i2c_client;
575 -
576 - /* Client devices */
577 - struct rpisense_js joystick;
578 - struct rpisense_fb framebuffer;
579 -};
580 -
581 -struct rpisense *rpisense_get_dev(void);
582 -s32 rpisense_reg_read(struct rpisense *rpisense, int reg);
583 -int rpisense_reg_write(struct rpisense *rpisense, int reg, u16 val);
584 -int rpisense_block_write(struct rpisense *rpisense, const char *buf, int count);
585 -
586 -#endif
587 --- a/include/linux/mfd/rpisense/framebuffer.h
588 +++ b/include/linux/mfd/rpisense/framebuffer.h
589 @@ -16,6 +16,8 @@
590 #ifndef __LINUX_RPISENSE_FB_H_
591 #define __LINUX_RPISENSE_FB_H_
592
593 +#include <linux/regmap.h>
594 +
595 #define SENSEFB_FBIO_IOC_MAGIC 0xF1
596
597 #define SENSEFB_FBIOGET_GAMMA _IO(SENSEFB_FBIO_IOC_MAGIC, 0)
598 @@ -25,8 +27,9 @@
599 struct rpisense;
600
601 struct rpisense_fb {
602 - struct platform_device *pdev;
603 struct fb_info *info;
604 + struct platform_device *pdev;
605 + struct regmap *regmap;
606 };
607
608 #endif