From patchwork Sun Jan 24 21:41:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 12042651 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8E03C433E0 for ; Sun, 24 Jan 2021 21:44:25 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 72F82221F9 for ; Sun, 24 Jan 2021 21:44:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72F82221F9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmx.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=6rV4X9ztYIiHvIgdfyh9ZVkLjIjD6xb7fiQxG9NtwbQ=; b=STTlVSL1aK6JMSZsmeqE2YBTly oNTDIyKE2WUdJdLgj2N9eMCQr9UHQ1afflg9FxjbD1YP+k4WqUhkTytBMJTaJWy04MQuDwJp+xt6g 1GvggdWcTJdGUjl3D0W2kEdHY+MxdDDQqgcmp3EveCwYllEAuwOCl+D5+tPVDhH3cOaMD7z5QLfnP XIMGDs7+ZF3TvXhHGAY9wDJ2iT6WtwtAoDF11mQB/Gs8FnI2MHMnIrmIGISfNcB5nDr/DveneuBTb a17dRksZl2AroschMP8CiUEhPx/3nus19KQA3G4e5cu3430imsCdm4TjdP1Xw9jUPvJ8gtE2+O1Zq b4hkl7qw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l3n9U-0000Qo-Cp; Sun, 24 Jan 2021 21:42:32 +0000 Received: from mout.gmx.net ([212.227.17.20]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l3n9Q-0000QT-Te for linux-arm-kernel@lists.infradead.org; Sun, 24 Jan 2021 21:42:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1611524499; bh=OGBt6M8IQWjiHAV/655kqYXJ5MXhTensXWSL8k3IArc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=JZhWla0I3qVZrhuMQ4ZK5aVpWkCfyrJt08klN8Poy8ojhUcq/w6ceRtsU5kwnOFPj iSAQn4v4V1CeC1he1CWg/zIEvYMog9mxsuv1UlOt3j0rcDaBLTpnvs1ZpxaZdd6yWx bRr/kjtSh2rwnMueZse1GJdAfUDa6tgRuZ9roCb4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([37.201.215.209]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N79yG-1m4GA22aAG-017WPR; Sun, 24 Jan 2021 22:41:39 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Subject: [PATCH v9 0/7] Netronix embedded controller driver for Kobo and Tolino ebook readers Date: Sun, 24 Jan 2021 22:41:20 +0100 Message-Id: <20210124214127.3631530-1-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-Provags-ID: V03:K1:f6c1ljZB7upShSxu/0hskwVEBvKfWoUUBSNBEDQza9OG2OZEv5G 68UgdJAAYZ595oQz38pflCvOJiHHoQO9k5xYglJsYXfAHax5jj/dzFKC1uNjOROtruiW0/h +FVWYd6FpFQLnr1gs6/nqra/2jvTwuTudE2w0AvaJy++y0/yIPuvuekvDhahkxQRQ23ZufS DCY0pk5VNgquV60dMJaqg== X-UI-Out-Filterresults: notjunk:1;V03:K0:Ksam/uOunhc=:8bFyoXwEst0QwW9ZT9QeZK DU3rTW1YjranW9PIpYlGXNxARLOAemOfkj3LWVDblCUw+KGqXKtPa0Ei/P1DyCRclbcnQmnIF na29e+gEwiU8Z3jdmEGrVwXMK8gHgLtkJYUlnoC+gnBc2APYbYzaqaYlPakr/CB5hrZfQ210z /7cZWFWLqR4Nr11byPwtuY0WewlHxSsaQiMiZh1NZ6JDbB8avs8dSxdB7XCW6pQ3duaJIG3BU FMv6ybe6L21tWAjDZyqZB5IBLFQ7Wm0GRNT96EOgpinGllrVql+FKgY7aspETlxNm7Sw04Y6o i99vz/SuY7tK81B7mIKaajBmieFDAHmkbh2gyb97a8GxilRqs3jvPwOKmlxy6afmaj6xofsAN ShYlIwQvz2O8fvBhK8GpLp+THXJyFy51MYtyEz7hrP3XtpVhNDBYBIyL3I23vztPJ4KYiYpbJ zAMsxna6PognAUvZIaQioadLx/ue0Oq88lG/Hiw4Ch9t9UuBvjz4A10doUh+xvKWFmAE2uZxl vBLFPvDiOoufCDsos+gm8fWrxqQlYGoOKpZn0+pZumKHuhb0e1qyn/2jzowu5jp+pjoxe1s0x JNmXBgakVzbDdBTOvPzwbn/PskCpXFw9ZjxWDRplPLRcsa/NhWxJ8goYBTT+/AkOh1rWP4mBE 54630zDSMmgR2R/n1WTA+LoUw+2oDAARaFqXxCA39m990UHCsYlixzpbjo//EOsdot7d8JDMJ ty255LX7OHSkPejQf6htYYfys7SDy1ELKsqWXh5QIiJeeRObMRC4hiML8yclRJ8llSFjkYK2H OUV/hNJzIK1xUdutCGllLeHK19b6BH3wHnDbMbXXOmLDnnhRaV5EfgAMCTX+CIlGntFEoPWoq Ez/XNcGca78fMxFBWEwA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210124_164229_238153_73EDDC12 X-CRM114-Status: GOOD ( 21.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Heiko Stuebner , linux-pwm@vger.kernel.org, Linus Walleij , Thierry Reding , Fabio Estevam , linux-rtc@vger.kernel.org, Arnd Bergmann , Mauro Carvalho Chehab , Sam Ravnborg , Daniel Palmer , Andy Shevchenko , Andreas Kemnade , NXP Linux Team , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , devicetree@vger.kernel.org, Stephan Gerhold , allen , Sascha Hauer , =?utf-8?q?Jonathan_Neusch=C3=A4fer?= , Lubomir Rintel , Rob Herring , Lee Jones , linux-arm-kernel@lists.infradead.org, Alessandro Zummo , Mark Brown , Pengutronix Kernel Team , Heiko Stuebner , Josua Mayer , Shawn Guo , "David S. Miller" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patchset adds basic support for the embedded controller found on older ebook reader boards designed by/with the ODM Netronix Inc.[1] and sold by Kobo or Tolino, for example the Kobo Aura and the Tolino Shine. These drivers are based on information contained in the vendor kernel sources, but in order to all information in a single place, I documented the register interface of the EC on GitHub[2]. [1]: http://www.netronixinc.com/products.aspx?ID=1 [2]: https://github.com/neuschaefer/linux/wiki/Netronix-MSP430-embedded-controller v9: - Fixed a bug in the error handling of ntxec_probe, Reported-by: kernel test robot - Added Thierry Reding's ACK to the PWM patch v8: - https://lore.kernel.org/lkml/20210116194826.3866540-1-j.neuschaefer@gmx.net/ - MFD: Add missing module metadata to the core driver - PWM/RTC: Copy dev.of_node from the parent device, to ensure that these devices are linked to the devicetree node v7: - https://lore.kernel.org/lkml/20210109180220.121511-1-j.neuschaefer@gmx.net/ - Adjust the RTC patch to a change in the RTC API: rtc_register_device is now devm_rtc_register_device. - Add a #define for the known firmware version (0xd726). Lee Jones suggested doing this in a follow-up patch, but since I'm respinning the series anyway, I'm doing it here. Jonathan Neuschäfer (7): dt-bindings: Add vendor prefix for Netronix, Inc. dt-bindings: mfd: Add binding for Netronix embedded controller mfd: Add base driver for Netronix embedded controller pwm: ntxec: Add driver for PWM function in Netronix EC rtc: New driver for RTC in Netronix embedded controller MAINTAINERS: Add entry for Netronix embedded controller ARM: dts: imx50-kobo-aura: Add Netronix embedded controller .../bindings/mfd/netronix,ntxec.yaml | 76 ++++++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + MAINTAINERS | 9 + arch/arm/boot/dts/imx50-kobo-aura.dts | 16 +- drivers/mfd/Kconfig | 11 + drivers/mfd/Makefile | 1 + drivers/mfd/ntxec.c | 221 ++++++++++++++++++ drivers/pwm/Kconfig | 8 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-ntxec.c | 184 +++++++++++++++ drivers/rtc/Kconfig | 8 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-ntxec.c | 145 ++++++++++++ include/linux/mfd/ntxec.h | 37 +++ 14 files changed, 719 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml create mode 100644 drivers/mfd/ntxec.c create mode 100644 drivers/pwm/pwm-ntxec.c create mode 100644 drivers/rtc/rtc-ntxec.c create mode 100644 include/linux/mfd/ntxec.h --- 2.29.2