Re: mma8425 driver: scan_elements name error in_accel_(null)_mag_falling_en

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

 



On 04/03/17 01:08, Schaefer, Brandon wrote:
> Kernel version: 4.1.15
> Part: mma8652
we have some slightly random version issues here, I'm going to guess you
are talking about the mma8452 driver..
> 

> The sysfs node for what I think should be
> in_accel_x&y&z_mag_falling_en is output incorrectly and displayed as
> in_accel_(null)_mag_falling_en. Any suggestions on a fix for this?
Hi Brandon,

I thought the fix for this issue was older than that, but perhaps not:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4b8d80157e5d9
iio: Add missing modifier names to core

I am guessing you have a backported driver as the mma8452 driver back then
didn't support free fall detection and hence wasn't using that modifier.

So pick up that patch above and you should be fine.
> 
> Also, in an unrelated question for a novice with the iio subsystem.
> I've verified that I can read x/y/z raw values, setup thresholds, and
> interrupts are generated. What's the proper way for userspace to poll
> for these interrupts? I can't seem to find documentation on the sysfs
> node to poll. There is no character device node /dev/iio:deviceX
> which I've seen documentation on.
The lack of /dev/iio:deviceX is odd. Are you on a some embedded platform?
Some of the cut down udev equivalents don't always create the nodes
automatically.  You can do it manually if needed using the details available
under sysfs.

Events are handled through an anonymous chardev that can be retrieved
from the main data one via an IOCTL.  Best bet is to look at the demo
code either under staging/iio/documentation or Documentation/tools/iio
if looking at newer kernel source.
> 
> One last question that someone may be able to answer (activity on
> this driver dates back to a year?). A commit removed "TODO:
> autosleep" and opted for runtime pm, but this runtime PM will disable
> interrupts that can be generated by the accelerometer that the system
> can use to wake from a suspended state. The datasheet for the mma8652
> clearly specifies that the accelerometer sleep state is intended to
> be used to wake up a suspended system. Was this not considered when
> opting for runtime pm of the accelerometer?
I suspect the answer to that is no but will have to leave it to the
author of that patch to address.

Martin Cc'd.

Jonathan
> 
> Thanks for any and all help!
> 
> 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
> 

--
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