Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1227966rda; Mon, 23 Oct 2023 06:34:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGlWIXHmUpP3+rV+Kq1ujuLK3ovoj6qcyyce6WiloW8i7C1viNhsU1AMbXnUFoiekXtRqnF X-Received: by 2002:a05:6a20:549f:b0:130:d5a:e40e with SMTP id i31-20020a056a20549f00b001300d5ae40emr7672217pzk.7.1698068080670; Mon, 23 Oct 2023 06:34:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698068080; cv=none; d=google.com; s=arc-20160816; b=nGyS/KSBn2GAS/UWMbZYVFg3egoaIXr1aW29PI+vse//nTebJxjtUTFmhlzLEgXq4x a1MuPWVPYmJdj+bysGVsycC22V2VOU+UXNWT0L/8Brmsn7xbT2TVxdZcErvInj4KByKb qm38nvp1/opM3T2Pq1IViS8qXPORUg7MgFmjf/1k1MshoHD93rr4ApIX8xDnVhJuLqbk P0yZz/wIRESGFj612YYVOOlK29GsC9HfhwuTcVdoFUteLirmuBjkR6UKW1LfwpObu0mP jQQg2b1n+4wf2cCRcBDQIpRo9dxOQUEx+dePdGR9TY66XlcHgbQoheyCs0Qpkz1XT24U gjmg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ufOU/q/Ep1kAY17X99uhm7aprCNDlkkpHRrj3TivtTs=; fh=7d3/6Ql+HgyWjoSKehzYYkklvNDAK7G3stdQvojGEgM=; b=YcVmxKCvnkVeiX+qKCr3s965Wqg/OA57QdE2PItGxPWl4JIYCX4e1Lttil/Zq2RUG7 v54pn098wIgpGH/L9Q2c4M+LAcdDHeQybA/MaISBuObGQniqg7J4a3LG1KPtCK7XN/3D ispqeeIynl2+KrjmsQgIIMQPZT6qK6wPGyuyn86XlvxJq56wEammxBBLXJgwvgXRKzZH 0jbC2obec0PCPa/t8MojKtgUp7xVbcTUNV4eACYUfGvAmBI77NllzclgyXl6dDGiGKdh jihVB4WnuEjGXj9JJ6kx8xG4XDwoZFbiYvvVr5VBmc4GA36hzxN8dR4+y9gaquhJU170 qwcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sDrgsBPE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id u17-20020a170902e5d100b001c5fd2a242asi6417171plf.363.2023.10.23.06.34.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 06:34:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sDrgsBPE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id A69A4807C75E; Mon, 23 Oct 2023 06:34:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230433AbjJWNe2 (ORCPT + 99 others); Mon, 23 Oct 2023 09:34:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230427AbjJWNeZ (ORCPT ); Mon, 23 Oct 2023 09:34:25 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A447310A for ; Mon, 23 Oct 2023 06:34:21 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40806e40fccso24269545e9.2 for ; Mon, 23 Oct 2023 06:34:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698068060; x=1698672860; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=ufOU/q/Ep1kAY17X99uhm7aprCNDlkkpHRrj3TivtTs=; b=sDrgsBPE4bZH4M/PKfy4fQVZVgIVp8rCzYqRM+ZnS7bqcF40tY2FyVgTLRDmGICji+ gnXeF5b3difY7SUw0rJoX/AfumLTEYKR8uhgw6vWHVtWYliETIT25l6qf3O4b+oy3PKZ YNKVFnxYFVVpY3R80WZP6nKHg/5gOKOlYv1kUojlwVdRTBKwR0el+6GKUlUXIp+dzxUT wcigzZPhsroIZHW2ZgNwxsjNiVODQ+TyMwqp6eE3KM7vxG1WD7EwkXexfpjlKS8EVIpU f1qv4zivizP49ofivbaVDeBo0HCaF/xpIOB6llezMy+4D+OtzpgUgtyJF/FLPNWjY6yi LsiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698068060; x=1698672860; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ufOU/q/Ep1kAY17X99uhm7aprCNDlkkpHRrj3TivtTs=; b=ShGyNk/DRCFNPvC3UE7Fuk9HjHZgYCcVRw9gE940d0oepnNHcAiaerT3RSsz/dY3zE CHVC3lxbR5krbrUk8VLbd43+tgtSnrny0v5p0V8665LiU0QxcUxnRkD/WOMxniEoPtjT ZiuxEMZf1+Yw6NjXn4xuHjTAqsSMz5bm/CdeSvWHrJiA0IeZ055vPWL0JWeDuB4MPU8w K3mQ30Z6J2Z9VFo39/Uhz9j9ZFvCPH1XSfM8loxtbWbFG2HZWd/CqvEaqohcu0ZU5Ssr PHSCTQ7SDDWDx7jxuVT+vAjmHdh/JkDEbBtf/p331DnD8SKX7B8hevvFlkc5LyIi5m0H Adpw== X-Gm-Message-State: AOJu0Yy5DgjQCy3sv7zJxQ5xb7p9bajYk8ZeWx11AwFXAF4d7Abu4eIA dRc/xjbe0DJSgDv0xjXDH5VMAQ== X-Received: by 2002:a05:600c:35c5:b0:405:4002:825a with SMTP id r5-20020a05600c35c500b004054002825amr7494266wmq.13.1698068059941; Mon, 23 Oct 2023 06:34:19 -0700 (PDT) Received: from aspen.lan (aztw-34-b2-v4wan-166919-cust780.vm26.cable.virginm.net. [82.37.195.13]) by smtp.gmail.com with ESMTPSA id 1-20020a05600c028100b004077219aed5sm14125564wmk.6.2023.10.23.06.34.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 06:34:19 -0700 (PDT) Date: Mon, 23 Oct 2023 14:34:17 +0100 From: Daniel Thompson To: Sean Young Cc: Hans de Goede , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , linux-media@vger.kernel.org, linux-pwm@vger.kernel.org, Ivaylo Dimitrov , Thierry Reding , Jonathan Corbet , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , Javier Martinez Canillas , Jean Delvare , Guenter Roeck , Support Opensource , Dmitry Torokhov , Pavel Machek , Lee Jones , Mauro Carvalho Chehab , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , Mark Gross , Liam Girdwood , Mark Brown , Jingoo Han , Helge Deller , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-hwmon@vger.kernel.org, linux-input@vger.kernel.org, linux-leds@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org Subject: Re: [PATCH v3 1/3] pwm: make it possible to apply pwm changes in atomic context Message-ID: <20231023133417.GE49511@aspen.lan> References: <90728c06-4c6c-b3d2-4723-c24711be2fa5@redhat.com> <20231019105118.64gdzzixwqrztjir@pengutronix.de> <01a505ac-320f-3819-a58d-2b82c1bf2a86@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 23 Oct 2023 06:34:37 -0700 (PDT) On Sun, Oct 22, 2023 at 11:46:22AM +0100, Sean Young wrote: > Hi Hans, > > On Sat, Oct 21, 2023 at 11:08:22AM +0200, Hans de Goede wrote: > > On 10/19/23 12:51, Uwe Kleine-K?nig wrote: > > > On Wed, Oct 18, 2023 at 03:57:48PM +0200, Hans de Goede wrote: > > >> On 10/17/23 11:17, Sean Young wrote: > > > I think it's very subjective if you consider this > > > churn or not. > > > > I consider it churn because I don't think adding a postfix > > for what is the default/expected behavior is a good idea > > (with GPIOs not sleeping is the expected behavior). > > > > I agree that this is very subjective and very much goes > > into the territory of bikeshedding. So please consider > > the above my 2 cents on this and lets leave it at that. > > You have a valid point. Let's focus on having descriptive function names. For a couple of days I've been trying to resist the bikeshedding (esp. given the changes to backlight are tiny) so I'll try to keep it as brief as I can: 1. I dislike the do_it() and do_it_cansleep() pairing. It is difficult to detect when a client driver calls do_it() by mistake. In fact a latent bug of this nature can only be detected by runtime testing with the small number of PWMs that do not support configuration from an atomic context. In contrast do_it() and do_it_atomic()[*] means that although incorrectly calling do_it() from an atomic context can be pretty catastrophic it is also trivially detected (with any PWM driver) simply by running with CONFIG_DEBUG_ATOMIC_SLEEP. No objections (beyond churn) to fully spelt out pairings such as do_it_cansleep() and do_it_atomic()[*]! 2. If there is an API rename can we make sure the patch contains no other changes (e.g. don't introduce any new API in the same patch). Seperating renames makes the patches easier to review! It makes each one smaller and easier to review! Daniel. [*] or do_it_nosleep()... etc.