linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: u.kleine-koenig@pengutronix.de, linux-kernel@vger.kernel.org,
	gregkh <gregkh@linuxfoundation.org>
Cc: f.fainelli@gmail.com, linux-pwm@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	wahrenst@gmx.net, linux-input@vger.kernel.org,
	dmitry.torokhov@gmail.com, gregkh@linuxfoundation.org,
	devel@driverdev.osuosl.org, p.zabel@pengutronix.de,
	linux-gpio@vger.kernel.org, linus.walleij@linaro.org,
	linux-clk@vger.kernel.org, sboyd@kernel.org,
	linux-rpi-kernel@lists.infradead.org, bgolaszewski@baylibre.com,
	andy.shevchenko@gmail.com, Eric Anholt <eric@anholt.net>
Subject: Re: [PATCH v6 00/11] Raspberry Pi PoE HAT fan support
Date: Mon, 11 Jan 2021 22:02:46 +0100	[thread overview]
Message-ID: <47b4dbc7a70d8f900789608e753be6faa36cebeb.camel@suse.de> (raw)
In-Reply-To: <20201211164801.7838-1-nsaenzjulienne@suse.de>

[-- Attachment #1: Type: text/plain, Size: 5092 bytes --]

On Fri, 2020-12-11 at 17:47 +0100, Nicolas Saenz Julienne wrote:
> The aim of this series is to add support to the fan found on RPi's PoE
> HAT. Some commentary on the design can be found below. But the imporant
> part to the people CC'd here not involved with PWM is that, in order to
> achieve this properly, we also have to fix the firmware interface the
> driver uses to communicate with the PWM bus (and many other low level
> functions). Specifically, we have to make sure the firmware interface
> isn't unbound while consumers are still up. So, patch #1 & #2 introduce
> reference counting in the firwmware interface driver and patches #3 to
> #8 update all firmware users. Patches #9 to #11 introduce the new PWM
> driver.
> 
> I sent everything as a single series as the final version of the PWM
> drivers depends on the firwmare fixes, but I'll be happy to split this
> into two separate series if you think it's better.
> 
> --- Original cover letter below ---
> 
> This series aims at adding support to RPi's official PoE HAT fan[1].
> 
> The HW setup is the following:
> 
> > Raspberry Pi                               | PoE HAT                    |
>  arm core -> Mailbox -> RPi co-processor -> I2C -> Atmel MCU -> PWM -> FAN
> 
> The arm cores have only access to the mailbox interface, as i2c0, even if
> physically accessible, is to be used solely by the co-processor
> (VideoCore 4/6).
> 
> This series implements a PWM bus, and has pwm-fan sitting on top of it as per
> this discussion: https://lkml.org/lkml/2018/9/2/486. Although this design has a
> series of shortcomings:
> 
> - It depends on a DT binding: it's not flexible if a new hat shows up with new
>   functionality, we're not 100% sure we'll be able to expand it without
>   breaking backwards compatibility. But without it we can't make use of DT
>   thermal-zones, which IMO is overkill.
> 
> - We're using pwm-fan, writing a hwmon driver would, again, give us more
>   flexibility, but it's not really needed at the moment.
> 
> I personally think that it's not worth the effort, it's unlikely we'll get
> things right in advance. And ultimately, if the RPi people come up with
> something new, we can always write a new driver/bindings from scratch (as in
> not reusing previous code).
> 
> That said, I'm more than happy to change things if there is a consensus that
> another design will do the trick.
> 
> [1] https://www.raspberrypi.org/blog/introducing-power-over-ethernet-poe-hat/
> 
> ---

I'd say at this point the series is pretty clean and, AFAIK, there aren't any
objections. I'm not so sure who should take it, given that it covers numerous
subsystems. Any suggestions on how to handle it?

Regards,
Nicolas

> Changes since v5:
>  - Small cleanups
>  - Add extra code comments
> 
> Changes since v4:
>  - Cleanup devm calls
>  - Rename compatible string so it's unique to the PoE HAT
> 
> Changes since v3:
>  - Split first patch, #1 introduces refcount, then #2 the devm function
>  - Fix touchscreen function
>  - Use kref
> 
> Changes since v2:
>  - Introduce devm_rpi_firmware_get()
>  - Small cleanups in PWM driver
> 
> Changes since v1:
>  - Address PWM driver changes
>  - Fix binding, now with 2 cells
> 
> Nicolas Saenz Julienne (11):
>   firmware: raspberrypi: Keep count of all consumers
>   firmware: raspberrypi: Introduce devm_rpi_firmware_get()
>   clk: bcm: rpi: Release firmware handle on unbind
>   gpio: raspberrypi-exp: Release firmware handle on unbind
>   reset: raspberrypi: Release firmware handle on unbind
>   soc: bcm: raspberrypi-power: Release firmware handle on unbind
>   staging: vchiq: Release firmware handle on unbind
>   input: raspberrypi-ts: Release firmware handle when not needed
>   dt-bindings: pwm: Add binding for RPi firmware PWM bus
>   DO NOT MERGE: ARM: dts: Add RPi's official PoE hat support
>   pwm: Add Raspberry Pi Firmware based PWM bus
> 
>  .../arm/bcm/raspberrypi,bcm2835-firmware.yaml |  20 ++
>  arch/arm/boot/dts/bcm2711-rpi-4-b.dts         |  54 +++++
>  drivers/clk/bcm/clk-raspberrypi.c             |   2 +-
>  drivers/firmware/raspberrypi.c                |  69 +++++-
>  drivers/gpio/gpio-raspberrypi-exp.c           |   2 +-
>  drivers/input/touchscreen/raspberrypi-ts.c    |   2 +-
>  drivers/pwm/Kconfig                           |   9 +
>  drivers/pwm/Makefile                          |   1 +
>  drivers/pwm/pwm-raspberrypi-poe.c             | 216 ++++++++++++++++++
>  drivers/reset/reset-raspberrypi.c             |   2 +-
>  drivers/soc/bcm/raspberrypi-power.c           |   2 +-
>  .../interface/vchiq_arm/vchiq_arm.c           |   2 +-
>  .../pwm/raspberrypi,firmware-poe-pwm.h        |  13 ++
>  include/soc/bcm2835/raspberrypi-firmware.h    |  10 +
>  14 files changed, 395 insertions(+), 9 deletions(-)
>  create mode 100644 drivers/pwm/pwm-raspberrypi-poe.c
>  create mode 100644 include/dt-bindings/pwm/raspberrypi,firmware-poe-pwm.h
> 



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2021-01-11 21:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11 16:47 [PATCH v6 00/11] Raspberry Pi PoE HAT fan support Nicolas Saenz Julienne
2020-12-11 16:47 ` [PATCH v6 01/11] firmware: raspberrypi: Keep count of all consumers Nicolas Saenz Julienne
2020-12-13  5:14   ` Stephen Boyd
2020-12-16 10:37   ` Bartosz Golaszewski
2020-12-11 16:47 ` [PATCH v6 02/11] firmware: raspberrypi: Introduce devm_rpi_firmware_get() Nicolas Saenz Julienne
2020-12-16 10:35   ` Bartosz Golaszewski
2020-12-16 10:37     ` Nicolas Saenz Julienne
2020-12-11 16:47 ` [PATCH v6 03/11] clk: bcm: rpi: Release firmware handle on unbind Nicolas Saenz Julienne
2020-12-13  5:12   ` Stephen Boyd
2020-12-11 16:47 ` [PATCH v6 04/11] gpio: raspberrypi-exp: " Nicolas Saenz Julienne
2020-12-11 16:47 ` [PATCH v6 05/11] reset: raspberrypi: " Nicolas Saenz Julienne
2020-12-11 16:47 ` [PATCH v6 06/11] soc: bcm: raspberrypi-power: " Nicolas Saenz Julienne
2020-12-11 16:47 ` [PATCH v6 07/11] staging: vchiq: " Nicolas Saenz Julienne
2020-12-11 16:47 ` [PATCH v6 08/11] input: raspberrypi-ts: Release firmware handle when not needed Nicolas Saenz Julienne
2020-12-11 18:17   ` Florian Fainelli
2020-12-11 16:47 ` [PATCH v6 09/11] dt-bindings: pwm: Add binding for RPi firmware PWM bus Nicolas Saenz Julienne
2020-12-11 16:47 ` [PATCH v6 10/11] DO NOT MERGE: ARM: dts: Add RPi's official PoE hat support Nicolas Saenz Julienne
2020-12-11 16:48 ` [PATCH v6 11/11] pwm: Add Raspberry Pi Firmware based PWM bus Nicolas Saenz Julienne
2021-01-12  9:18   ` Uwe Kleine-König
2021-01-14 18:44     ` Nicolas Saenz Julienne
2021-01-11 21:02 ` Nicolas Saenz Julienne [this message]
2021-01-12  8:52   ` [PATCH v6 00/11] Raspberry Pi PoE HAT fan support Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47b4dbc7a70d8f900789608e753be6faa36cebeb.camel@suse.de \
    --to=nsaenzjulienne@suse.de \
    --cc=andy.shevchenko@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=eric@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=p.zabel@pengutronix.de \
    --cc=sboyd@kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=wahrenst@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).