Enabling auto-WAKE/SLEEP for mma8654 accelerometer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The driver mma8452.c currently does not and, from the commit logs, plan to support auto-WAKE/SLEEP functionality. I'm endeavoring on adding this support as it would be useful to allow the use of this device to wake the system from suspend. In the current state of the driver, the device will go in to standby (no measurements/interrupts being generated) due to runtime suspend and suspend callbacks.

I've modified the driver to go into/out of auto-WAKE/SLEEP but it removes the capability of Linux PM code suspending and resuming the device. I'm looking for advice on how to make the current Linux power management code and the auto-WAKE/SLEEP code coexist. Some options, both don't seem very reasonable:
1) Optional device tree bindings for mma8652 that will enable auto-WAKE/SLEEP if present, otherwise rely on Linux PM.
a. DT bindings should be hw description only, using a DT binding to specify configuration could be seen as unreasonable.
b. Examples of properties that can be configured for auto-WAKE/SLEEP mode: output data rate during sleep mode, delay till sleep, power mode of sleep (low-noise, normal, high, low-power), etc...
2) Configure device with linux PM on boot, but expose sysfs nodes to allow userspace to configure device and put into auto-WAKE/SLEEP. Also responsible for disabling the PM code that'll put the device into standby.
a. As noted in a commit to this driver, auto-WAKE/SLEEP is a bit complicated and there is no current documented syfsfs inetrace

Any and all suggestions welcome,

Brandon

________________________________
________________________________


Please be advised that this email may contain confidential information. If you are not the intended recipient, please notify us by email by replying to the sender and delete this message. The sender disclaims that the content of this email constitutes an offer to enter into, or the acceptance of, any agreement; provided that the foregoing does not invalidate the binding effect of any digital or other electronic reproduction of a manual signature that is included in any attachment.
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux