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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 983D0C04FE0 for ; Sat, 5 Aug 2023 20:36:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 869F910E035; Sat, 5 Aug 2023 20:36:17 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id ACAD410E035 for ; Sat, 5 Aug 2023 20:36:14 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AA75960ED2; Sat, 5 Aug 2023 20:36:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8402EC433C7; Sat, 5 Aug 2023 20:36:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691267773; bh=HV9N1662vFNg45/injmUeZzoXqqRaYKc6xS67ObhrCE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=T8b37KpHrfdrHcPTjbp9eehNf/qy/zQ094uspwpe3knxbV/SAwFyOO+iL6poGeRt5 mmN2THgQL8TANiBbUZTIqmUiv0S7zyq3SAoSc1CzwM7lN991SYLqic8rCimc7bWwRI Vu7ZXvkbMfRfxqG+wpJINgbL+2KpSYU+uMd2Pk44r5RPsQzRq94XsuoRFZfLcF3djQ F5MggUSz0nkmmAejuORlF5VcmTYFbpwgyjqW04dzJAO9QAMzfqz5myArTvUzYEHRfd 0AdEI801aM4xbN8FAEhz4+QIYaCxO1e4lYxIngw3YRdHEiuSSaRBpD/K+KyiSmsD0z 8QDHViYep2Zwg== Date: Sat, 5 Aug 2023 22:36:10 +0200 From: Andi Shyti To: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= Subject: Re: [PATCH v2 1/2] pwm: Manage owner assignment implicitly for drivers Message-ID: <20230805203610.jl7eea2lasmg2as2@intel.intel> References: <20230804142707.412137-1-u.kleine-koenig@pengutronix.de> <20230804142707.412137-2-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230804142707.412137-2-u.kleine-koenig@pengutronix.de> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, Conor Dooley , Pavel Machek , Nobuhiro Iwamatsu , linux-stm32@st-md-mailman.stormreply.com, Jerome Brunet , linux-samsung-soc@vger.kernel.org, Robert Foss , Samuel Holland , Sean Anderson , Kevin Hilman , Hammer Hsieh , NXP Linux Team , linux-sunxi@lists.linux.dev, Sascha Hauer , Andy Shevchenko , Alex Elder , Scott Branden , Daire McNamara , Greg Kroah-Hartman , Michael Walle , Pengutronix Kernel Team , Claudiu Beznea , Alexandre Belloni , Alim Akhtar , Thierry Reding , Guenter Roeck , chrome-platform@lists.linux.dev, Bjorn Andersson , Chunyan Zhang , Bartosz Golaszewski , Lee Jones , Jonathan Hunter , linux-rockchip@lists.infradead.org, Martin Blumenstingl , linux-gpio@vger.kernel.org, Fabrice Gasnier , linux-rpi-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, Michal Simek , linux-arm-kernel@lists.infradead.org, Neil Armstrong , greybus-dev@lists.linaro.org, Hector Martin , Douglas Anderson , Maxime Coquelin , Matthias Brugger , Laurent Pinchart , Andrzej Hajda , Alyssa Rosenzweig , Alexander Shiyan , linux-staging@lists.linux.dev, Jernej Skrabec , Luca Weiss , Chen-Yu Tsai , Broadcom internal kernel review list , Orson Zhai , linux-pwm@vger.kernel.org, Jonas Karlman , Ray Jui , Jonathan =?utf-8?Q?Neusch=C3=A4fer?= , Vladimir Zapolskiy , Baolin Wang , asahi@lists.linux.dev, Shawn Guo , Anjelique Melendez , Alexandre Torgue , linux-mips@vger.kernel.org, Paul Cercueil , linux-riscv@lists.infradead.org, linux-leds@vger.kernel.org, Florian Fainelli , Sven Peter , Johan Hovold , linux-mediatek@lists.infradead.org, Paul Walmsley , linux-tegra@vger.kernel.org, AngeloGioacchino Del Regno , Nicolas Ferre , Krzysztof Kozlowski , Palmer Dabbelt , Dmitry Baryshkov Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Uwe, On Fri, Aug 04, 2023 at 04:27:06PM +0200, Uwe Kleine-König wrote: > 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 /practise/practice/ > module. > > Signed-off-by: Uwe Kleine-König Acked-by: Andi Shyti Thanks, Andi