How to open an input-polldev device from userspace
I am attempting to get the drivers/hwmon/mxc_mma8451 i2c driver happenning.
This driver invokes input_register_polled_device. When it operates, it creates a directory structure at /sys/devices/virtual/input/inputN (where N is a number.)
When the module loads, it does about 3 polls, then stops, going into standby mode.
There is an "enable" file. I tried writing 1 to it, but this does not cause polling to resume.
Looking at the code in input-polldev.c, polling should be enabled if the device is "opened", or rather the function pointer dev->open is invoked, where dev is the argument to input_register_polled_device.
I have trawled through many kernel files that invoke input_register_polled_device. None of them invoke "open", or even include the string "open" in their code. So my question is, what file from userspace is opened to get the open function to run?
I would also appreciate a link to any documentation on this subject.
|