-
Notifications
You must be signed in to change notification settings - Fork 5.2k
mfd: Add Raspberry Pi Sense HAT core driver #1043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
goto err_keys_alloc; | ||
} | ||
|
||
rpisense_js->keys_desc = gpiod_get(rpisense->dev, "keys-int", GPIOD_IN); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use the managed version (devm_gpiod_get) then you don't need to call gpiod_put.
Can you add an entry to the overlays/README file? |
I guess I shouldn't squash the changes until you and Dom are okay to merge it, to keep the changes easier to track |
I think at this stage it would help if you did squash. Dom hasn't looked at it yet, and it would save time if he just saw the "final" version. |
done |
@notro If you get a chance, would you be willing to take a look at the framebuffer section? The documentation assumes more knowledge of traditional graphics hw than I possess, so there's a lot of guesswork in the code. |
It looks OK to me, apart from the commit message which is enormous. Either rewrite it completely or just add a summary title line, but make sure you put a blank line after the first line. |
diff --git a/drivers/video/fbdev/rpisense-fb.c b/drivers/video/fbdev/rpisense-fb.c
+static void *rvmalloc(unsigned long size)
+{
+ void *mem;
+ unsigned long adr;
+ size = PAGE_ALIGN(size);
+ mem = vmalloc_32(size);
+ if (!mem)
+ return NULL;
+
+ memset(mem, 0, size); /* Clear the ram out, no junk to the user */
+ adr = (unsigned long) mem;
+ while (size > 0) {
+ SetPageReserved(vmalloc_to_page((void *)adr));
+ adr += PAGE_SIZE;
+ size -= PAGE_SIZE;
+ }
+
+ return mem;
+} I have seen this type of code in out-of-tree fb drivers, but not in mainline. |
@XECDesign Some kernel coding style issues you might wanna look into: https://gist.github.com/notro/c73b9342e52f89494311 |
Ah, didn't know about checkpatch script. Thanks. |
fixed |
@pelwell ping - ok to merge? |
Is it picky to ask for the overlay makefile addition to also be in alphabetical order, like the others? |
Done |
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
See: raspberrypi/linux#1043 kernel: config: Enable SHT drivers for raspberry pi See: raspberrypi/linux#1062 kernel: leds-gpio: Implement the brightness_get method See: raspberrypi/linux#1064 kernel: config: Add SND_SOC_ADAU1701 module See: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=113753 kernel: BCM2835-V4L2: Return buffers to videobuf2 on shutdown See: raspberrypi/linux#817 firmware: di_adv: Fix up top and bottom lines See: http://forum.kodi.tv/showthread.php?tid=231092&pid=2053103#pid2053103 firmware: arm_loader: Set uart0_clkrate DT param from init_uart_clock See: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=113753
See: raspberrypi/linux#1043 kernel: config: Enable SHT drivers for raspberry pi See: raspberrypi/linux#1062 kernel: leds-gpio: Implement the brightness_get method See: raspberrypi/linux#1064 kernel: config: Add SND_SOC_ADAU1701 module See: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=113753 kernel: BCM2835-V4L2: Return buffers to videobuf2 on shutdown See: raspberrypi/linux#817 firmware: di_adv: Fix up top and bottom lines See: http://forum.kodi.tv/showthread.php?tid=231092&pid=2053103#pid2053103 firmware: arm_loader: Set uart0_clkrate DT param from init_uart_clock See: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=113753
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
mfd: Add Raspberry Pi Sense HAT core driver
See: raspberrypi/linux#1043 kernel: config: Enable SHT drivers for raspberry pi See: raspberrypi/linux#1062 kernel: leds-gpio: Implement the brightness_get method See: raspberrypi/linux#1064 kernel: config: Add SND_SOC_ADAU1701 module See: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=113753 kernel: BCM2835-V4L2: Return buffers to videobuf2 on shutdown See: raspberrypi/linux#817 firmware: di_adv: Fix up top and bottom lines See: http://forum.kodi.tv/showthread.php?tid=231092&pid=2053103#pid2053103 firmware: arm_loader: Set uart0_clkrate DT param from init_uart_clock See: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=113753
joystick: Add Raspberry Pi Sense HAT joystick driver
fbdev: Add Raspberry Pi Sense HAT framebuffer driver
configs: Enable Raspberry Pi Sense HAT modules
overlays: Provide a Raspberry Pi Sense HAT overlay for older Raspberry Pi models