lkml.org 
[lkml]   [2021]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 3/7] hwmon: (adt7x10) Use devm_hwmon_device_register_with_info
From
Date
On 12/21/21 1:58 PM, Cosmin Tanislav wrote:
> From: Cosmin Tanislav <cosmin.tanislav@analog.com>
>
[ ... ]

> +
> +static int adt7x10_read(struct device *dev, enum hwmon_sensor_types type,
> + u32 attr, int channel, long *val)
> +{
> + struct adt7x10_data *data = dev_get_drvdata(dev);
> +
> + switch (attr) {
> + case hwmon_temp_input:
> + return adt7x10_temp_read(data, 0, val);
> + case hwmon_temp_max:
> + return adt7x10_temp_read(data, 1, val);
> + case hwmon_temp_min:
> + return adt7x10_temp_read(data, 2, val);
> + case hwmon_temp_crit:
> + return adt7x10_temp_read(data, 3, val);

Ok, so you want to keep using the internal "index" to indicate the
array position in the register cache. I _did_ specifically ask
to use defines for index values in this case. You did not explain
why you ignored this. So now you'll have to explain 1) why you
ignored my request and 2) why you want to keep the code as is.

And, _please_, add a To: recipient to your patches. I am getting
tired having to handle the fallout.

Guenter

\
 
 \ /
  Last update: 2021-12-22 04:10    [W:0.088 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site