linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 0/6] Raspberry Pi Sense HAT driver
@ 2022-03-03 17:39 Charles Mirabile
  2022-03-03 17:39 ` [PATCH v7 1/6] drivers/mfd: sensehat: Add Raspberry Pi Sense HAT to simple_mfd_i2c Charles Mirabile
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Charles Mirabile @ 2022-03-03 17:39 UTC (permalink / raw)
  To: linux-kernel
  Cc: Charles Mirabile, Serge Schneider, Stefan Wahren,
	Nicolas Saenz Julienne, Mattias Brugger, linux-rpi-kernel,
	linux-arm-kernel, fedora-rpi, Daniel Bauman, Mwesigwa Guma,
	Joel Savitz

This patch series adds a set of drivers for operating the Sense HAT
peripheral device. This board is an add on for the Raspberry Pi that is
designed to connect using the GPIO connector and communicates via I2C.

It features:
	- a joystick
	- an 8x8 RGB LED matrix display
	- a whole bunch of environmental sensors with their own drivers
	  (those are already in upstream Linux)

This is a refactor of the work of Serge Schneider, the author of a
version of this driver that is currently in the Raspberry Pi downstream
kernel. We modified his code to make it suitable for upstream Linux.

A couple of tests are available for the driver in the test folder in
this repo: https://github.com/underground-software/sensehat.git
	- sensehat_joystick_test logs the input events from the
	  joystick to the console
	- sensehat_display_test displays various solid colors on
	  the LED panel.
	- full_sensehat_test displays a single lit cell that can be
	  moved with the joystick. Pressing the joystick ends the
	  program.

For more information about the Sense HAT, visit:
https://www.raspberrypi.org/products/sense-hat/

Changes since v6:
	- we store the regmap for the sensehat inside the child structs
	  so that we don't need to look it up every time in the functions
	  that want to use it. Thanks to Nicolás Sáenz for the suggestion.
	- Changed userspace layout of the display driver to rgb565 triples
	  and removed the gamma table lookup and the associated ioctl. If
	  the user wants to recreate linear brightness scaling, they can
	  use a lookup table on their end. Doing this also removes a lot
	  of error checking and general code complexity, so I think removing
	  this feature is actually for the better.
	- Replaced if statement with call to `min_t` function in display
	  read and write functions.
	- Replaced the custom llseek implementation with a call to
	  `fixed_size_llseek`. Thanks to Miguel Ojeda for all of these
	  great suggestions.
	- Fixed issues with the yaml device tree bindings we missed last
	  time due to not having yamllint installed. Thanks for Rob Herring
	  (well his bot on his behalf :^)) for this suggestion.

Co-developed-by: Daniel Bauman <dbauman@redhat.com>
Signed-off-by: Daniel Bauman <dbauman@redhat.com>
Co-developed-by: Mwesigwa Guma <mguma@redhat.com>
Signed-off-by: Mwesigwa Guma <mguma@redhat.com>
Co-developed-by: Joel Savitz <jsavitz@redhat.com>
Signed-off-by: Joel Savitz <jsavitz@redhat.com>
Signed-off-by: Charles Mirabile <cmirabil@redhat.com>

Charles Mirabile (6):
  drivers/mfd: sensehat: Add Raspberry Pi Sense HAT to simple_mfd_i2c
  drivers/input/joystick: sensehat: Raspberry Pi Sense HAT joystick
    driver
  drivers/auxdisplay: sensehat: Raspberry Pi Sense HAT display driver
  dt-bindings: mfd: sensehat: Add Raspberry Pi Sense HAT schema
  MAINTAINERS: Add sensehat driver authors to MAINTAINERS
  DO NOT MERGE: full sensehat device tree overlay for raspberry pi 4

 .../raspberrypi,sensehat-display.yaml         |  27 +++
 .../input/raspberrypi,sensehat-joystick.yaml  |  33 +++
 .../bindings/mfd/raspberrypi,sensehat.yaml    |  69 +++++++
 MAINTAINERS                                   |  11 +
 drivers/auxdisplay/Kconfig                    |   8 +
 drivers/auxdisplay/Makefile                   |   1 +
 drivers/auxdisplay/sensehat-display.c         | 188 ++++++++++++++++++
 drivers/input/joystick/Kconfig                |  11 +
 drivers/input/joystick/Makefile               |   1 +
 drivers/input/joystick/sensehat-joystick.c    | 128 ++++++++++++
 drivers/mfd/simple-mfd-i2c.c                  |   1 +
 sensehat.dtbs                                 |  54 +++++
 12 files changed, 532 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/auxdisplay/raspberrypi,sensehat-display.yaml
 create mode 100644 Documentation/devicetree/bindings/input/raspberrypi,sensehat-joystick.yaml
 create mode 100644 Documentation/devicetree/bindings/mfd/raspberrypi,sensehat.yaml
 create mode 100644 drivers/auxdisplay/sensehat-display.c
 create mode 100644 drivers/input/joystick/sensehat-joystick.c
 create mode 100644 sensehat.dtbs

-- 
2.31.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-03-10  8:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-03 17:39 [PATCH v7 0/6] Raspberry Pi Sense HAT driver Charles Mirabile
2022-03-03 17:39 ` [PATCH v7 1/6] drivers/mfd: sensehat: Add Raspberry Pi Sense HAT to simple_mfd_i2c Charles Mirabile
2022-03-03 17:39 ` [PATCH v7 2/6] drivers/input/joystick: sensehat: Raspberry Pi Sense HAT joystick driver Charles Mirabile
2022-03-03 17:39 ` [PATCH v7 3/6] drivers/auxdisplay: sensehat: Raspberry Pi Sense HAT display driver Charles Mirabile
2022-03-03 20:19   ` Miguel Ojeda
2022-03-03 17:39 ` [PATCH v7 4/6] dt-bindings: mfd: sensehat: Add Raspberry Pi Sense HAT schema Charles Mirabile
2022-03-07 22:52   ` Rob Herring
2022-03-03 17:39 ` [PATCH v7 5/6] MAINTAINERS: Add sensehat driver authors to MAINTAINERS Charles Mirabile
2022-03-03 17:39 ` [PATCH v7 6/6] DO NOT MERGE: full sensehat device tree overlay for raspberry pi 4 Charles Mirabile
2022-03-10  8:53   ` Linus Walleij
2022-03-03 20:20 ` [PATCH v7 0/6] Raspberry Pi Sense HAT driver Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).