Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp1171104pxt; Sat, 7 Aug 2021 02:54:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmaKRiyf7AJQ0jZs/mRfEqu8ZjqLjy2EiZodH0sYDMuWBKArHezhWuj0tKFybKZDePXKGz X-Received: by 2002:a05:6602:1404:: with SMTP id t4mr104997iov.133.1628330063586; Sat, 07 Aug 2021 02:54:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628330063; cv=none; d=google.com; s=arc-20160816; b=ahN06FgJeCCtsVbwyVYOP86zYIJUSqwf2+8q2RIEdR2x0F1hE9FWzichOS3md6ruGj Jr+IOKDc3IFUC4NCVrz46wbIUiWVTYPB2FHRrZIzDoIMsoY+e++SW5d+pgNNC31CrOEM UinsfM0zt0lPyVnBUFktrFU7nQ0VfsO47q8fKf+iHrM28HSBlylNwNYxA7VbsScfWi5d fFNq9soPK6v5B5SHKZf6dl9SPVyachIkXM4vEkj9603/eXn/+rRn0KZCduapBTa5oAg4 RhCTx9ecY6nRW5iPv+9MgoyN84pNb/kNksNpcqM7RYco943L5TcMr/uTOs/59LcpNGAF uWoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:autocrypt:from :references:cc:to:subject; bh=LnNmmn5D4EOEb+FNyQK1kjjFpgg0KiYIjTtsAYgQxW4=; b=brRHFjIqxF0wQkUb7AhJOGpyNiO//MY2fvJS/KUMQ6x7/8Om8EqFOYGXSuFPDoIl8E ErQo8T6ixU5WQpO6SS/aqVeg2wIzgdF6i2uU+VVTtC/imUcaeE6TBAA9rSozQPGmSMey 4oDDlzPPazdCX0CUR0p/MiSHCl88jlbJLOgY18o4sNijdCyhPsrMgK+L0wT2HkfWbY6Y Yhe+bm5pS2RaoGTLqi1dQOZI4EAzf0RE+RYER7fajhsCCbbz7Q9CYVCWIrprADyEA/De VMoKSMVuJUyARhQW8iFmizmLIqcVyhhK61tONJWRUbJqfLLOZ74iNQok2joGzXG0UjPW N3Bw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n16si11028129jap.23.2021.08.07.02.54.12; Sat, 07 Aug 2021 02:54:23 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231685AbhHGJxv convert rfc822-to-8bit (ORCPT + 99 others); Sat, 7 Aug 2021 05:53:51 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:39637 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231608AbhHGJxu (ORCPT ); Sat, 7 Aug 2021 05:53:50 -0400 Received: from [192.168.1.107] ([37.4.249.97]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MwQKr-1n2LuI3f9B-00sKXM; Sat, 07 Aug 2021 11:53:23 +0200 Subject: Re: [RFC PATCH 1/3] drivers/mfd: rpisense: Raspberry Pi senseHAT core driver To: Joel Savitz , linux-kernel@vger.kernel.org Cc: Lee Jones , Nicolas Saenz Julienne , linux-rpi-kernel@lists.infradead.org, fedora-rpi@googlegroups.com, Charles Mirabile , Mwesigwa Guma References: <20210807002722.2634585-1-jsavitz@redhat.com> <20210807002722.2634585-2-jsavitz@redhat.com> From: Stefan Wahren Autocrypt: addr=stefan.wahren@i2se.com; keydata= LS0tLS1CRU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KWTJFTzVKWjhNeGFQSFEw RFQwNWxSRmpLMkFsaGRFSXRqTGpwSjNmVW05c3FMeE1XeHpQNlV6M2lpCjJ1YTR1bnJ0Nk9D VHFRd2lqRi8zYlRXaXd2VkFBSG5NRlVpb1hzaEhhb2hWRGNWZm5lSU1mVjBiUUNYWWkzTnAK WTB2MFp3Y2lGSCtnU0M3cUQ2WE51aHBWR1NMNElpbGlGeS9TemNhSkV6QUhlTERTaFpQMkNX ZG5DNHZnbDM3dApocHg4aDU1WWhKbjZIU3VVelBnaGFLdFZCMmsrajdaZXlaK1NGeHA3SXVi SEN3TEhsUWhUNzVSd1EzaUF4S242CjBxajUxY1lUbnF4ZFpYVzZmSDNQa3VNellVNUdwcVIv MU9sNWMvd2ZJNmc2QW04eUtXLzBFVUx0K0tuNExGc1MKbTdZM201SDV2MTJVNkpCWXZWK3Ix M2paaW9zNEVFREU5M0Q1c05IMk1JeVJ6Q0RxMXpkZHQ0WHV5S0ZqUEtXMQo5aWJaRGZGVjdL dUNzdnVMMjNzQmMxc0NNb3ArRTFtVC9ReE9JQTZvRFQxTVFzdHdPVnVReURDdi9PdktTZ2Z6 CjhGWEdMNkFQY2xqQ3FqOEFKaHhReXN4ZG9pUVA4bS92dStialdHR3Z4dzVzMWxncGlSRFRS VVBnY0pKTmFHWTIKVklEclpRaTROU2lOUTBOSWkrZGp1NGZOTW1DcFFxZzh0YkMzY0FhNnl3 bTZvUUIxU0JobURYMmUxMWdSbGx1SQpPblRHUEUwSFRvM2w3MmxoYmc9PQo9cVpNVgotLS0t LUVORCBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCg== Message-ID: Date: Sat, 7 Aug 2021 11:53:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210807002722.2634585-2-jsavitz@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Content-Language: en-US X-Provags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ehA2+VGDhVg7kg105TzLnenOd0L5muXjo+sbwV4y DPDfGugOPQ+UdPHXqhIZ/WDphc/8xghW72gZBbaquFFnyn6zOimHOCoEpOCUgkKMY/YOQHhEI RrmXuiUhI/aUynExpD9A== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 07.08.21 um 02:27 schrieb Joel Savitz: > This patch adds the core driver file, containing methods to communicate > with the board over I2C. We also add the header file shared by all > three drivers, containing common data and definitions. In addition, we > add a config option to toggle compilation of the driver. > > Signed-off-by: Charles Mirabile > Signed-off-by: Mwesigwa Guma > Signed-off-by: Joel Savitz > --- > drivers/mfd/Kconfig | 10 +++ > drivers/mfd/Makefile | 1 + > drivers/mfd/rpisense-core.c | 170 +++++++++++++++++++++++++++++++++++ > include/linux/mfd/rpisense.h | 55 ++++++++++++ > 4 files changed, 236 insertions(+) > create mode 100644 drivers/mfd/rpisense-core.c > create mode 100644 include/linux/mfd/rpisense.h > > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig > index 6a3fd2d75f96..614de080dee6 100644 > --- a/drivers/mfd/Kconfig > +++ b/drivers/mfd/Kconfig > @@ -11,6 +11,16 @@ config MFD_CORE > select IRQ_DOMAIN > default n > > +config MFD_RPISENSE RPI is not used before in config options. I suggest MFG_RASPBERRYPI_SENSE > + tristate "Raspberry Pi Sense HAT driver" > + depends on I2C && GPIOLIB > + select MFD_CORE > + help > + This is the driver for the Raspberry Pi Sense HAT. This provides > + the necessary functions to communicate with the hardware as well > + as a joystick and display interface. Linux communicates with the > + hardwire using the GPIO pins via the I2C protocol. > + > config MFD_CS5535 > tristate "AMD CS5535 and CS5536 southbridge core functions" > select MFD_CORE > diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile > index 8116c19d5fd4..76f9a9221241 100644 > --- a/drivers/mfd/Makefile > +++ b/drivers/mfd/Makefile > @@ -263,6 +263,7 @@ obj-$(CONFIG_MFD_ROHM_BD718XX) += rohm-bd718x7.o > obj-$(CONFIG_MFD_ROHM_BD957XMUF) += rohm-bd9576.o > obj-$(CONFIG_MFD_STMFX) += stmfx.o > obj-$(CONFIG_MFD_KHADAS_MCU) += khadas-mcu.o > +obj-$(CONFIG_MFD_RPISENSE) += rpisense-core.o > obj-$(CONFIG_MFD_ACER_A500_EC) += acer-ec-a500.o > obj-$(CONFIG_MFD_QCOM_PM8008) += qcom-pm8008.o > > diff --git a/drivers/mfd/rpisense-core.c b/drivers/mfd/rpisense-core.c > new file mode 100644 > index 000000000000..69e3051a4be0 > --- /dev/null > +++ b/drivers/mfd/rpisense-core.c > @@ -0,0 +1,170 @@ > +// SPDX-License-Identifier: GPL-2.0-or-later > +/* > + * Raspberry Pi Sense HAT core driver > + * http://raspberrypi.org > + * > + * Copyright (C) 2015 Raspberry Pi > + * Copyright (C) 2021 Charles Mirabile, Mwesigwa Guma, Joel Savitz > + * > + * Original Author: Serge Schneider > + * Revised for upstream Linux by: Charles Mirabile, Mwesigwa Guma, Joel Savitz > + * > + * This driver is based on wm8350 implementation and was refactored to use the > + * misc device subsystem rather than the deprecated framebuffer subsystem. > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#define RPISENSE_DISPLAY 0x00 > +#define RPISENSE_WAI 0xF0 > +#define RPISENSE_VER 0xF1 > +#define RPISENSE_KEYS 0xF2 > +#define RPISENSE_EE_WP 0xF3 > + > +#define RPISENSE_ID 's' > + > +static struct platform_device * > +rpisense_client_dev_register(struct rpisense *rpisense, const char *name); > + > +static int rpisense_probe(struct i2c_client *i2c, > + const struct i2c_device_id *id) > +{ > + int ret; > + > + struct rpisense *rpisense = devm_kzalloc(&i2c->dev, sizeof(*rpisense), GFP_KERNEL); > + > + if (rpisense == NULL) > + return -ENOMEM; The more common style is: if (!rpisense) > + > + i2c_set_clientdata(i2c, rpisense); > + rpisense->dev = &i2c->dev; > + rpisense->i2c_client = i2c; > + > + > + ret = i2c_smbus_read_byte_data(rpisense->i2c_client, RPISENSE_WAI); > + if (ret < 0) > + return ret; > + > + if (ret != RPISENSE_ID) > + return -EINVAL; > + > + ret = i2c_smbus_read_byte_data(rpisense->i2c_client, RPISENSE_VER); > + if (ret < 0) > + return ret; Not sure about all the error cases, but i think the last two deserve a log entry. > + > + dev_info(rpisense->dev, > + "Raspberry Pi Sense HAT firmware version %i\n", ret); > + > + rpisense->joystick.pdev = rpisense_client_dev_register(rpisense, > + "rpi-sense-js"); > + > + if (IS_ERR(rpisense->joystick.pdev)) { > + dev_err(rpisense->dev, "failed to register rpisense-js"); > + return PTR_ERR(rpisense->joystick.pdev); > + } > + > + rpisense->display.pdev = rpisense_client_dev_register(rpisense, > + "rpi-sense-fb"); > + > + if (IS_ERR(rpisense->display.pdev)) { > + dev_err(rpisense->dev, "failed to register rpisense-fb"); > + return PTR_ERR(rpisense->display.pdev); > + } > + > + return 0; > +} > + > +static struct platform_device * > +rpisense_client_dev_register(struct rpisense *rpisense, const char *name) > +{ > + long ret = -ENOMEM; > + struct platform_device *pdev = platform_device_alloc(name, -1); > + > + if (pdev == NULL) > + goto alloc_fail; > + > + pdev->dev.parent = rpisense->dev; > + platform_set_drvdata(pdev, rpisense); > + > + ret = platform_device_add(pdev); > + if (ret != 0) Similiar as above: if (ret) > + goto add_fail; > + > + ret = devm_add_action_or_reset(rpisense->dev, > + (void *)platform_device_unregister, pdev); > + if (ret != 0) > + goto alloc_fail; > + > + return pdev; > + > +add_fail: > + platform_device_put(pdev); > +alloc_fail: > + return ERR_PTR(ret); > +} > + > +int rpisense_get_joystick_state(struct rpisense *rpisense) > +{ > + int ret = i2c_smbus_read_byte_data(rpisense->i2c_client, RPISENSE_KEYS); > + > + return ret < 0 ? ret : ret & 0x1f; > +} > +EXPORT_SYMBOL_GPL(rpisense_get_joystick_state); > + > +int rpisense_update_display(struct rpisense *rpisense) > +{ > + int i, j, ret; > + struct rpisense_display *display = &rpisense->display; > + struct {u8 reg, pixel_data[8][3][8]; } msg; > + > + msg.reg = RPISENSE_DISPLAY; > + for (i = 0; i < 8; ++i) { > + for (j = 0; j < 8; ++j) { > + msg.pixel_data[i][0][j] = display->gamma[display->vmem[i][j].r]; > + msg.pixel_data[i][1][j] = display->gamma[display->vmem[i][j].g]; > + msg.pixel_data[i][2][j] = display->gamma[display->vmem[i][j].b]; > + } > + } > + > + ret = i2c_master_send(rpisense->i2c_client, (u8 *)&msg, sizeof(msg)); > + if (ret < 0) > + dev_err(rpisense->dev, "Update to 8x8 LED matrix display failed"); > + return ret; > +} > +EXPORT_SYMBOL_GPL(rpisense_update_display); > + > +static const struct i2c_device_id rpisense_i2c_id[] = { > + { "rpi-sense", 0 }, > + { } > +}; > +MODULE_DEVICE_TABLE(i2c, rpisense_i2c_id); > + > +#ifdef CONFIG_OF > +static const struct of_device_id rpisense_core_id[] = { > + { .compatible = "rpi,rpi-sense" }, The vendor is raspberrypi, which is already listed in Documentation /devicetree /bindings /vendor-prefixes.yaml Not sure about the compatible. It must be added to the bindings, but unsure this should go to Documentation /devicetree /bindings /trivial-devices.yaml or a separate YAML file. Best regards