RE: [PATCH 2/2] hwmon: (emc2305) fix pwm never being able to set lower

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

 



The value range of the chip's 'FAN DRIVE SETTING' register is 0-255.
But currently, the driver can only set up to 10 values at most (even via
the 'hwmon' subsystem) when the 'thermal' subsystem is reachable, and
there is no way to increase this limit via "emc2305_platform_data".

Should the "pdata->max_state > EMC2305_FAN_MAX_STATE" check be removed?
Or 'EMC2305_FAN_MAX_STATE' should be defined as '0xff'?

This should be the third patch?


> 	pdata = dev_get_platdata(&client->dev);
> 	if (pdata) {
> 		if (!pdata->max_state || pdata->max_state > EMC2305_FAN_MAX_STATE)
> 			return -EINVAL;
> 		data->max_state = pdata->max_state;



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux