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 6CFA7C4361B for ; Thu, 10 Dec 2020 17:22:47 +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 0AF9223DB3 for ; Thu, 10 Dec 2020 17:22:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0AF9223DB3 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=IlFkdn3JYxnwlsrzvwWHnWXq32vJLr3Gn6HCIZnabs8=; b=ynPOUUvR2uqp9CFlKeyyFIX/D 4Mm5xOCILnwym1TkqSHhL0ndCDhiqXYnt4bchspQ/o5Y14QEc1TRqh6TSmdwOque5VsxsqrODcVK2 hGkt1LtAqnBvxRlv4ybyuDaKnyd0DuLeCm25GFFm2+rGamysn8zddTiKGCtu55B9j5pDdURsy1KQF yVeC6E2jq7bf+JhvbuXp6HS8swMYvFfwnQfh7FtQZgpASLtCdEzOsvy3UqXPHM2Kegw2P7Gptt3nX wNEtb8rN67POu0YydFUgZiHUCMVWrQgCnX7nNR1OPIAbzzgFNeFY4oAF6rE94BO+y5eKPgOdbSTgh mGA57JG3g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1knPdC-000852-2f; Thu, 10 Dec 2020 17:21:30 +0000 Received: from mail-ej1-x641.google.com ([2a00:1450:4864:20::641]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1knPd9-00084M-MO; Thu, 10 Dec 2020 17:21:28 +0000 Received: by mail-ej1-x641.google.com with SMTP id w1so3766750ejf.11; Thu, 10 Dec 2020 09:21:25 -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=5wEtCAFFcUDfP/lT3kh1OSmiehfZiNdubLO/uU5Zi7s=; b=MQ48xzVb9wfd4d9OMKBK5X0xNrZ4bBpa06YKNvq6Vc+eoAdJm0DB97hFHb2h3CNFLD hE4XrQq5AErZUxyY4/XTO2in0rP0oAQ0ip1ckjFiwum23aaJ6On+iheOPD7UIWiprjKb uvSA0dIx0A+SokwYYZCNhJaKlj/clyKHie0Bb9KWHciFMt5UKB+0TpIi9MOvmo7rALbX /6AzgkHNqpMKoXRKn1IKg69BkYrHb+YPHtya2Zd2Ee8QG462yR9guSopB1QFpmvAClAh 4ZKJX1fU2lJfXb3bA63e1zIJ/y3DzYqY4AzNIrjZbDUx6k429OP4FQz/jeo+rnXjfhVK YPrQ== 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=5wEtCAFFcUDfP/lT3kh1OSmiehfZiNdubLO/uU5Zi7s=; b=cOFIxEnGYfw1Zgl75H52dHTUW1Ce+GYAmEcAac95Daog1XjiJQ2SuX477GN89ebMMO 1FqIBBdT6SpRIn+sPwa/DLfRbKXxTMkDkdlGT8BKiW8PQj7Wvo84yV6FXWFSucewCxrf T83qFHTJjX7RM9y8f3gokScUVqMPwJE/xtTyV/T/hrO9Pgzzo4BPas2//p6d5xl5+Rck D7FrUFMNmwwaAJHq1+51zwH3nbcmOKNlI167zF0D8nNQkV5LivmYqUi8wo2/rHsEo2gO fOBJzxRxUJzMhJSpYR0rBz+9HGVgeNagaolfIBACQUEoIJdnkzudBgOiPBKCC8Kzxp2h t2fA== X-Gm-Message-State: AOAM5326Pmw8TU7sp5bkp6bJgPEHZiooNAVMKPqw7HnbCVHhK0Iwlphu jLzbQ/OBvb+hpOkZfRf5/Go= X-Google-Smtp-Source: ABdhPJxBHEG/8s47KqoI2VLJktb+XnnBReRLeh5dXYr7vZuoKO5QBLm/F12kj2Nd3Qt5dyKQH0Kz0w== X-Received: by 2002:a17:907:961b:: with SMTP id gb27mr7191586ejc.313.1607620884942; Thu, 10 Dec 2020 09:21:24 -0800 (PST) Received: from localhost ([62.96.65.119]) by smtp.gmail.com with ESMTPSA id l14sm5457482edq.35.2020.12.10.09.21.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Dec 2020 09:21:23 -0800 (PST) Date: Thu, 10 Dec 2020 18:21:22 +0100 From: Thierry Reding To: Lino Sanfilippo Subject: Re: [PATCH v4] pwm: bcm2835: Support apply function for atomic configuration Message-ID: References: <1607546905-20549-1-git-send-email-LinoSanfilippo@gmx.de> MIME-Version: 1.0 In-Reply-To: <1607546905-20549-1-git-send-email-LinoSanfilippo@gmx.de> 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-20201210_122127_747077_F0B2BB12 X-CRM114-Status: GOOD ( 16.51 ) 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: linux-arm-kernel@lists.infradead.org, linux-pwm@vger.kernel.org, f.fainelli@gmail.com, sbranden@broadcom.com, sean@mess.org, rjui@broadcom.com, linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, u.kleine-koenig@pengutronix.de, lee.jones@linaro.org, nsaenzjulienne@suse.de Content-Type: multipart/mixed; boundary="===============5674122493873491976==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============5674122493873491976== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="DbaDMJ+M2InmvP5d" Content-Disposition: inline --DbaDMJ+M2InmvP5d Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 09, 2020 at 09:48:25PM +0100, Lino Sanfilippo wrote: > Use the newer .apply function of pwm_ops instead of .config, .enable, > .disable and .set_polarity. This guarantees atomic changes of the pwm > controller configuration. It also reduces the size of the driver. >=20 > Since now period is a 64 bit value, add an extra check to reject periods > that exceed the possible max value for the 32 bit register. >=20 > This has been tested on a Raspberry PI 4. >=20 > Signed-off-by: Lino Sanfilippo > --- >=20 > v4: Remove a superfluous blank line > Remove an unneeded cast (both requested by Uwe Kleine-K=C3=B6nig) > v3: Check against period truncation (also based on a review by Uwe) > v2: Fix compiler error for 64 bit builds >=20 > drivers/pwm/pwm-bcm2835.c | 69 +++++++++++++++++------------------------= ------ > 1 file changed, 24 insertions(+), 45 deletions(-) j Applied, thanks. Thierry --DbaDMJ+M2InmvP5d Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl/SWRIACgkQ3SOs138+ s6EiyQ//TLfupe2MvYkloXLMOdWX3A1bTym9bn0wW3871vxwbseLyYFiBIe3Gxa6 X1zk8P1MiWh/oBI4JzXU8l8qw4fUx7I/1EyRrj4rLGFKBamNqB5tgUFZMGp2XIpm Ffxg5nwPF+UxnMn5QxarCA1AmbR02Rx4KXeLDMu0C3w4tRLpwVasQkKa8xsxF5Ut CUKPBR4lHo/Fz56+4pWRg1XJMFaJxLbmybkqUT1HxME4Yt2ZQ66FMQRU9HyhM5ea GjV7+WgixuNrOQDg3v34ZM2W8Ed4iXhnjUYvfyLL2plRe7nBEP7z3ff4W3S/JqmZ pfr4jvF1uVf9d0rVlszpoVv9yIog7gkXW6/0vA2JT6Wu+g+/0CNcW7wm2xoZwCWH oRFtocxHyp53RX7jRzqaKFBZewMDaIpiqQUTxf2wuyxGuq1agIGcCmv2uuFNSkDU rTmlu+1c+tYANS7cHBg6X0gfcFKffsArFcRhQK8VaKTIFS8hZwt/Mwu/RC5knyyT 00M7agVg97H3p2kvGFXI6INYaS93iC2+QBkCX0TY4/j01p5zSMLxp0x3WpKvdDS+ 9qByW9lFhIjPsf0VlQ5G+fzZ9JmcZUlNsw9vmx0O6Ma5PQCbr/Cw9oNgLjw6odyx 1h+ILj6NuQETtzZhKobHjECm/67/K8Up2DlrITTuewyij+aw060= =vqd+ -----END PGP SIGNATURE----- --DbaDMJ+M2InmvP5d-- --===============5674122493873491976== 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 --===============5674122493873491976==--