[PATCH 2/2] realtek: add support for HPE 1920-24G-PoE-370w

Bjørn Mork bjorn at mork.no
Sun Sep 22 02:50:57 PDT 2024


Evan Jobling <evan.jobling at mslsc.com.au> writes:

>> I wrote this as a proof-of-concept many years ago:
>> https://github.com/bmork/openwrt/commit/8043178a6bf439ebd7665c0ad1e36aa89847fc38
>> 
>> Maybe usable as a start for someone?
>
> First, this is excellent thanks.
>
> Are you able to elaborate on any further work you think is required?
> I don't know where to start, other than "make it build",
> "port to Kernel 6.6" and then "configure the device tree correctly."

I believe that's pretty much it.  If you already have a "cooling-device"
implementation using the gpio-fan driver, then you just have to extend
the thermal-zone with cooling-maps and trips.  See
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/thermal/thermal-zones.yaml

The RPi PoE hat device tree overlay is another example of adding a
cooling-device (fan) into an existing thermal-zone with a sensor:

https://github.com/raspberrypi/linux/blob/rpi-6.6.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts

We obviously don't want overlays - just think of it as a device tree
diff.  And the trip point params are also irrelevant.  AFAICS,
thermal_of will set THERMAL_TRIP_FLAG_RW_TEMP. So the trip points should
be configurable from userspace using sysfs.  Unless I'm missing
something.

In any case, a fixed high/low setting like OEM is probably good enough
for most users.

> Whilst I've done C. My kernel device driver experience approximates zero.

I've never written thermal drver either.  There's only one way out of
that :-)


Bjørn



More information about the openwrt-devel mailing list