linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Charles Mirabile <cmirabil@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Charles Mirabile <cmirabil@redhat.com>,
	Serge Schneider <serge@raspberrypi.org>,
	Stefan Wahren <stefan.wahren@i2se.com>,
	Nicolas Saenz Julienne <nsaenzju@redhat.com>,
	Mattias Brugger <mbrugger@suse.com>,
	linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	fedora-rpi@googlegroups.com
Subject: [PATCH 0/6] Raspberry Pi Sense HAT driver
Date: Wed,  2 Feb 2022 19:25:15 -0500	[thread overview]
Message-ID: <20220203002521.162878-1-cmirabil@redhat.com> (raw)

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 communicate 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/

Improvements since v5:
	- The sensehat core driver has been removed and its functionality
	  is now performed by simply adding the sensehat compatible string
	  to the simple_mfd_i2c driver.
	- the subdrivers now read information about their SMB registers and
	  irqs from their own device tree meaning that these values are now
	  configurable and no longer hard coded into the driver.
	- As a result of removing the core driver and making each subdriver
	  handle its own internal data itself, the drivers have finally become
	  completely independent and so now it is finally truly possible to
	  use more than one sensehat or more than one of its sub components
	  in theory. (though in practice this would require modifying the
	  firmware on the board).

Fixes since v5:
	- the joystick has been changed to use BTN_DPAD and BTN_SELECT
	  instead of the arrow keys and enter, and lots of small issues
	  with the joystick code have been fixed (thanks to Dmitry
	  Torokhov for these suggestions)
	- all forward declarations have been removed from the driver
	  (thanks to Miguel Ojeda and Stefan Wahren for this suggestion)
	- the userspace interface of the display driver has been changed to
	  remove the need to process and copy the data as much before it can
	  be sent to the device. (thanks to Matthias Brugger for this
	  suggestion)
	- fixed issue with interrupt parent property in device tree binding
	  (thanks to Rob Herring for this suggestion)

charliemirabile (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         |  32 +++
 .../input/raspberrypi,sensehat-joystick.yaml  |  37 +++
 .../bindings/mfd/raspberrypi,sensehat.yaml    |  68 +++++
 MAINTAINERS                                   |  12 +
 drivers/auxdisplay/Kconfig                    |   8 +
 drivers/auxdisplay/Makefile                   |   1 +
 drivers/auxdisplay/sensehat-display.c         | 264 ++++++++++++++++++
 drivers/input/joystick/Kconfig                |  11 +
 drivers/input/joystick/Makefile               |   1 +
 drivers/input/joystick/sensehat-joystick.c    | 128 +++++++++
 drivers/mfd/simple-mfd-i2c.c                  |   1 +
 include/uapi/linux/sensehat.h                 |  28 ++
 sensehat.dtbs                                 |  56 ++++
 13 files changed, 647 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 include/uapi/linux/sensehat.h
 create mode 100644 sensehat.dtbs

-- 
2.31.1


             reply	other threads:[~2022-02-03  0:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03  0:25 Charles Mirabile [this message]
2022-02-03  0:25 ` [PATCH 1/6] drivers/mfd: sensehat: Add Raspberry Pi Sense HAT to simple_mfd_i2c Charles Mirabile
2022-02-08 11:23   ` Nicolas Saenz Julienne
2022-02-03  0:25 ` [PATCH 2/6] drivers/input/joystick: sensehat: Raspberry Pi Sense HAT joystick driver Charles Mirabile
2022-02-08 11:44   ` Nicolas Saenz Julienne
2022-02-03  0:25 ` [PATCH 3/6] drivers/auxdisplay: sensehat: Raspberry Pi Sense HAT display driver Charles Mirabile
2022-02-08 12:36   ` Nicolas Saenz Julienne
2022-02-08 14:00   ` Miguel Ojeda
2022-02-03  0:25 ` [PATCH 4/6] dt-bindings: mfd: sensehat: Add Raspberry Pi Sense HAT schema Charles Mirabile
2022-02-03 13:50   ` Rob Herring
2022-02-03  0:25 ` [PATCH 5/6] MAINTAINERS: Add sensehat driver authors to MAINTAINERS Charles Mirabile
2022-02-03  0:25 ` [PATCH 6/6] DO NOT MERGE: full sensehat device tree overlay for raspberry pi 4 Charles Mirabile

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220203002521.162878-1-cmirabil@redhat.com \
    --to=cmirabil@redhat.com \
    --cc=fedora-rpi@googlegroups.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=mbrugger@suse.com \
    --cc=nsaenzju@redhat.com \
    --cc=serge@raspberrypi.org \
    --cc=stefan.wahren@i2se.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).