From mboxrd@z Thu Jan 1 00:00:00 1970 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=-12.2 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 3DD43C433DB for ; Mon, 11 Jan 2021 12:55:38 +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 E73C720728 for ; Mon, 11 Jan 2021 12:55:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E73C720728 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GJtoFunF2sf5kf71CQvaAkHyE0JzxrPEYZDzWViugfU=; b=1hlfyEt8R8lq9J3HheI3ja9X4 v5q9B4HBi/PGI6WpZK3UeZnTgFWv2Kg44pw+NiucGo0Y7DgSsLdchTrJLvNvB8LwGBrQWAH2AKdOd yZ82FiP1bJJ28v7Ts04ogqvbmJ+JSqhTc063YbyYn7DC/ZG3DtQ6g2vIafO8Llo9Ce/kT0SpnPdHI v69XjRdJp+kl0B9SZ/hSpQR6oeJi+/BIzHBEnm7Z4mGZt80Zv7UrgjZRamf8JZ4+iwQt8FnrNccsP NUvKt8CtlTT+HyM8mmlQe1jmHdj0NL3kdmdjmY/FaMmed5tdDS0cUb42G8ZfC+WU4poBCPxjkXVIe nFidofu6Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kywhx-0005Pr-DB; Mon, 11 Jan 2021 12:54:05 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kywhv-0005Oz-4Z for linux-arm-kernel@lists.infradead.org; Mon, 11 Jan 2021 12:54:03 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 190so13764691wmz.0 for ; Mon, 11 Jan 2021 04:54:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=jDh7bR5KL1i+zrcnAe+RgQgH4cW7c4bLFBL7OnmiPNg=; b=NlLdCIglQue47msebGNg1KLuPv6LZbFfyxII8Slx8pBwyqBPa6ls5HoEi70qPLQNhO m2xDgGfL0Ftld8qKSac48KG0MOYTfqa94Ix4DPTyl7LrTKTDQiwR4i9RJAVd3vVOownF Ofg9RGCRZWDtUaXXb+sTyN4d7Nh8PAnw1oqadWXBj5gGdPDbNeJZy+LlIaJuuQpGvUci ZUNq0g/+XjwYLjWZB0gKxTEwWFnDuWdghk5mxWeDAEXqawf1/7zwObw2DGRRtHk1HDR0 lTTJ8zgk+hKBLK1gbFxfVZ3MNzmXJwZSKz7Hb5u3c4EzcDtre+MoDZq63sPJvL47Ne0I uX/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=jDh7bR5KL1i+zrcnAe+RgQgH4cW7c4bLFBL7OnmiPNg=; b=d42TnwEbWsPcX3ttvlJkvW7qTupv9+LoswFP91ulb5m5q4tM+QArQyKRvKcWC6M34a nBelzdAOSC3osBIjm3acmNMYrbuv7sehD1ygTSEPIfXQtOSjatoAkpXD1JnAW8jtILl0 dpFmpW3oaSI3O8ouQUMwP9uPKOAn6nVZfNLIpt+YeUsjN/ep2M+PqdQLqbS+QyowoYkR NBwyuSkvqCzYFChpGJ1Mq1MMwxYQfjk8CYuHoy1XWoNFIRTOL5As/PwUFNFsNb2HqIdx 1CK6bi6kUuBNCw6ZSZg0TdeUkvCPOBRHkOPcjc19pcVWRccEEUb1rYf1Ohu4vtHedgyF lGhQ== X-Gm-Message-State: AOAM5332NlUsBGwmICsQ4CUsNP6w4PxdV+HMxF6Jv6DNptmL9G3Ozfek ueVOPP43Nd+CGwYc8AVEsk4= X-Google-Smtp-Source: ABdhPJyQ5vYl+NC8F2jQ3VqSj2hFvYa4apLxrSS90IaASq+Z7CKZ8HXEd4QpYqawDmN5A9Sxx93vRg== X-Received: by 2002:a1c:2605:: with SMTP id m5mr14595416wmm.111.1610369639184; Mon, 11 Jan 2021 04:53:59 -0800 (PST) Received: from localhost ([62.96.65.119]) by smtp.gmail.com with ESMTPSA id y2sm21195511wma.6.2021.01.11.04.53.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 04:53:57 -0800 (PST) Date: Mon, 11 Jan 2021 13:53:56 +0100 From: Thierry Reding To: Jonathan =?utf-8?Q?Neusch=C3=A4fer?= Subject: Re: [PATCH v7 4/7] pwm: ntxec: Add driver for PWM function in Netronix EC Message-ID: References: <20210109180220.121511-1-j.neuschaefer@gmx.net> <20210109180220.121511-5-j.neuschaefer@gmx.net> MIME-Version: 1.0 In-Reply-To: <20210109180220.121511-5-j.neuschaefer@gmx.net> User-Agent: Mutt/2.0.3 (a51f058f) (2020-12-04) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210111_075403_202234_222FE87F X-CRM114-Status: GOOD ( 31.38 ) 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 , devicetree@vger.kernel.org, Linus Walleij , Fabio Estevam , linux-rtc@vger.kernel.org, Arnd Bergmann , Mauro Carvalho Chehab , Sam Ravnborg , Daniel Palmer , Andy Shevchenko , Andreas Kemnade , NXP Linux Team , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , linux-pwm@vger.kernel.org, Stephan Gerhold , allen , Sascha Hauer , Lubomir Rintel , Rob Herring , Lee Jones , linux-arm-kernel@lists.infradead.org, Alessandro Zummo , linux-kernel@vger.kernel.org, Mark Brown , Pengutronix Kernel Team , Heiko Stuebner , Josua Mayer , Shawn Guo , "David S. Miller" Content-Type: multipart/mixed; boundary="===============8736765966011365259==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============8736765966011365259== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="z0ToN2/Ipg8oub5U" Content-Disposition: inline --z0ToN2/Ipg8oub5U Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 09, 2021 at 07:02:17PM +0100, Jonathan Neusch=C3=A4fer wrote: > The Netronix EC provides a PWM output which is used for the backlight > on some ebook readers. This patches adds a driver for the PWM output. >=20 > The .get_state callback is not implemented, because the PWM state can't > be read back from the hardware. >=20 > Signed-off-by: Jonathan Neusch=C3=A4fer > --- > v7: > - no changes >=20 > v6: > - https://lore.kernel.org/lkml/20201208011000.3060239-5-j.neuschaefer@gmx= =2Enet/ > - Move period / duty cycle setting code to a function > - Rename pwmchip_to_priv to ntxec_pwm_from_chip > - Set period and duty cycle only before enabling the output > - Mention that duty=3D0, enable=3D1 is assumed not to happen > - Interleave writes to the period and duty cycle registers, to minimize t= he > window of time that an inconsistent state is configured >=20 > v5: > - https://lore.kernel.org/lkml/20201201011513.1627028-5-j.neuschaefer@gmx= =2Enet/ > - Avoid truncation of period and duty cycle to 32 bits > - Make ntxec_pwm_ops const > - Use regmap_multi_reg_write > - Add comment about get_state to ntxec_pwm_ops > - Add comments about non-atomicity of (period, duty cycle) update >=20 > v4: > - https://lore.kernel.org/lkml/20201122222739.1455132-5-j.neuschaefer@gmx= =2Enet/ > - Document hardware/driver limitations > - Only accept normal polarity > - Fix a typo ("zone" -> "zero") > - change MAX_PERIOD_NS to 0xffff * 125 > - Clamp period to the maximum rather than returning an error > - Rename private struct pointer to priv > - Rearrage control flow in _probe to save a few lines and a temporary var= iable > - Add missing MODULE_ALIAS line > - Spell out ODM >=20 > v3: > - https://lore.kernel.org/lkml/20200924192455.2484005-5-j.neuschaefer@gmx= =2Enet/ > - Relicense as GPLv2 or later > - Add email address to copyright line > - Remove OF compatible string and don't include linux/of_device.h > - Fix bogus ?: in return line > - Don't use a comma after sentinels > - Avoid ret |=3D ... pattern > - Move 8-bit register conversion to ntxec.h >=20 > v2: > - https://lore.kernel.org/lkml/20200905133230.1014581-6-j.neuschaefer@gmx= =2Enet/ > - Various grammar and style improvements, as suggested by Uwe Kleine-K=C3= =B6nig, > Lee Jones, and Alexandre Belloni > - Switch to regmap > - Prefix registers with NTXEC_REG_ > - Add help text to the Kconfig option > - Use the .apply callback instead of the old API > - Add a #define for the time base (125ns) > - Don't change device state in .probe; this avoids multiple problems > - Rework division and overflow check logic to perform divisions in 32 bits > - Avoid setting duty cycle to zero, to work around a hardware quirk > --- > drivers/pwm/Kconfig | 8 ++ > drivers/pwm/Makefile | 1 + > drivers/pwm/pwm-ntxec.c | 182 ++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 191 insertions(+) > create mode 100644 drivers/pwm/pwm-ntxec.c Lee, I assume you'll want to pick the whole set up into the MFD tree? If so: Acked-by: Thierry Reding --z0ToN2/Ipg8oub5U Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl/8SmEACgkQ3SOs138+ s6F/3A//SWDNFJM/BhmTosI1HQsrkThdPJ11VkCRyPXOQS4HAWN4ks5Lkds6b0yo 90Pv/UecjXvliFivSNcUeXNUOLeVIm3Wy37/H9D3obOayyvssEaPpv5HYYQ2HkUW 4km3iHOvxG2hD3s0K6FoCPcTIzp3BgVSn8D3TZr+xXlVPEijevLwAtd7h9SYQDLy f7Eie32+fGLfM/hxDKIfz6gBhL5b1DlWP33RjOtMVVjUvLao1z7rOZGw3BU0Y6MP z+jDt4b8YKyJ0npSpCOD6ZzOQiynWYmi6+cCbza6C43/o6B9nW+loFBtUcNBg75J ft++3twZkMXGmdGWoaPMZdxYE/kiO1jmfxICWdJHEeRC4+VUJylNqpkZHhApsd2y IQBECMBXfdOVVv6xDTM7wyYlGlbHWeDyK4ak21HkLEWucyKx0q74DKujCtONJFCQ 0YRiGVSa1/8tSLOmq3slq6qlx8O30l6yPXyvrHXHozZRqeAjBSGowAIjYfzJX0KC ik4nyuMOnLqV2Up0hjYForCaQkVyKd1RRDR7iG32ujuaje3v7jOiKHC6+PNbLRmt iL0nhcROYuTlIA4ubZIusiA8Tky2HadiG6mK56RR6eFA3FDY6OdWqxOPZskhbfzZ RL66muGfOuKGuNZNHjawwUhozK8Nopkp74nYDxIesQU1dfn/1kA= =XjN2 -----END PGP SIGNATURE----- --z0ToN2/Ipg8oub5U-- --===============8736765966011365259== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============8736765966011365259==--