Re: [PATCH v3 3/3] pwm: argon-fan-hat: Add Argon40 Fan HAT support

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

 



On 6/17/25 4:02 PM, Uwe Kleine-König wrote:
Hello Marek,

Hi,

+static int argon_fan_hat_write(struct i2c_client *i2c, const u8 wfhw)
+{
+	u8 tx[2] = { 0x80, wfhw };

The vendor "driver" has `ADDR_ARGONONEREG_DUTYCYCLE=0x80`, maybe put that
into a define, too?

+	struct i2c_msg msg = {
+		.addr = i2c->addr,
+		.len = 2,
+		.buf = tx,
+	};
+
+	return (i2c_transfer(i2c->adapter, &msg, 1) == 1) ? 0 : -EINVAL;

The vendor driver uses smbus stuff. I suggest to use
i2c_smbus_write_byte_data() here, too.

I also found that the vendor driver reads the duty-cycle register (using
i2c_smbus_read_byte_data()). Strange that this stops the fan.

So it seems.

[...]

+static void argon_fan_hat_i2c_shutdown(struct i2c_client *i2c)
+{
+	argon_fan_hat_write(i2c, 100);
+}

Isn't that something that the fan driver should cope for? PWM drivers
usually do nothing on shutdown.
It's probably best to force the blower fan to maximum before reboot/shutdown. The firmware might not handle the fan and the SoC might get very hot before Linux boots again.

The rest is addressed in V4.




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux