Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1679903pxb; Fri, 20 Aug 2021 11:09:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRRqLE49BJc3LIgwB991jd0ISUAXbi9JJr1JVLGZcSN3QgcZpbFhlzHhh3goBxholZwND7 X-Received: by 2002:a05:6602:3293:: with SMTP id d19mr845603ioz.158.1629482971903; Fri, 20 Aug 2021 11:09:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629482971; cv=none; d=google.com; s=arc-20160816; b=nYjLRV7dOD8fx0FQBcIL3YTX3wavo6T2WIS2iIsywgSpL7m9TKyRTWTkR+52aky+OH gzegACDZ2EUWU4dkoT1zmL2oPaae8Li2FD3d7JugWFx5f+tiODUI2VuMeXNSQx3nYyE8 8FV0UtnW8XIqHdUwIK7aqRfSe2JD3f8sT2sqU1zLCJqhNgMKU/zbEOdF9T+YuCpMZPdG 6V0BHUaqcC8rIO55c8QDwnjAGRAWBsHfNpVqa0JuAE1jq2pIfOUgx9tBXIwZvk1KlrQK 1C2hZdlA3//5L/ZMNElTwdL78Gi45jLfoNYWUVc8sYN1QjXmoGdtquJsdR4140TgAX9V 4/Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=VXoUUvmHBcVRhJY5rRRNheTdgRQ1IG/QNgX7foOSjd8=; b=VZKqPPhXKCXM4JeB6ZJwc83XJpK1FD4b15LWJzGew5Q64L6VjhVQE0CzChBAgFgcuJ zayhK4GgqR30ALLAwlNaMQ8dDZTRp7Nriy7oYgF635jkOxuLmcI0ELJww4Z5U5Na8k3L rMXiDpEnN1XhZwQk6CZXVExGyLhX9cH/S6hTfr5HIHWVAuD48DwpzRx3CQTtVSwIEzhi b4OcclXbhSvnmpDDe+/dyShI0snW1KCtdOx93K3eNrSAscJ4NoodT1ICYOj0UGGIctK6 l5BmaJQywW4JbBc8ac9htAIdXrheokr44ABlqfz1imysjR2vtT1duVCAbtWAL9D/pFG0 txhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hAs2iID7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h14si8326521jav.71.2021.08.20.11.09.19; Fri, 20 Aug 2021 11:09:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hAs2iID7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235726AbhHTSJG (ORCPT + 99 others); Fri, 20 Aug 2021 14:09:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:60998 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230007AbhHTSJB (ORCPT ); Fri, 20 Aug 2021 14:09:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629482903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=VXoUUvmHBcVRhJY5rRRNheTdgRQ1IG/QNgX7foOSjd8=; b=hAs2iID7nu4k1daBTf8Hc8UdwxQJ+hjgzraU/A5jhnO6E9dZTIUZa/D2Beow6uehpx9X9t 3U+FhkvcvTQd+L8gcwy4gG/TpXdcmxdwnvWP2JfWF128EsyFosRRRWqTrES8gwG9O3LD8X mmESAJ79rkeiEqfCQegyMniFmKzkn+w= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-39-A9IuaFUeP4ysxosMvfzblw-1; Fri, 20 Aug 2021 14:08:19 -0400 X-MC-Unique: A9IuaFUeP4ysxosMvfzblw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D4067760C0; Fri, 20 Aug 2021 18:08:17 +0000 (UTC) Received: from cmirabil.remote.csb (unknown [10.22.9.218]) by smtp.corp.redhat.com (Postfix) with ESMTP id 559A05D9D5; Fri, 20 Aug 2021 18:08:16 +0000 (UTC) From: Charles Mirabile To: linux-kernel@vger.kernel.org Cc: Charles Mirabile , Lee Jones , Dmitry Torokhov , linux-input@vger.kernel.org, Miguel Ojeda , Rob Herring , devicetree@vger.kernel.org, Serge Schneider , Stefan Wahren , Nicolas Saenz Julienne , linux-rpi-kernel@lists.infradead.org, fedora-rpi@googlegroups.com, Mwesigwa Guma , Joel Savitz Subject: [RFC PATCH v2 0/4] Raspberry Pi Sense HAT driver Date: Fri, 20 Aug 2021 14:07:57 -0400 Message-Id: <20210820180801.561119-1-cmirabil@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 this repo: https://github.com/underground-software/sensehat/tree/master/tests - color_test displays various solid colors on the LED panel - framebuffer_test diplays a single lit cell that is controllable via the arrow keys or the joystick Known issue: - We are not sure how to integrate the device tree overlay for the Sense HAT into mainline Linux, or if we even should at this time. Fortunately, most Linux distrubtions that can run on the Raspberry Pi already include an appropriate device tree overlay since they often import all of the overlays from the downstream Raspberry Pi kernel. We have included a hypothetical overlay that would work for the sensehat as a fourth patch in this series but we just put it in the root of the source tree for the time being so that patch should not be merged unless a consensus is reached that the overlay should be in the tree, and a proper location is found to put it. Suggestions are welcome and appreciated. For more information about the Sense HAT, visit: https://www.raspberrypi.org/products/sense-hat/ Changes since v1: - We included a device tree overlay for the Sense HAT - Based on Feedback from v1 we: - Changed the style of a few lines - Adding more error logging - Changed the compatible strings to use the more common "raspberrypi" instead of just "rpi" - Renamed everything from rpisense to sensehat Signed-off-by: Charles Mirabile Signed-off-by: Mwesigwa Guma Signed-off-by: Joel Savitz Charles Mirabile (4): Add core driver and config Add joystick driver and config Add display driver and config Add sensehat device tree overlay arch/arm/boot/dts/sensehat.dtbs | 51 +++++ drivers/auxdisplay/Kconfig | 7 + drivers/auxdisplay/Makefile | 1 + drivers/auxdisplay/sensehat-display.c | 234 +++++++++++++++++++++ drivers/input/joystick/Kconfig | 8 + drivers/input/joystick/Makefile | 1 + drivers/input/joystick/sensehat-joystick.c | 124 +++++++++++ drivers/mfd/Kconfig | 8 + drivers/mfd/Makefile | 1 + drivers/mfd/sensehat-core.c | 168 +++++++++++++++ include/linux/mfd/sensehat.h | 55 +++++ 11 files changed, 658 insertions(+) create mode 100644 arch/arm/boot/dts/sensehat.dtbs create mode 100644 drivers/auxdisplay/sensehat-display.c create mode 100644 drivers/input/joystick/sensehat-joystick.c create mode 100644 drivers/mfd/sensehat-core.c create mode 100644 include/linux/mfd/sensehat.h -- 2.27.0