Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2553773pxb; Mon, 11 Jan 2021 12:46:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZtZWEX9ZSXiGhf7PdpAMgmisX8hHt14en9Ppz10gJzSBsKdC3MmgpyDDFsoE/BNgAoghF X-Received: by 2002:a05:6402:c83:: with SMTP id cm3mr828579edb.189.1610398000186; Mon, 11 Jan 2021 12:46:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610398000; cv=none; d=google.com; s=arc-20160816; b=NP8KGHZqjx/4JF/qIJh0MxtarsTFIH8px0Gy+yEBBgPEhxgD31QxC1Jwje6MKqeH3c QYcd1ri+884+oalNr5Q4l7MjaUOnWD0VeqGAxu+vc/vBVSMimjZaRPNTUnAdj51nhsID F/glphGorT+wTNi3XGImB0vH6pUhud1vGWTosbk8V4Vn1OP5BCmqJ0dKdc/zrLdpIsfq LCpdjffuxqVzKCikplN81PGAue62nj2qBly+UWsKhBPYuNL/lrIcdXkvYn94gAxOgtDV EnQP8dF8mXDSuGlUZlo4tCFZc5QPD6E28cbGdpEGF6PYFbGL4nZcN/hnN+Zaknkgpn6r fpYg== 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=7AVjxduYIpoiJgef0td7/tZK02/QlyGullZOonAiLLs=; b=ia+EJtYjoJOzNwd9+Rf7THiG24FbD5RnWDY1GaEJzG4G+eMpfG9cod8UhIFeUb6w4D 1GqBCehQe1KkwxJLzrfLGJXSxr162ZGinpSrQHhVz3j7RuIcWiQNUrvj8xMskV2D5Qmn SZcMOw3gFGZiiOo3hcyN0zphpIWUE7Pyij6cgUOxtXaY/2FHDgJDl5gAfgTPe+l2tK3p B/EagY8OrQE1332O9qOMPoWqN1IGhsq3v5/qYY299YB7+59MoBUxN9m0HEDIIKmW6qu/ nkhRdgmgVhjhEIt/ZIZ7LzVmvQkLVvlLSSHyXpgngbo0dtWH+HISRXk+miP+ZaI77CX2 cbpA== 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 a16si202064ejk.668.2021.01.11.12.46.15; Mon, 11 Jan 2021 12:46:40 -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 S1730894AbhAKUpY (ORCPT + 99 others); Mon, 11 Jan 2021 15:45:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391135AbhAKUod (ORCPT ); Mon, 11 Jan 2021 15:44:33 -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 11913C061795 for ; Mon, 11 Jan 2021 12:43:53 -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 1kz42Z-00015t-03; Mon, 11 Jan 2021 21:43:51 +0100 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1kz42Y-0002eK-Ja; Mon, 11 Jan 2021 21:43:50 +0100 Date: Mon, 11 Jan 2021 21:43:50 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Clemens Gruber Cc: Thierry Reding , Sven Van Asbroeck , Linux Kernel Mailing List , linux-pwm@vger.kernel.org Subject: Re: [PATCH v5 2/7] pwm: pca9685: Support hardware readout Message-ID: <20210111204350.k2bhpdj7xnnqkfi3@pengutronix.de> References: <20201216125320.5277-1-clemens.gruber@pqgruber.com> <20201216125320.5277-2-clemens.gruber@pqgruber.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ol44sy6xmafby4sj" 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 --ol44sy6xmafby4sj Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 03, 2021 at 06:04:10PM +0100, Clemens Gruber wrote: > Another point is the period: Sven suggested we do not read out the > period at all, as the PWM is disabled anyway (see above). > Is this acceptable? In my eyes consumers should consider the period value as "don't care" if the PWM is off. But this doesn't match reality (and maybe also it doesn't match Thierry's opinion). See for example the drivers/video/backlight/pwm_bl.c driver which uses the idiom: pwm_get_state(mypwm, &state); state.enabled =3D true; pwm_apply_state(pb->pwm, &state); which breaks if .period is invalid. (OK, this isn't totally accurate because currently the .get_state callback has only little to do with pwm_get_state(), but you get the point.) Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --ol44sy6xmafby4sj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAl/8uIMACgkQwfwUeK3K 7AliDgf/WEtJ/jp7SG6NJErnQJqh69fn4dYEeKw3nDmdy3iDQ1D2d0b9shJHas5T brvWT+wJ3NUEwL7EwNcn3XxmAIgS5M+3Zj8BaPIxx73dS06zUGbmgcAS/dJ0rTz+ obDb/99aRtlt+wByM6rajNibTEKVPInCTowBGJS0Un5g7BPG3kYwb4kqjJ85V2gv JooIK5Ee1BpTJhvQy3m1n9nVpTf7PtUNxz/fOMRPaTYSRspy20rE1IW5QSsvrh60 kDkeh8zLk9vFehP+QaQov629NOldazJAFOH8IC+EI+W/4uu/5Y6hZnkW/rTMGiS5 OwTYJRjjSz0MMhEiMAE3RHI4j4zWcg== =3j/z -----END PGP SIGNATURE----- --ol44sy6xmafby4sj--