lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 20 May 2024 15:03:18 +1200
From: Chris Packham <chris.packham@...iedtelesis.co.nz>
To: jdelvare@...e.com,
	linux@...ck-us.net,
	robh@...nel.org,
	krzk+dt@...nel.org,
	conor+dt@...nel.org,
	ukleinek@...nel.org
Cc: linux-hwmon@...r.kernel.org,
	devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-pwm@...r.kernel.org,
	Chris Packham <chris.packham@...iedtelesis.co.nz>
Subject: [PATCH v3 0/3] hwmon: (adt7475) duty cycle configuration

I have a system that has very over spec'd fans so the amount of noise when they
run at 100% duty cycle is considerable. We have userspace monitoring tools that
will configure appropriate fan control parameters but there is a bit of a delay
between the kernel loading the driver and the userland tools catching up to
configure the fan control. This series adds device properties that allow the
PWM duty cycle to be specified via device properties so the PWM duty cycle can
be reduced as soon as possible.

This series attempts to setup the adt7475 as a pwm provider so that we can
specify these properties. I'm reasonably happy with the devicetree support but
I'm struggling to figure out how to make this work for ACPI (which is actually
the platform I need this on). I figure the ASL is something like

    Device (ADT0) {
        Name (_HID, "PRP0001")
        Name (_CRS, ResourceTemplate () {
            I2cSerialBusV2 (0x2e, ControllerInitiated,
                            100000, AddressingMode7Bit,
                            "^^CH00", 0x00,
                            ResourceConsumer, , Exclusive, )
        })
        Name (_DSD, Package () {
            ToUUID (UUID_DEVICE_PROPERTIES),
            Package () {
                Package () { "compatible", "adi,adt7476" },
            },
            ToUUID (UUID_HIERARCHICAL_DATA_EXTENSION),
            Package () {
                Package () { "fan-0", "FAN0" },
            }
        })
        Name (FAN0, Package () {
            ToUUID (UUID_DEVICE_PROPERTIES),
    	    Package () { 0, 22500, PWM_POLARITY_INVERTED, 255 },
        })
    }

But I've got no idea how to parse that out keeping as much code in common with
the devicetree version.

I'm sending this series out now to get some feedback ton the DT code and
hopefully someone will give me some suggestions for dealing with the ACPI case.

Chris Packham (3):
  dt-bindings: hwmon: Add adt7475 fan/pwm properties
  dt-bindings: hwmon: adt7475: Deprecate adi,pwm-active-state
  hwmon: (adt7475) Add support for configuring initial PWM state

 .../devicetree/bindings/hwmon/adt7475.yaml    | 27 +++++++-
 drivers/hwmon/adt7475.c                       | 63 +++++++++++++++++++
 2 files changed, 88 insertions(+), 2 deletions(-)

-- 
2.45.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ