RE: [PATCH v2 1/2] pwm: Manage owner assignment implicitly for drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Uwe,

> -----Original Message-----
> From: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> Sent: Friday, August 4, 2023 11:27 PM
> To: Thierry Reding <thierry.reding@xxxxxxxxx>; Laurent Pinchart
> <Laurent.pinchart@xxxxxxxxxxxxxxxx>
> Cc: Linus Walleij <linus.walleij@xxxxxxxxxx>; Bartosz Golaszewski
> <brgl@xxxxxxxx>; Andy Shevchenko <andy@xxxxxxxxxx>; Douglas Anderson
> <dianders@xxxxxxxxxxxx>; Andrzej Hajda <andrzej.hajda@xxxxxxxxx>; Neil
> Armstrong <neil.armstrong@xxxxxxxxxx>; Robert Foss <rfoss@xxxxxxxxxx>;
> Jonas Karlman <jonas@xxxxxxxxx>; Jernej Skrabec
> <jernej.skrabec@xxxxxxxxx>; David Airlie <airlied@xxxxxxxxx>; Daniel Vetter
> <daniel@xxxxxxxx>; Pavel Machek <pavel@xxxxxx>; Lee Jones
> <lee@xxxxxxxxxx>; Hector Martin <marcan@xxxxxxxxx>; Sven Peter
> <sven@xxxxxxxxxxxxx>; Alyssa Rosenzweig <alyssa@xxxxxxxxxxxxx>; Nicolas
> Ferre <nicolas.ferre@xxxxxxxxxxxxx>; Alexandre Belloni
> <alexandre.belloni@xxxxxxxxxxx>; Claudiu Beznea
> <claudiu.beznea@xxxxxxxxxxxxx>; Ray Jui <rjui@xxxxxxxxxxxx>; Scott
> Branden <sbranden@xxxxxxxxxxxx>; Broadcom internal kernel review list
> <bcm-kernel-feedback-list@xxxxxxxxxxxx>; Florian Fainelli
> <florian.fainelli@xxxxxxxxxxxx>; Alexander Shiyan <shc_work@xxxxxxx>;
> Benson Leung <bleung@xxxxxxxxxxxx>; Guenter Roeck
> <groeck@xxxxxxxxxxxx>; Shawn Guo <shawnguo@xxxxxxxxxx>; Sascha
> Hauer <s.hauer@xxxxxxxxxxxxxx>; Pengutronix Kernel Team
> <kernel@xxxxxxxxxxxxxx>; Fabio Estevam <festevam@xxxxxxxxx>; NXP
> Linux Team <linux-imx@xxxxxxx>; Paul Cercueil <paul@xxxxxxxxxxxxxxx>;
> Vladimir Zapolskiy <vz@xxxxxxxxx>; Kevin Hilman <khilman@xxxxxxxxxxxx>;
> Jerome Brunet <jbrunet@xxxxxxxxxxxx>; Martin Blumenstingl
> <martin.blumenstingl@xxxxxxxxxxxxxx>; Conor Dooley
> <conor.dooley@xxxxxxxxxxxxx>; Daire McNamara
> <daire.mcnamara@xxxxxxxxxxxxx>; Matthias Brugger
> <matthias.bgg@xxxxxxxxx>; AngeloGioacchino Del Regno
> <angelogioacchino.delregno@xxxxxxxxxxxxx>; Jonathan Neuschäfer
> <j.neuschaefer@xxxxxxx>; Heiko Stuebner <heiko@xxxxxxxxx>; Krzysztof
> Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>; Alim Akhtar
> <alim.akhtar@xxxxxxxxxxx>; Palmer Dabbelt <palmer@xxxxxxxxxxx>; Paul
> Walmsley <paul.walmsley@xxxxxxxxxx>; Michael Walle <michael@xxxxxxxx>;
> Orson Zhai <orsonzhai@xxxxxxxxx>; Baolin Wang
> <baolin.wang@xxxxxxxxxxxxxxxxx>; Chunyan Zhang
> <zhang.lyra@xxxxxxxxx>; Fabrice Gasnier <fabrice.gasnier@xxxxxxxxxxx>;
> Maxime Coquelin <mcoquelin.stm32@xxxxxxxxx>; Alexandre Torgue
> <alexandre.torgue@xxxxxxxxxxx>; Chen-Yu Tsai <wens@xxxxxxxx>; Samuel
> Holland <samuel@xxxxxxxxxxxx>; Hammer Hsieh
> <hammerh0314@xxxxxxxxx>; Jonathan Hunter <jonathanh@xxxxxxxxxx>;
> iwamatsu nobuhiro(岩松 信洋 ○DITC□DIT○OST)
> <nobuhiro1.iwamatsu@xxxxxxxxxxxxx>; Sean Anderson
> <sean.anderson@xxxxxxxx>; Michal Simek <michal.simek@xxxxxxx>;
> Johan Hovold <johan@xxxxxxxxxx>; Alex Elder <elder@xxxxxxxxxx>; Greg
> Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>; Anjelique Melendez
> <quic_amelende@xxxxxxxxxxx>; Dmitry Baryshkov
> <dmitry.baryshkov@xxxxxxxxxx>; Luca Weiss <luca@xxxxxxxxx>; Bjorn
> Andersson <quic_bjorande@xxxxxxxxxxx>; linux-pwm@xxxxxxxxxxxxxxx;
> linux-gpio@xxxxxxxxxxxxxxx; dri-devel@xxxxxxxxxxxxxxxxxxxxx;
> linux-leds@xxxxxxxxxxxxxxx; asahi@xxxxxxxxxxxxxxx;
> linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-rpi-kernel@xxxxxxxxxxxxxxxxxxx;
> chrome-platform@xxxxxxxxxxxxxxx; linux-mips@xxxxxxxxxxxxxxx;
> linux-amlogic@xxxxxxxxxxxxxxxxxxx; linux-riscv@xxxxxxxxxxxxxxxxxxx;
> linux-mediatek@xxxxxxxxxxxxxxxxxxx; linux-rockchip@xxxxxxxxxxxxxxxxxxx;
> linux-samsung-soc@xxxxxxxxxxxxxxx;
> linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx; linux-sunxi@xxxxxxxxxxxxxxx;
> linux-tegra@xxxxxxxxxxxxxxx; greybus-dev@xxxxxxxxxxxxxxxx;
> linux-staging@xxxxxxxxxxxxxxx
> Subject: [PATCH v2 1/2] pwm: Manage owner assignment implicitly for drivers
> 
> 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 <u.kleine-koenig@xxxxxxxxxxxxxx>
> ---
>  drivers/gpio/gpio-mvebu.c             |  1 -
>  drivers/gpu/drm/bridge/ti-sn65dsi86.c |  1 -
>  drivers/leds/rgb/leds-qcom-lpg.c      |  1 -
>  drivers/pwm/core.c                    | 24
> ++++++++++++++----------
>  drivers/pwm/pwm-ab8500.c              |  1 -
>  drivers/pwm/pwm-apple.c               |  1 -
>  drivers/pwm/pwm-atmel-hlcdc.c         |  1 -
>  drivers/pwm/pwm-atmel-tcb.c           |  1 -
>  drivers/pwm/pwm-atmel.c               |  1 -
>  drivers/pwm/pwm-bcm-iproc.c           |  1 -
>  drivers/pwm/pwm-bcm-kona.c            |  1 -
>  drivers/pwm/pwm-bcm2835.c             |  1 -
>  drivers/pwm/pwm-berlin.c              |  1 -
>  drivers/pwm/pwm-brcmstb.c             |  1 -
>  drivers/pwm/pwm-clk.c                 |  1 -
>  drivers/pwm/pwm-clps711x.c            |  1 -
>  drivers/pwm/pwm-cros-ec.c             |  1 -
>  drivers/pwm/pwm-dwc.c                 |  1 -
>  drivers/pwm/pwm-ep93xx.c              |  1 -
>  drivers/pwm/pwm-fsl-ftm.c             |  1 -
>  drivers/pwm/pwm-hibvt.c               |  1 -
>  drivers/pwm/pwm-img.c                 |  1 -
>  drivers/pwm/pwm-imx-tpm.c             |  1 -
>  drivers/pwm/pwm-imx1.c                |  1 -
>  drivers/pwm/pwm-imx27.c               |  1 -
>  drivers/pwm/pwm-intel-lgm.c           |  1 -
>  drivers/pwm/pwm-iqs620a.c             |  1 -
>  drivers/pwm/pwm-jz4740.c              |  1 -
>  drivers/pwm/pwm-keembay.c             |  1 -
>  drivers/pwm/pwm-lp3943.c              |  1 -
>  drivers/pwm/pwm-lpc18xx-sct.c         |  1 -
>  drivers/pwm/pwm-lpc32xx.c             |  1 -
>  drivers/pwm/pwm-lpss.c                |  1 -
>  drivers/pwm/pwm-mediatek.c            |  1 -
>  drivers/pwm/pwm-meson.c               |  1 -
>  drivers/pwm/pwm-microchip-core.c      |  1 -
>  drivers/pwm/pwm-mtk-disp.c            |  1 -
>  drivers/pwm/pwm-mxs.c                 |  1 -
>  drivers/pwm/pwm-ntxec.c               |  1 -
>  drivers/pwm/pwm-omap-dmtimer.c        |  1 -
>  drivers/pwm/pwm-pca9685.c             |  1 -
>  drivers/pwm/pwm-pxa.c                 |  1 -
>  drivers/pwm/pwm-raspberrypi-poe.c     |  1 -
>  drivers/pwm/pwm-rcar.c                |  1 -
>  drivers/pwm/pwm-renesas-tpu.c         |  1 -
>  drivers/pwm/pwm-rockchip.c            |  1 -
>  drivers/pwm/pwm-rz-mtu3.c             |  1 -
>  drivers/pwm/pwm-samsung.c             |  1 -
>  drivers/pwm/pwm-sifive.c              |  1 -
>  drivers/pwm/pwm-sl28cpld.c            |  1 -
>  drivers/pwm/pwm-spear.c               |  1 -
>  drivers/pwm/pwm-sprd.c                |  1 -
>  drivers/pwm/pwm-sti.c                 |  1 -
>  drivers/pwm/pwm-stm32-lp.c            |  1 -
>  drivers/pwm/pwm-stm32.c               |  1 -
>  drivers/pwm/pwm-stmpe.c               |  1 -
>  drivers/pwm/pwm-sun4i.c               |  1 -
>  drivers/pwm/pwm-sunplus.c             |  1 -
>  drivers/pwm/pwm-tegra.c               |  1 -
>  drivers/pwm/pwm-tiecap.c              |  1 -
>  drivers/pwm/pwm-tiehrpwm.c            |  1 -
>  drivers/pwm/pwm-twl-led.c             |  2 --
>  drivers/pwm/pwm-twl.c                 |  2 --
>  drivers/pwm/pwm-visconti.c            |  1 -

For Visconti:
Acked-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@xxxxxxxxxxxxx >

Best regards,
  Nobuhiro





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux