Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3360880pxf; Mon, 22 Mar 2021 04:50:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9cjLkXwYQtWvO3TFrODOUfPwEfik1X16Kwfo5EgIL15XHJ7WtDbP+hHxpGfxgJdIDaZz4 X-Received: by 2002:a05:6402:3089:: with SMTP id de9mr25609558edb.10.1616413846954; Mon, 22 Mar 2021 04:50:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616413846; cv=none; d=google.com; s=arc-20160816; b=gYec0AkyKNDv/av7nkeLYgtR8aIdUY+gzLbLWnhDGf6JhnMTMy/Z/FST3vMWU/cR8r I+zy1iI+6oW7ZQ1647Gc1RW10s0UfnNPWMw/61foQIcqtUipZE3TZMszGWnY0pmLZdNI N7fSH/33SjelOJQR589gXqEQkxpARgqYTxm3dB4EdjxM6IjYNPtxxACW8oudPILu5TV0 r3R97xSMROxj6vcfJ2SVdAPBEsyo//7PFLgJz3Dwe9OxSmomOAAkAYAjoj/baOlxbbg9 hXZAOcDLtW9xrjyqeiLcHNVCqx4u6Gcv1AIJC5nyqWiP4B/N7jW6WcfVJAyDT+qk266a j1zQ== 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=dyTAndB4N+PJZY07wnXBQcAzZm7l6HN6oK6GbV32hDU=; b=lGv985Ukh8QuCVsfCzlsNRCeJd+D5wHdSiHHq12Cckjz7oExlEck+jxotYtE060ejw b052vi2lyHe8X0JEjN4OlW1oMZc9iG8U4bpk46IXI/NqXLBfwFRtEiRxFJQg8/9AdmwS GTEw3AGb6nRYErkSlAe/CJW3FfNfinnhbRBv0N8R8gnmng34hYXZIe4X5Gc6g70fDHvn RjwRR0Qqjidcv2fvF++CW/cruvsCsPlxImXTbX7jk5wGjQu/Li4CJr7iXtUlVBL7PlIj 7QdSA2YL/B+I6ncIypM4QYDTwMKeg+t8mL/egZGElkzB2OoOMOob5PxDj2mv9cTRd5Lg hJBg== 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 lz19si12048730ejb.246.2021.03.22.04.50.23; Mon, 22 Mar 2021 04:50:46 -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 S230101AbhCVLs6 (ORCPT + 99 others); Mon, 22 Mar 2021 07:48:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230209AbhCVLsa (ORCPT ); Mon, 22 Mar 2021 07:48:30 -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 EDDB7C061574 for ; Mon, 22 Mar 2021 04:48:29 -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 1lOJ2p-000161-16; Mon, 22 Mar 2021 12:48:27 +0100 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lOJ2o-0002Vt-LM; Mon, 22 Mar 2021 12:48:26 +0100 Date: Mon, 22 Mar 2021 12:48:26 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Andy Shevchenko Cc: Thierry Reding , Clemens Gruber , 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: <20210322114826.ahwhbqxjxfg3nmrf@pengutronix.de> References: <20210111203532.m3yvq6e5bcpjs7mc@pengutronix.de> <20210322112254.5mjkajkq3wnhgnd5@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5irkqxzmkpzjow3i" 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 --5irkqxzmkpzjow3i Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 22, 2021 at 01:40:57PM +0200, Andy Shevchenko wrote: > On Mon, Mar 22, 2021 at 1:22 PM Uwe Kleine-K=F6nig > wrote: > > On Mon, Mar 22, 2021 at 11:38:40AM +0200, Andy Shevchenko wrote: > > > On Monday, March 22, 2021, Thierry Reding = wrote: > > > > On Fri, Jan 29, 2021 at 09:37:47PM +0100, Clemens Gruber wrote: > > > > > Thierry: Would you accept it if we continue to reset the register= s in > > > > > .probe? > > > > > > > > Yes, I think it's fine to continue to reset the registers since tha= t's > > > > basically what the driver already does. It'd be great if you could > > > > follow up with a patch that removes the reset and leaves the hardwa= re in > > > > whatever state the bootloader has set up. Then we can take that pat= ch > > > > for a ride and see if there are any complains about it breaking. If > > > > there are we can always try to fix them, but as a last resort we can > > > > also revert, which then may be something we have to live with. But I > > > > think we should at least try to make this consistent with how other > > > > drivers do this so that people don't stumble over this particular > > > > driver's > > > > > > I guess we may miss (a PCB / silicon design flaw or warm boot case) w= hen > > > boot loader left device completely untouched and device either in wro= ng > > > state because if failed reset (saw this on PCA9555 which has a > > > corresponding errata), or simply we have done a warm reset of the sys= tem. > > > So, we also have to understand how to properly exit. > > > > I don't think that not resetting is a real problem. My argumentation > > goes as follows: > > > > When the PWM driver is loaded and the PWM configuration is invalid, it > > was already invalid for the time between power up (or warm start) and > > PWM driver load time. Then it doesn't really hurt to keep the PWM > > in this invalid state for a little moment longer until the consumer of > > the PWM becomes active. >=20 > But this won't work in the cases when we have a chip with a shared > settings for period and/or duty cycle. You will never have a user come > due to -EBUSY. That's wrong, the first consumer to enable the PWM (in software) is supposed to be able to change the settings. Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --5irkqxzmkpzjow3i Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmBYhAcACgkQwfwUeK3K 7Al+/gf+KpevRNoTs82vxuWQJH4jxHJSMxSLY+TsNTxPSRog+bTjOsA7aR0tHs/S FyX4mIVRSkD1Gq+0j9Te/C1t7W/q5cHik4gwb3WXQ0Pez02viyy8R6JbAOOjonmL mILr0rg77htKLxgb8MXY1QVrsNuqe5tt3npHpW4FCooSrqm0B6M2D5KW53chxoyu f7f5uT3cv8VS1ScstW11FjuTcrWeO3V5w653lA1YScp8LHAp52FFSWh30Um8Pe82 W3PRd0XUbjnrmMWz386ficKkRplWm9TyGGdc8pTBaTiu+NZT6q1ZO08cLlS343j/ Kf3wCXQOxiEfbSQ/Te0hPEoP7sliOw== =Ljaj -----END PGP SIGNATURE----- --5irkqxzmkpzjow3i--