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=-8.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 8BD87C433FE for ; Thu, 10 Dec 2020 11:45:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 443D523D5A for ; Thu, 10 Dec 2020 11:45:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387507AbgLJLox (ORCPT ); Thu, 10 Dec 2020 06:44:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727043AbgLJLoX (ORCPT ); Thu, 10 Dec 2020 06:44:23 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57EECC0613D6 for ; Thu, 10 Dec 2020 03:43:41 -0800 (PST) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1knKM8-00068o-3f; Thu, 10 Dec 2020 12:43:32 +0100 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1knKM6-0000XR-CS; Thu, 10 Dec 2020 12:43:30 +0100 Date: Thu, 10 Dec 2020 12:43:30 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Lino Sanfilippo Cc: thierry.reding@gmail.com, lee.jones@linaro.org, nsaenzjulienne@suse.de, f.fainelli@gmail.com, rjui@broadcom.com, sean@mess.org, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, linux-pwm@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] pwm: bcm2835: Support apply function for atomic configuration Message-ID: <20201210114330.6pgtome3aq3hj55t@pengutronix.de> References: <1607464905-16630-1-git-send-email-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="75lrswuigp2g2w5p" Content-Disposition: inline In-Reply-To: <1607464905-16630-1-git-send-email-LinoSanfilippo@gmx.de> X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --75lrswuigp2g2w5p Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, On Tue, Dec 08, 2020 at 11:01:45PM +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 Reviewed-by: Uwe Kleine-K=F6nig Side note: I'm a bit surprised about the output of b4 diff 1607464905-16630-1-git-send-email-LinoSanfilippo@gmx.de This is probably due to the fact that compared to v3 you also rebased. Still the diff is quite big. Best regards and thanks for your patch Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --75lrswuigp2g2w5p Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAl/SCd8ACgkQwfwUeK3K 7AmZWAf+LEKGVZjqR9SrgShtkRoQm3CGpU1qgqHlwn7DtLcP3RzI6D/EKlOe2vQe VAtrTI3p2cH7j+HP9LO4JQZgkjvp95g4jsecW6At23YI3oxplzbl9fsqrX7iINGj S+imzTYo1CC9u6GZFrKy9lBpN1Wh6Uy5kF660+mgBvIMADm78hiv9IDJXKw8zsWk aDlmtXKZ9+WjUnPNB9n42RzTA6ZcarJhiypt6wHV1dARUz5fVf1JpUUyVvb8aUIo 9/f+AFAJkYxch3vUM+L2FvCuAvGj8uwp9J2GkfMd/g93QtjIg4uTmaCgPqBIVYNC yoWwtlvJNrRMKiRq+pSKHMwHh3sJ7g== =Went -----END PGP SIGNATURE----- --75lrswuigp2g2w5p-- 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=-8.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 08731C433FE for ; Thu, 10 Dec 2020 11:45:09 +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 8FC6E23AC4 for ; Thu, 10 Dec 2020 11:45:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8FC6E23AC4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de 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=Abqhx2bZkGciJtsuEd1WUXW9T3igVBZca2SGvApCwwA=; b=uxachYC0ZQCplYVPIT+AHQxsm ksZXsAZOavLKcA3Lo04bfw01rOm4LL9kkLMR/nkcNqO1fZDJ3iot6nVV+DrRIIWe75DnH/j3LH3MZ cYro+Udp1Sy4kV/ANsdHMYrSEL72YKFjqQnpH0oVKREQvJR46kVri52b86kJ5OrfT8Tca1mWhlIEQ Fh1UOLEW2gU9f6LoE6b/og/26pJ8FFCEgcKp6t5aLdH5FAr8j3nwB9MlnrKWW6RYRO8QHc1EDRQm3 xnieuR1zDUVGP0meH8BKnpD5IlBgpSv+JVLfjgZIJ872oLrdC99mz5klUHD7327jiqJ1ifD8GmNBB ubdwW0jFQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1knKMH-0003th-Dh; Thu, 10 Dec 2020 11:43:41 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1knKME-0003so-Is for linux-arm-kernel@lists.infradead.org; Thu, 10 Dec 2020 11:43:39 +0000 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1knKM8-00068o-3f; Thu, 10 Dec 2020 12:43:32 +0100 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1knKM6-0000XR-CS; Thu, 10 Dec 2020 12:43:30 +0100 Date: Thu, 10 Dec 2020 12:43:30 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Lino Sanfilippo Subject: Re: [PATCH v3] pwm: bcm2835: Support apply function for atomic configuration Message-ID: <20201210114330.6pgtome3aq3hj55t@pengutronix.de> References: <1607464905-16630-1-git-send-email-LinoSanfilippo@gmx.de> MIME-Version: 1.0 In-Reply-To: <1607464905-16630-1-git-send-email-LinoSanfilippo@gmx.de> X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201210_064338_646333_447251E5 X-CRM114-Status: GOOD ( 15.96 ) 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, thierry.reding@gmail.com, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, lee.jones@linaro.org, nsaenzjulienne@suse.de Content-Type: multipart/mixed; boundary="===============4738021273894096981==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============4738021273894096981== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="75lrswuigp2g2w5p" Content-Disposition: inline --75lrswuigp2g2w5p Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, On Tue, Dec 08, 2020 at 11:01:45PM +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 Reviewed-by: Uwe Kleine-K=F6nig Side note: I'm a bit surprised about the output of b4 diff 1607464905-16630-1-git-send-email-LinoSanfilippo@gmx.de This is probably due to the fact that compared to v3 you also rebased. Still the diff is quite big. Best regards and thanks for your patch Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --75lrswuigp2g2w5p Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAl/SCd8ACgkQwfwUeK3K 7AmZWAf+LEKGVZjqR9SrgShtkRoQm3CGpU1qgqHlwn7DtLcP3RzI6D/EKlOe2vQe VAtrTI3p2cH7j+HP9LO4JQZgkjvp95g4jsecW6At23YI3oxplzbl9fsqrX7iINGj S+imzTYo1CC9u6GZFrKy9lBpN1Wh6Uy5kF660+mgBvIMADm78hiv9IDJXKw8zsWk aDlmtXKZ9+WjUnPNB9n42RzTA6ZcarJhiypt6wHV1dARUz5fVf1JpUUyVvb8aUIo 9/f+AFAJkYxch3vUM+L2FvCuAvGj8uwp9J2GkfMd/g93QtjIg4uTmaCgPqBIVYNC yoWwtlvJNrRMKiRq+pSKHMwHh3sJ7g== =Went -----END PGP SIGNATURE----- --75lrswuigp2g2w5p-- --===============4738021273894096981== 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 --===============4738021273894096981==--