Thread (1 message) 1 message, 1 author, 2017-03-17

Re: [PATCH] iio: hid: hid-sensor-accel-3d: Add second ACC sensor support

From: Jonathan Cameron <hidden>
Date: 2017-03-17 13:31:13
Also in: linux-iio


On 17 March 2017 13:16:34 GMT+00:00, Bastien Nocera [off-list ref] wrote:
On Fri, 2017-03-17 at 02:13 +0000, Pandruvada, Srinivas wrote:
quoted
On Thu, 2017-03-16 at 18:20 +0800, Song Hongyan wrote:
quoted
As accelerometer sensor becomes more and more popular, there are
more
user scenarios have been developed, "Hinge" is a very important
usecase
which needs two accelerometer sensors to calculate the included
angle
of keyboard and screen.
In this case, two accelerometer sensors will be exposed. Currently,
IIO interface hasn't other way to distinguish two sensors with same
sensor type, except sensor name. So a new sensor name
"accel_2nd_3d"
is added for secondary accelerometer sensor.
This type of interface will not satisfy all cases. We have some hubs
with  many accelerometers attached. Same case is also true even for
discrete sensors. So there should be some framework way to expose
location of sensors.
So you're nacking as well?
quoted
ACPI has special method called _PLD (Physical Device Location), which
can  be used to specify location of any device. So we need to be able
to export such information to user space. We can add for each sensor
the location information.

I can propose some ABI for exporting location information.
There were patches floating around to do this, but they were never
finished:
http://www.spinics.net/lists/linux-acpi/msg51540.html
We have the location element as defined for the cross_ec sensors.  Taking that general would be fine with me.

 Current options are base and lid, but can be extended to include more.

J
Cheers
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help