Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1173621pxb; Sat, 17 Apr 2021 08:47:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLmsUmM8DgjemGgy7sddJTZ4lPaXeLXxLshgTef3lorvd6PgP7vIhKcjK7rkdLM6yhs/bh X-Received: by 2002:a17:906:86cd:: with SMTP id j13mr13376809ejy.423.1618674458722; Sat, 17 Apr 2021 08:47:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618674458; cv=none; d=google.com; s=arc-20160816; b=n3JzXuuIqQ5BsrshFMzYZVciDEyGnvj/+OoE171iqQ14An7jMOIbrjarI63ONd3l+Y qZnytX3F2Zrg4kmxIqoeQ7vJymk4eQ3JO/LlZFGN7C8HaH1qbKcKIDO3gxnv/aocJ8RY pfKXPsK7zDydihQ+4ianVIMcL5RSjYsT8qYJUWwladOeRYG9Q/uBbK0BPWwC8IdA00Zu R1eaede0Fl7JqT6AmYNivkppuPsYV4QhspwiFIgi6QX0tsyPw2PxQ4+Vmjxoj36WnoIg /o7wdgBk91iDT76iLuKFBkdwvEeee3Gb7sOrFaqANkv/ySp59gvqom0tVv3xEnSpc6IL 7+vg== 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=GX3UymeqH4+QHJvchpVV+Amu6waNkudSh+D588+ayI8=; b=B9Gwc+6U0nrC/aLTBGgFqMQ7UDJAxHKX9dsIxGSACdXXu4SMzJdQBE2ew/fIyiNIXi RxCVCTTR5iXqLcS8aRVGB1Pb2Ax7FPMH954I8LwyNOIPKD+62vbNFT5ENeV0s+qtw7h4 jYHiOeqmadFCMs43VWFSXBfPuwZHcmct5GZC3o+Drb2uGtnleY3A8oLWYvsSNtXsuO/s CjtUxJqM0krYpcAdQReFHxeAJ17P3eQBZIh1UJqcw7B+ijst5Hkp0yZN/qDY0HwetolL eU8y2Zzcp2FpvbtHZ6Is327lCs9geCT2heg2tRCccjxAH2XDo1OJnmCXlKSXsAyFHppY 93Eg== 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 k7si6930390edx.440.2021.04.17.08.47.15; Sat, 17 Apr 2021 08:47:38 -0700 (PDT) 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 S236588AbhDQPqs (ORCPT + 99 others); Sat, 17 Apr 2021 11:46:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236481AbhDQPqs (ORCPT ); Sat, 17 Apr 2021 11:46:48 -0400 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 0786BC061574 for ; Sat, 17 Apr 2021 08:46:22 -0700 (PDT) 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 1lXn9G-0003DZ-2a; Sat, 17 Apr 2021 17:46:18 +0200 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lXn9F-0006Iu-PB; Sat, 17 Apr 2021 17:46:17 +0200 Date: Sat, 17 Apr 2021 17:46:17 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Clemens Gruber Cc: linux-pwm@vger.kernel.org, Thierry Reding , Sven Van Asbroeck , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 7/8] pwm: pca9685: Restrict period change for enabled PWMs Message-ID: <20210417154617.uamygwgvfs5qopek@pengutronix.de> References: <20210412132745.76609-1-clemens.gruber@pqgruber.com> <20210412132745.76609-7-clemens.gruber@pqgruber.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lblwo5wjig2aavxn" Content-Disposition: inline In-Reply-To: <20210412132745.76609-7-clemens.gruber@pqgruber.com> 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 --lblwo5wjig2aavxn Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 12, 2021 at 03:27:44PM +0200, Clemens Gruber wrote: > Previously, the last used PWM channel could change the global prescale > setting, even if other channels are already in use. >=20 > Fix it by only allowing the first enabled PWM to change the global > chip-wide prescale setting. If there is more than one channel in use, > the prescale settings resulting from the chosen periods must match. >=20 > GPIOs do not count as enabled PWMs as they are not using the prescaler > and can't change it. >=20 > Signed-off-by: Clemens Gruber I think this patch could be a tad simpler (by just counting the number of enabled channels instead of maintaining a bitmap). Still this is beneficial, so: Acked-by: Uwe Kleine-K=F6nig Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --lblwo5wjig2aavxn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmB7AscACgkQwfwUeK3K 7AlJDggAjcrJSrAajTzJk1qLkWHThVtd0xdAcxRa0Cebvfyl8OQO62kD3W9NvGIc qE4k0FuVsN7J8sGOPbfKfRFD7+YlYiDxZWi2yvgj0TMbMpnCx3/6U8FbyEwIRIXq bATVIYpv9YDmVhsJRV3ue/I6FyeBnN6ugh/LMgxwj9oRPpLD2H7rZy+iYShbeA3b dpF5QNOzpjtMi/Pw5YQ3PsBf1GYDMFbLvYCn2wBewTJ7zUUzT3frGEyL8LkMQbga Kj3720JhF3ZyFvcInIz6OeIKgjJmn+U80zXqsF20j02c67RR15EoU0s8n6lmLlxQ l7Hh1obHvypOCIvlcVGKV/knWEtjpA== =A33i -----END PGP SIGNATURE----- --lblwo5wjig2aavxn--