linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* HID Sensor support for True/Magnetic North usage attributes
@ 2014-05-14  2:14 Reyad Attiyat
  2014-05-16 17:46 ` Srinivas Pandruvada
  0 siblings, 1 reply; 9+ messages in thread
From: Reyad Attiyat @ 2014-05-14  2:14 UTC (permalink / raw)
  To: jic23, Srinivas Pandruvada, linux-kernel, linux-iio

Dear IIO/HID maintainers,

I have a device, Surface Pro, that has the hid-sensor-hub and many
sensors attached. With the help of Srinivas I was able to get them all
working except for the magnometer. It uses the hid-magn-3d driver as
it should but it does not contain an axis (X, Y, Z) usage attributes.
Instead it only has a True North usage attribute. I see two solutions
to this problem and was inquiring which one would work best?

1) Modify the hid-magn-3d driver to handle True North attribute. I
realize there might not be many devices that have this so not sure if
appropriate. I think this could be done; by passing a variable amount
of IIO Channels when setting up the hid-magn-3d driver, depending on
how many axis and/or if it find True/Magnetic North usage attribute.

2) Create a whole new driver that handles True/Magnetic North. This
would not work on my device as it is set to Compass 3D Usage
Attribute. This could be resolved by adding another quirk for the
Surface to ensure it used the new driver.

For both options I think we'd need a new IIO_MOD_NORTH for the
iio_chan_spec, as the current ones don't really apply. I like the
first solution as it could allow for handling of devices with only one
or two axis present. I do realize if the hid-mangn-3d driver was
changed it's name would not make sense anymore and the pattern I'm
notcing is a driver for each HID Usage.

Here's a link to the hid report description with some labels for my device:
Bug 73321 Comment 7
https://bugzilla.kernel.org/show_bug.cgi?id=73321#c7

I'd be willing to work on this. Just wanted to know what would work best

Thank You,
Reyad Attiyat

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

end of thread, other threads:[~2014-05-31 10:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-14  2:14 HID Sensor support for True/Magnetic North usage attributes Reyad Attiyat
2014-05-16 17:46 ` Srinivas Pandruvada
2014-05-24 10:39   ` Jonathan Cameron
2014-05-27  3:20     ` [PATCH] IIO: Support for True/Magnetic north Reyad Attiyat
2014-05-27  3:20       ` [PATCH] IIO: Added iio magn_north ABI documentation Reyad Attiyat
2014-05-27 15:27         ` Srinivas Pandruvada
2014-05-31 10:20           ` Jonathan Cameron
2014-05-27 15:34       ` [PATCH] IIO: Support for True/Magnetic north Srinivas Pandruvada
2014-05-31 10:17         ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).