Skip to content
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

mfd: Add Raspberry Pi Sense HAT core driver #1043

Merged
merged 1 commit into from
Jul 14, 2015
Merged

mfd: Add Raspberry Pi Sense HAT core driver #1043

merged 1 commit into from
Jul 14, 2015

Conversation

XECDesign
Copy link
Contributor

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

goto err_keys_alloc;
}

rpisense_js->keys_desc = gpiod_get(rpisense->dev, "keys-int", GPIOD_IN);
Copy link
Contributor

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.

@pelwell
Copy link
Contributor

pelwell commented Jul 3, 2015

Can you add an entry to the overlays/README file?

@XECDesign
Copy link
Contributor Author

I guess I shouldn't squash the changes until you and Dom are okay to merge it, to keep the changes easier to track

@pelwell
Copy link
Contributor

pelwell commented Jul 3, 2015

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.

@XECDesign
Copy link
Contributor Author

done

@XECDesign
Copy link
Contributor Author

@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.

@pelwell
Copy link
Contributor

pelwell commented Jul 3, 2015

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.

@notro
Copy link
Contributor

notro commented Jul 3, 2015

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.
In my fbtft drivers I just use vzalloc(size) to allocate the framebuffer memory, no SetPageReserved().

@notro
Copy link
Contributor

notro commented Jul 3, 2015

@XECDesign Some kernel coding style issues you might wanna look into: https://gist.github.com/notro/c73b9342e52f89494311

@XECDesign
Copy link
Contributor Author

Ah, didn't know about checkpatch script. Thanks.

@XECDesign
Copy link
Contributor Author

fixed

@P33M
Copy link
Contributor

P33M commented Jul 14, 2015

@pelwell ping - ok to merge?

@pelwell
Copy link
Contributor

pelwell commented Jul 14, 2015

Is it picky to ask for the overlay makefile addition to also be in alphabetical order, like the others?

@XECDesign
Copy link
Contributor Author

Done

pelwell added a commit that referenced this pull request Jul 14, 2015
mfd: Add Raspberry Pi Sense HAT core driver
@pelwell pelwell merged commit e19e6a9 into raspberrypi:rpi-4.0.y Jul 14, 2015
pelwell added a commit that referenced this pull request Jul 15, 2015
mfd: Add Raspberry Pi Sense HAT core driver
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Jul 16, 2015
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
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Jul 16, 2015
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
pelwell added a commit that referenced this pull request Jul 21, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Jul 24, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Jul 27, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Aug 4, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Aug 5, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Aug 17, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Aug 20, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Sep 2, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Sep 14, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Oct 9, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Oct 12, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Oct 19, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Oct 23, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Oct 25, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Oct 25, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Oct 27, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Oct 28, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Nov 2, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Nov 13, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Nov 13, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Nov 13, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Nov 14, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Dec 2, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Dec 8, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Dec 10, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Dec 10, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Dec 13, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Dec 15, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Dec 15, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Dec 15, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Dec 20, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Dec 21, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Dec 21, 2015
mfd: Add Raspberry Pi Sense HAT core driver
pelwell added a commit that referenced this pull request Dec 28, 2015
mfd: Add Raspberry Pi Sense HAT core driver
LongChair pushed a commit to plexinc/OpenELEC.tv that referenced this pull request Dec 30, 2015
pelwell added a commit that referenced this pull request Jan 4, 2016
mfd: Add Raspberry Pi Sense HAT core driver
popcornmix pushed a commit that referenced this pull request Feb 20, 2016
mfd: Add Raspberry Pi Sense HAT core driver
ziggimon pushed a commit to plexinc/OpenELEC.tv that referenced this pull request Mar 2, 2016
neuschaefer pushed a commit to neuschaefer/raspi-binary-firmware that referenced this pull request Feb 27, 2017
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants