From patchwork Sat Jan 16 19:48:19 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: 12025015 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.7 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,URIBL_BLOCKED,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 7D595C433E0 for ; Sat, 16 Jan 2021 19:56:49 +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 3F95922DBF for ; Sat, 16 Jan 2021 19:56:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F95922DBF 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=0Ixaioz5L5L19txQB89SmEfX9B9rjoH02zesWmWQQ/M=; b=fxhRBYvNWSrIPkm0ZANvSC+Bh+ 1EetmjGNGdg/YxBznHiT1twKs4NE6JG+iIQ+ykQxvoYgw6AFHWbyghgEOg/pPCAie82N3Z5Z+CtKJ JPGLXlQovQKqCyHlld6zoOtzS2Ykw0iqDAgtvBbWe6aAiSWte2KjeOiN4/qp1BgfHAcVye2dnc106 +3nrYkZGO1bsD/jGEROIAE1BYa433ukU9jv1Wbk7q3L641a5op6q6HEeCLeJ1+9828mwZ48jVM2Ja YcW9AsHpezSIzN0DItgofEY8acr8tUnZ4QyAaq+4TNfWiAa/SsVbgf7amBqMbcPI86GKDwr2qu8ID nae7DiRw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0reL-0000bg-Cy; Sat, 16 Jan 2021 19:54:17 +0000 Received: from mout.gmx.net ([212.227.17.21]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0reH-0000as-La for linux-arm-kernel@lists.infradead.org; Sat, 16 Jan 2021 19:54:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1610826805; bh=GPwpLT1TZGAzF9ivuj9lbpm+O/HMOu8CWT/rfk2UPaI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=fPnVDEZbfIuTXMJ71Pznz87GMcBuTYxG4YfvJuIAbiCqmZYJNNasKw97HBsu/j7aa s74AuQiR+tfT+FL+0Kq/UoEf2XP8AmTndHJrEdt4vIs21OLaJ7co2qiRix5tOa/blg yWC6EwfTJqAztzu9Svitjewh/zay/jC50m6yyDA8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([37.201.215.209]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MPGVx-1lPqEj3vAb-00PdJO; Sat, 16 Jan 2021 20:53:25 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Subject: [PATCH v8 0/7] Netronix embedded controller driver for Kobo and Tolino ebook readers Date: Sat, 16 Jan 2021 20:48:19 +0100 Message-Id: <20210116194826.3866540-1-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-Provags-ID: V03:K1:8Sq8EerqbjWZ15AShxTA3L88ejasz3s3OzWxE+MUqIpHQ9CoCyE cD+Li5754+zHG5nK0ThbmZbGA7QFTMPQ2j8VuQbvXM+EwXWf/amX6hEQGOZssK6RdZgB4Ay BIjsrVBGx43irdhetOuYmcfKk53XaB2/tuONPuDF47RQDbRlOkp38qVHzEGWHFYKCs0Xbay 9670XgHJtoRPvFt04G0Gg== X-UI-Out-Filterresults: notjunk:1;V03:K0:CTmruEhhFgQ=:VTtaFXP2BB9L51574srDOO MA+6yYIS2+1cJbiRvjdimPEGfoH8WTG+GjZIfpIJmhhOskZyfw9Ri3VfG44TDYd7zfI2MKIfZ tw2D/BTShNnZPosWKS/eArbekW2PJ2f2Widz7uWjDIqyAvX2jGerWdLL+DSNMHqvpeW2nU/9z 8wG8S+a8U+9myVwykzr71c1tjwLXjZzG8FU4eGwgZRE8fpValUnD7GUPHscUHXzAJ+s39hyw6 Rg8bLK65nWciEFM54cZ0EQOT0vdPZYn+l1eNjb62RNjcd+czYX1SN5qyHvBZX9t8cgmgxVtE9 HqTnBWyZaaY4Gr1PFM/Hlr+WpYbGqpsT1+JbJZXCWJPheL3ar1OXOcR8a7VhAlAj3Qkq+FjJE MOkJRViDS0OwFE8++i+j87oyafsgtFjBatbs8ODh8SMjj59MCfvvuXcOyRTZPJCSw5aP2zNEn krSSQ94WMUDXLfz8qG5mCByc/wmNdLnxnf4Kj8jx2KN6hsDlIWBqMATS7L2ews/FZzCPFX9gx T9CYeETWEuinIfDZ/rfffw+nIA8v7q9gDIY5cmOWaGtpqVmNZkbRcOoQH7/eDN1IOmh2syq8s A8V99GdlcBDjquDSOeWLfQ+r5Xxa+A7gO8iGbFNefB6aF7rPTW+JlDKLsvdKluzrWeMmXcUMi C2xzB0vP0DZeq+tHq8h1RjFsWNUSJGS7H1L/z/4e9QSRppX7FxJhOKaGQEAkbvBGR1VSUc5E1 bBtRNhHYZEL04S5TUKb2m4pB1eTWq6f5Ks3luorhPpz5sj+WnZIgyVxof8FdaxhosLQciULgu EVCGqyXCzsafc9Grz+PmyWr+XHNwI0sucvNnfALAS9RwTLcprZ997XQSS+eJynL+0TXwAoC5A ftKmmuv2D4m4W8n/jR6w== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210116_145414_401548_ACABAA9A X-CRM114-Status: GOOD ( 18.52 ) 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 v8: - 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