+static int max31335_read_offset(struct device *dev, long *offset)&value);
+{
+ struct max31335_data *max31335 = dev_get_drvdata(dev);
+ u32 value;
+ int ret;
+
+ ret = regmap_read(max31335->regmap, MAX31335_AGING_OFFSET,
+ if (ret)
+ return ret;
+
+ *offset = value;
This is super dubious, what is the unit of MAX31335_AGING_OFFSET ?
There is not additional information on the AGING_OFFSET register (no
other offset registers).
I treated it as a raw value that user can write/read. Should I drop the
offset implementation?
The value exposed to userspace is in parts per billion. If you can't do
the conversion, then you have to drop it.