On 8/11/22 13:14, Shreeya Patel wrote:
+ case IIO_CHAN_INFO_RAW:ltrf216a_set_power_state(data, false) should be called before return.
+ ret = ltrf216a_set_power_state(data, true);
+ if (ret)
+ return ret;
+ mutex_lock(&data->lock);
+ ret = ltrf216a_read_data(data, LTRF216A_ALS_DATA_0);
+ mutex_unlock(&data->lock);
+ if (ret < 0)
+ return ret;
+ *val = ret;
+ ltrf216a_set_power_state(data, false);