Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2614840pxb; Sun, 24 Jan 2021 13:46:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJxsa4pUWOJ5U7ROlMbLLiJfE9BNbUEch5dCA+ncUJx+TUWjOE2Kuq3jDtiu4RUJyr4NBTVs X-Received: by 2002:a05:6402:41:: with SMTP id f1mr1516657edu.286.1611524809830; Sun, 24 Jan 2021 13:46:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611524809; cv=none; d=google.com; s=arc-20160816; b=0qmhy8JoSXHhfzhIsnBE+BghR0Le9ep3z/pbKwLGMGk9i5rvuhKR5B0qToeQBwJYk5 vEN2b/hJGse+2574zzXo8wwsG2QMrmx5mWa22zlzsVAgtKZ7q2Ic3r6tb2PPdFKhAkBA U7YRZ9vpyKhDc89FYjphOSA2AuGUDt6pyVu7+0BD4bMyfbfsWcwQCXMXEcOxUaDgnPf2 gzHkGQqMlmRvvTYlHhBqNszvhZxWSMNJHa0F1++T+syQElLrnWl1q2d0HIS0iIrV39Pa ojM9kRQasv6RGrU0fmoi/GQwAeVNKO1Pq8N/+rOOxmFROa/wueqzKoSbIYCfMz4tgmqn XrnQ== 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=7xCje6XZg5FpeR2B0gTA1x3drybGHkNdFgoTCIuACis=; b=p39BlzJAhS+eZYa2rovai3rquOziKAVOjdymLw/sg0BbpdcunBJi3CHUKeXzSIeea4 C0bsDShsgX6On6S6dkM/3SNEjfnl8FicURIlM5hJh5HCjkEwvAB/cBYWUhb7mrJ6lT3/ 5Sxxe69Zj78LWoHgBEkTQXyivNkSoTgY0ju9ZNBLw8BzvDZHXa7f+JWawJ3efSbmpbMC DfXoIkG2EGg/YCws/u/cImnDpt23rdYHceb9xX/YejOWPCcYg2njgjqUmCZ1XWPAonQx P6MTztQ0K0anIn1lHf5R4tWTCn7WMWUY8TRqsaEWarXbYcM/yrWCeS3F/8O1ZlP9DQ0b Uk4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=JZhWla0I; 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=gmx.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zd10si5216969ejb.77.2021.01.24.13.46.25; Sun, 24 Jan 2021 13:46:49 -0800 (PST) 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=@gmx.net header.s=badeba3b8450 header.b=JZhWla0I; 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=gmx.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726480AbhAXVoK (ORCPT + 99 others); Sun, 24 Jan 2021 16:44:10 -0500 Received: from mout.gmx.net ([212.227.17.20]:36473 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726434AbhAXVoH (ORCPT ); Sun, 24 Jan 2021 16:44:07 -0500 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=20Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Cc: Lee Jones , Rob Herring , =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= , Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Alessandro Zummo , Alexandre Belloni , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Sam Ravnborg , Linus Walleij , Heiko Stuebner , Stephan Gerhold , Lubomir Rintel , Mark Brown , allen , Mauro Carvalho Chehab , "David S. Miller" , devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Heiko Stuebner , Josua Mayer , Andreas Kemnade , Arnd Bergmann , Daniel Palmer , Andy Shevchenko 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:f6c1ljZB7upShSxu/0hskwVEBvKfWoUUBSNBEDQza9OG2OZEv5G 68UgdJAAYZ595oQz38pflCvOJiHHoQO9k5xYglJsYXfAHax5jj/dzFKC1uNjOROtruiW0/h +FVWYd6FpFQLnr1gs6/nqra/2jvTwuTudE2w0AvaJy++y0/yIPuvuekvDhahkxQRQ23ZufS DCY0pk5VNgquV60dMJaqg== X-Spam-Flag: NO 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== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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=3D1 [2]: https://github.com/neuschaefer/linux/wiki/Netronix-MSP430-embedded-co= ntroller 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.n= et/ - 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=C3=A4fer (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.y= aml 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 =2D- 2.29.2