Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2441156rda; Wed, 25 Oct 2023 02:54:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGn/k4+v4jRcWbhwyaWXNm6k+hZcW2Mr7SqqG2zL3DZNgqLbOr5bCb/LhsccS7TpK7+/dlu X-Received: by 2002:a25:a292:0:b0:da0:44fa:6cb1 with SMTP id c18-20020a25a292000000b00da044fa6cb1mr5544692ybi.6.1698227652349; Wed, 25 Oct 2023 02:54:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698227652; cv=none; d=google.com; s=arc-20160816; b=t09biGuBjw3BkM6rVEQ0eLpJoA1rIDyFifgEeIcuOI3I3hmQrqDVjlghOGhBVxKjLe DE+wP2qxTDbRl3bKXfeoCCyQx31Y5+I0bVF7HVe03KbVrjhiJit8t4iLq16MIbhNKIor 6iLBgNURGrqjwSaUKpkjZPMTwp9qqhCJZ5ZPUT8sJIrIE8771qjl1TGnVHeeXRgTO2WU hyyXyysZl1aOux6wfZhVT8Ny+9lBFFHRzXI3e0aLJdb0tSNzHHIOSA6sXUVmpv1Dsja/ huHggJ7LQdlAGq5es+gkl9uvoQ1ykWhodY6TniRJNNPotgh70Wc3Fg8XOifUkpjLbKnc ESPw== 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=LTD4JrAeP0aM5Jo0xvesijodsv5mNQArT8pYNHTZ+IY=; fh=0Q/sUDzWINYspSi32bzhjscQGhmeS2ANE2WRsHxiUws=; b=iajjXFBK0E4QLcNUWnFf/wvVYhorRoipxYImtzqFX95RAWdiDkIyYAkEuNkNTZsLB/ ytYYo1rotkwDbb1uATFusJFxg6D7DknaMP6w82ZoHS0yjuNFzASWFexAABk1M5T3l2CA AVlAyBttsPF6aGT/ti9ZTP7cUMI3q0wcWkv28RWthMObA98rVMXC5pAdiken3iHz06uR 3gGqcyvn/74KmtINbBbOVuE34xp+Xm9mrYLvDLYrr+KvKF9Bomeyol0o2kgwIBqXnrF5 z1yuSr96cFXbH5C7t6P0V9wkFfgYEojysNW16oPvuXlK63uZmVytOIFNxhW5boYWxIIT i2ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mess.org header.s=2020 header.b="Dp64/GGq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mess.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id f125-20020a255183000000b00da08c840871si182307ybb.544.2023.10.25.02.54.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 02:54:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@mess.org header.s=2020 header.b="Dp64/GGq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mess.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 75A7E801B892; Wed, 25 Oct 2023 02:54:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233736AbjJYJxn (ORCPT + 99 others); Wed, 25 Oct 2023 05:53:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234684AbjJYJxf (ORCPT ); Wed, 25 Oct 2023 05:53:35 -0400 Received: from gofer.mess.org (gofer.mess.org [88.97.38.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B85B311F; Wed, 25 Oct 2023 02:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1698227607; bh=H1wJkMmM3RLGtqBxcD2SkPsFMAkzEk6Lnx1q4pd00ZY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Dp64/GGqXplxAhkDT3gedu+Sab+eb/+Hyj0bIZlSKcMYYtDGIKUDEQN6fzQa/xlWi o9URUD2793P3Pd8XVPtqKqWTRAWhOiLBqiz+Xj3KOS85yfdWFhDot+7gzeuGebU2Zt /vOhlmP3zxX9lj7KLBn6IJmZx0z20dln14S9n2x6Yzk09UxcjqI8woHLHXZemEA+ms G8jMY417JT8CLRviQBvZbEnnBRm31/RRtknULdvrSajNWMWruQnWO0D1WntEXQ4bp8 kXnb1OiHoBPIJf1LDgFRQcbonrgHZyPUe6PZDp5u9XAfU2Yp3uI/3Mm8Uw7e0+5TWN CKIORt/Tz/lNg== Received: by gofer.mess.org (Postfix, from userid 1000) id DD4071000FC; Wed, 25 Oct 2023 10:53:27 +0100 (BST) Date: Wed, 25 Oct 2023 10:53:27 +0100 From: Sean Young To: Daniel Thompson 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: References: <90728c06-4c6c-b3d2-4723-c24711be2fa5@redhat.com> <20231019105118.64gdzzixwqrztjir@pengutronix.de> <01a505ac-320f-3819-a58d-2b82c1bf2a86@redhat.com> <20231023133417.GE49511@aspen.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231023133417.GE49511@aspen.lan> 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 25 Oct 2023 02:54:08 -0700 (PDT) On Mon, Oct 23, 2023 at 02:34:17PM +0100, Daniel Thompson wrote: > On Sun, Oct 22, 2023 at 11:46:22AM +0100, Sean Young wrote: > > 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()[*]! I must say I do like the look of this. Uwe, how do you feel about: pwm_apply_cansleep() and pwm_apply_atomic()? I know we've talked about pwm_apply_atomic in the past, however I think this this the best option I've seen so far. > 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! Yes, this should have been separated out. Will fix for next version. Thanks, Sean