Linux-IIO Archive on lore.kernel.org
 help / color / Atom feed
* [RFC PATCH 0/3] io: imu: st_lsm6dsx: wake on acc event
@ 2019-06-14 12:26 Sean Nyekjaer
  2019-06-14 12:26 ` [RFC PATCH 1/3] iio: imu: st_lsm6dsx: add wake on accelerometer threshold Sean Nyekjaer
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Sean Nyekjaer @ 2019-06-14 12:26 UTC (permalink / raw)
  To: linux-iio, jic23; +Cc: Sean Nyekjaer, lorenzo.bianconi83, denis.ciocca, martin

Hi,

The first patch enables the wake event creation in the suspend function,
it hardcodes the accelerometer to low power mode and the gyro is powered down.

The second and third patch is where I have some questions.
Is it okay to create an sysfs entry that can enable and disable the wake
events from the accelerometer?

The third patch is enabling us to set the threshold value.
Obviously this will need to be changed to represent a real value instead
of the raw register value.
Maybe I need to add a threshold avaliable sysfs entry?
Do I set it to a raw value calculated from the scale value or is some have
a better idea?

Finally is this the right approach to enable wake on accelerometer
events?
Please provide some idea's to how we could do it in the best and most
generic way.

/Sean

Sean Nyekjaer (3):
  iio: imu: st_lsm6dsx: add wake on accelerometer threshold
  iio: imu: st_lsm6dsx: add wake on accelerometer enable hook in sysfs
  iio: imu: st_lsm6dsx: add wake on accelerometer threshold hook in
    sysfs

 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h      |   2 +
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 135 +++++++++++++++++++
 2 files changed, 137 insertions(+)

-- 
2.22.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, back to index

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-14 12:26 [RFC PATCH 0/3] io: imu: st_lsm6dsx: wake on acc event Sean Nyekjaer
2019-06-14 12:26 ` [RFC PATCH 1/3] iio: imu: st_lsm6dsx: add wake on accelerometer threshold Sean Nyekjaer
2019-06-15  8:30   ` Lorenzo Bianconi
2019-06-14 12:26 ` [RFC PATCH 2/3] iio: imu: st_lsm6dsx: add wake on accelerometer enable hook in sysfs Sean Nyekjaer
2019-06-15  8:38   ` Lorenzo Bianconi
2019-06-16 13:30   ` Jonathan Cameron
2019-06-17 16:29     ` Sean Nyekjaer
2019-06-14 12:26 ` [RFC PATCH 3/3] iio: imu: st_lsm6dsx: add wake on accelerometer threshold " Sean Nyekjaer
2019-06-15  8:35   ` Lorenzo Bianconi
2019-06-16 13:42     ` Jonathan Cameron
2019-06-16 13:24 ` [RFC PATCH 0/3] io: imu: st_lsm6dsx: wake on acc event Jonathan Cameron
2019-06-16 13:27   ` Jonathan Cameron

Linux-IIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-iio/0 linux-iio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iio linux-iio/ https://lore.kernel.org/linux-iio \
		linux-iio@vger.kernel.org linux-iio@archiver.kernel.org
	public-inbox-index linux-iio


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-iio


AGPL code for this site: git clone https://public-inbox.org/ public-inbox