Hi Jonathan,
Thanks a lot for your review. I will fix most of them in v2, just one
question below.
Best Regards,
Hermes
On 2025/2/9 0:15, Jonathan Cameron wrote:
On Thu, 6 Feb 2025 14:15:17 +0800
Hermes Zhang <Hermes.Zhang@xxxxxxxx> wrote:
+
+ state->last_update = jiffies;
+
+ return 0;
+}
+
+static ssize_t status_show(struct device *dev, struct device_attribute *attr,
+ char *buf)
+{
+ struct iio_dev *indio_dev = dev_to_iio_dev(dev);
+ struct sen_common_state *state = iio_priv(indio_dev);
+ int status;
+ int ret;
+
+ ret = sen_common_status(state->client, &status);
This is custom ABI. So it would need documentation and will need
to overcome quite a high barrier.
Superficially this looks like debug perhaps that should be
in debugfs?
The status is one of the support commands from the chip, we (from
userspace) could read it and notify customer if the sensor is wrong or
not. So it is ued in normal usage, regarding the ABI, I see your point,
so instead of my way, do you have any suggestion for how to handle it in
iio? Thanks.
Best Regards,
Hermes