Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3027411pxu; Tue, 8 Dec 2020 01:15:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJzw9sISyXB4ceu/tSbxEE79edk1hQpCLrKUZRAKOe/KtC7qW67VaYYOJjo7Si3fywnaX0+7 X-Received: by 2002:a17:906:5002:: with SMTP id s2mr21763080ejj.16.1607418947030; Tue, 08 Dec 2020 01:15:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607418947; cv=none; d=google.com; s=arc-20160816; b=T1yhJhW/1jdnHTfdZsMRq/MJekoKycMWB9vptZFtFi+l1Vt/VcavUS7G2PoOk6b2oQ NuUGv3l6jhcJXLIIy9W464agIfTCgog/anNZPXqpmxFkNxa5lisxG12TE9B3PlHpsi0B fWmRcfumAzSmkldQB2wGP7qYehMZs+D00SiWpNEoPMH2BIANpyCVZ1d/BzvfKQl/mOnm hukpxv+yLMoVdSzRqR8bBNZIQP8BPLaA745L+gZ/Of1cAHCPch/wdCIA43ONkDwPecKh 58jEg767GJcrojqptYY8aIFe5RWtfPaDp1QawHO0AOZBCu956VtvHKj5ahU77u5yYCjC gL+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=L2Xljq8tJKSpZvirimSjv/exx1hi04KIdqesVJb4bZQ=; b=pTx95G+Yt34H0DRprtlaFs/jirJykcXyVXYWiIcIYrtdaoy/MPVdYGr9AwXjSuTGhI MVvUVoUA492Pv4Ve2/aF3JVS/MKaJK9XF60vqdv5zgUo+nZEgIakFA90D8hWQJtB1v3y 9rNptltZDahuMHTtki4273o/638QHavyao4OYgNbbBW2QzXWyS+ii5NZQ22uGYWObKFA MQ3Sygl1zs0EKgiHenqmmlVOtKU5uDt+LA+/G3b9Tgaa2B8jchzila1Nl7IV67vhVD2u mnHVdEfrw69DktNvyurwe/erNnGg/dYrBi33ZGSLvxnz45JPMyoWVaGsk3Q/Fgl07aaK dOpQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o22si7956581ejg.205.2020.12.08.01.15.24; Tue, 08 Dec 2020 01:15:47 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728559AbgLHJLQ (ORCPT + 99 others); Tue, 8 Dec 2020 04:11:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726302AbgLHJLQ (ORCPT ); Tue, 8 Dec 2020 04:11:16 -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 59BB7C0613D6 for ; Tue, 8 Dec 2020 01:10:36 -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 1kmZ10-0001rh-4G; Tue, 08 Dec 2020 10:10:34 +0100 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1kmZ0z-0000EF-Dg; Tue, 08 Dec 2020 10:10:33 +0100 Date: Tue, 8 Dec 2020 10:10:33 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Clemens Gruber Cc: linux-pwm@vger.kernel.org, Thierry Reding , Lee Jones , linux-kernel@vger.kernel.org, Sven Van Asbroeck , Mika Westerberg , David Jander Subject: Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API Message-ID: <20201208091033.bxzrlad7mjbe3dsp@pengutronix.de> References: <20201207193629.493241-1-clemens.gruber@pqgruber.com> <20201207220025.42b6g76wq7ph5nvb@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="acneiids2f4t3ggq" Content-Disposition: inline In-Reply-To: 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 --acneiids2f4t3ggq Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Clemens, On Tue, Dec 08, 2020 at 12:13:44AM +0100, Clemens Gruber wrote: > On Mon, Dec 07, 2020 at 11:00:25PM +0100, Uwe Kleine-K=F6nig wrote: > > On Mon, Dec 07, 2020 at 08:36:27PM +0100, Clemens Gruber wrote: > > > The hardware readout may return slightly different values than those > > > that were set in apply due to the limited range of possible prescale = and > > > counter register values. If one channel is reconfigured with new duty > > > cycle and period, the others will keep the same relative duty cycle to > > > period ratio as they had before, even though the per-chip / global > > > frequency changed. (The PCA9685 has only one prescaler!) > >=20 > > This is not acceptable, if you have two PWM outputs and a consumer > > modifies one of them the other must change. So if this chip only > > supports a single period length of all channels, the first consumer > > enabling a channel defines the period to be used. All later consumers > > must live with that. (Also the first must be denied modifying the period > > if a second consumer has enabled its PWM.) >=20 > Good idea, but is it OK to potentially break users relying on the old > behavior ("the last one who changes the period wins") ? If this is already in the old code, this probably warrants a separate fix, and yes, I consider this a severe bug. (Consider one channel driving a motor and reconfiguring an LED modifies the motor's speed.) Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --acneiids2f4t3ggq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAl/PQwYACgkQwfwUeK3K 7AmQZAf/aRaIyHctz+EjoBIMGw6tBPqXWyDp7J3Fbgi28mFexFy+tbd0YqXHHTPD IYWbUtDb7KSu/IC9mxpXP3SYiSlzA4n3Br2yk3f/xgRyhy6R9DCLQlHoVcx7bnqO xdYRNyisMprl4sMINFG0ipDT0Cv6CdNrZdEgi8uidWgY7Zzje2hx2In2H3GFlT89 cZ2S6DoVRNdE8XU2FMCdjZ9qvaw12w42oPRcH0oEao1ycSoGQ9dSGBKDi6iUzijX gtA4gzkQpxJ1LUlVgkG5cy+zENn4bXZD8XHxdsoWLfNw0CkPBXQFYkpHtBfMc/qZ JkA1aV1ij3kmuVxv4WSn9ui4L6RdpA== =lGAt -----END PGP SIGNATURE----- --acneiids2f4t3ggq--