lkml.org 
[lkml]   [2022]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] iio: st_magn_core.c: activate always_on attribute
Date
Activate always_on sysfs attribute to add the always_on feature in
st magnetometers.

Signed-off-by: Massimo Toscanelli <massimo.toscanelli@leica-geosystems.com>
---
drivers/iio/magnetometer/st_magn_core.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c
index 0806a1e65ce4..2ab4c286d262 100644
--- a/drivers/iio/magnetometer/st_magn_core.c
+++ b/drivers/iio/magnetometer/st_magn_core.c
@@ -563,9 +563,11 @@ static int st_magn_write_raw(struct iio_dev *indio_dev,
static ST_SENSORS_DEV_ATTR_SAMP_FREQ_AVAIL();
static ST_SENSORS_DEV_ATTR_SCALE_AVAIL(in_magn_scale_available);

+static ST_SENSORS_DEV_ATTR_ALWAYS_ON();
static struct attribute *st_magn_attributes[] = {
&iio_dev_attr_sampling_frequency_available.dev_attr.attr,
&iio_dev_attr_in_magn_scale_available.dev_attr.attr,
+ &iio_dev_attr_always_on.dev_attr.attr,
NULL,
};

--
2.25.1
\
 
 \ /
  Last update: 2022-02-07 10:40    [W:0.100 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site