From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5D49EB64DD for ; Wed, 9 Aug 2023 13:38:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8Btky6tTdvG25ZLsauzNmPRJKTtp0p2jrZzqQzvClL8=; b=q2QCPJgjvCS//5OJr0mWGzDGEa C9XBdQIpV/Ig/asXCIf5jvtuqUFxkwM6l7E8y/BUT+cTJOyM2lt2wmx2EQdCWIfBx3DXdtpoJvKil +fcyLJ6ySOkzUCTImUUUNEnKvS35AnvN+BshqAokcjKKJVjjBby3AJLM9tcYeJYxn+HQFaWvbqFog KHcY2uTjk953l7mkm4EW/JtIaRC9DFK3k2N02nSgwewv3ug81Ofx3mri3DR+gj7K1OU3BOsDFzTcT 97l9hB6ZU3gntiOMY+xUA9gUaU+cqdfFIODkzGgQeCCQ2Hz3M1iFYsGqAEs0he6YMW36Dg66OwVGe SoCqkXwg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTjOK-0053RB-13; Wed, 09 Aug 2023 13:38:24 +0000 Received: from 0001.3ffe.de ([2a01:4f8:c0c:9d57::1] helo=mail.3ffe.de) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTjOG-0053P4-38; Wed, 09 Aug 2023 13:38:22 +0000 Received: from 3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id 18516124F; Wed, 9 Aug 2023 15:38:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1691588293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8Btky6tTdvG25ZLsauzNmPRJKTtp0p2jrZzqQzvClL8=; b=r4wKl3ihNbNJWLLG5hf4K10pWKB/qcqJZWT79pdX14Hwy6cFCNoDp523ysrGvSxR0hF0sV S19UUVxjs0tcqcFDwaa/NkVjQnAj2+cyBE5RQNYWGpyiW44j/FWxQygtTL+wtS+237ZPBi AtOsW9She/DFFxiMreuzoOh5io7RuXTgqIlbCCUn4LHHa90Z+A4PZo97sfdrSy4KQLmkYs hhFi301ZV0pK+bOMSJlqwINPWSXFfHk08E4h61f4wk1UScNwCWh6iBthi3AlIm+EDBA4U6 GVakjg8rtPJGDbRJZnIXlKnvbOR8bknUPLybW2kI3kAAfIaJexJ1gSpJk2GYOw== MIME-Version: 1.0 Date: Wed, 09 Aug 2023 15:38:12 +0200 From: Michael Walle To: =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= Cc: Thierry Reding , Laurent Pinchart , Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Douglas Anderson , Andrzej Hajda , Neil Armstrong , Robert Foss , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Pavel Machek , Lee Jones , Hector Martin , Sven Peter , Alyssa Rosenzweig , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Florian Fainelli , Alexander Shiyan , Benson Leung , Guenter Roeck , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Paul Cercueil , Vladimir Zapolskiy , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Conor Dooley , Daire McNamara , Matthias Brugger , AngeloGioacchino Del Regno , =?UTF-8?Q?Jonathan_Neusch?= =?UTF-8?Q?=C3=A4fer?= , Heiko Stuebner , Krzysztof Kozlowski , Alim Akhtar , Palmer Dabbelt , Paul Walmsley , Orson Zhai , Baolin Wang , Chunyan Zhang , Fabrice Gasnier , Maxime Coquelin , Alexandre Torgue , Chen-Yu Tsai , Samuel Holland , Hammer Hsieh , Jonathan Hunter , Nobuhiro Iwamatsu , Sean Anderson , Michal Simek , Johan Hovold , Alex Elder , Greg Kroah-Hartman , Anjelique Melendez , Dmitry Baryshkov , Luca Weiss , Bjorn Andersson , linux-pwm@vger.kernel.org, linux-gpio@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-leds@vger.kernel.org, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, chrome-platform@lists.linux.dev, linux-mips@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-riscv@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev Subject: Re: [PATCH v2 1/2] pwm: Manage owner assignment implicitly for drivers In-Reply-To: <20230804142707.412137-2-u.kleine-koenig@pengutronix.de> References: <20230804142707.412137-1-u.kleine-koenig@pengutronix.de> <20230804142707.412137-2-u.kleine-koenig@pengutronix.de> Message-ID: X-Sender: michael@walle.cc Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230809_063821_388137_39B370AA X-CRM114-Status: GOOD ( 14.14 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Hi, > Instead of requiring each driver to care for assigning the owner member > of struct pwm_ops, handle that implicitly using a macro. Note that the > owner member has to be moved to struct pwm_chip, as the ops structure > usually lives in read-only memory and so cannot be modified. > > The upside is that new lowlevel drivers cannot forget the assignment > and > save one line each. The pwm-crc driver didn't assign .owner, that's not > a problem in practise though as the driver cannot be compiled as a > module. > > Signed-off-by: Uwe Kleine-König ... > drivers/pwm/pwm-sl28cpld.c | 1 - Acked-by: Michael Walle