Re: [PATCH 02/11] hwmon: (max6650) Introduce pwm_to_dac and dac_to_pwm

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

 




> On Apr 23, 2019, at 09:33, Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
> 
> -
> +	dac = pwm_to_dac(pwm, data->config & MAX6650_CFG_V12);
> +	err = i2c_smbus_write_byte_data(client, MAX6650_REG_DAC, dac);
> +	if (!err)
> +		data->dac = dac;
> 	mutex_unlock(&data->update_lock);
> 
> 	return err < 0 ? err : count;

When I created max6650_set_cur_state, I copied over the pwm1_store code. I ended
up with a "return err < 0 ? ..." which I adjusted. However, as my colleague
pointed out, the set_cur_state return style matches that of
i2c_smbus_write_byte_data so we should simply "return err;" in
max6650_set_cur_state. Since the driver is in great flux state right now, I
cannot make a patch only for that and you should probably just include that in
your series. Or I can submit it later when your series is applied?






[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