ardangelo / sharp-drm-driver

Linux DRM Driver for 2.7" Sharp Memory LCD
GNU General Public License v2.0
35 stars 18 forks source link

feat: use the gpio descriptor interface #2

Closed imnotjames closed 1 year ago

imnotjames commented 1 year ago

this updates the interactions with gpio pins to use the newer gpio descriptor API in the kernel rather than the deprecated gpio-by-int interface

this means that the gpio pins can be configured as part of the device tree rather than during compile time

Read more about the GPIO Consumer interface here

imnotjames commented 1 year ago

I marked SCS as optional. I've found that it's actively detrimental for getting other boards like the radxa zero that have hardware-supported SPI to work.

But I wonder: Is separate chip select even needed on the pi? Can't the SPI interface driver handle this instead of our display driver?

imnotjames commented 1 year ago

I won't be getting a pi zero for a while so I can't confirm there's any way to skip the CS yet. I'll open for review.

imnotjames commented 1 year ago

Okay, pi zero arrived!

  1. I found that my code had some really simple bugs which I should have caught right away.
  2. I was able to confirm that the SPI chip selection can be handled entirely by the kernel (so we don't need to be doing that)