Fwd: [PATCH 3/3] IO: hid-sensor-magn-3d: Add in support for True/Magnetic North HID usages

2014-05-28 Thread Reyad Attiyat
Forgot to forward to list -- Forwarded message -- From: Reyad Attiyat Date: Wed, May 28, 2014 at 4:57 PM Subject: Re: [PATCH 3/3] IO: hid-sensor-magn-3d: Add in support for True/Magnetic North HID usages To: Srinivas Pandruvada Hey Srinivas, > It shouldn't be an is

Re: [PATCH 3/3] IO: hid-sensor-magn-3d: Add in support for True/Magnetic North HID usages

2014-05-28 Thread Srinivas Pandruvada
Hi Reyad, On 05/28/2014 02:35 PM, Reyad Attiyat wrote: Hey Srinivas, Well I could use sensor_hub_input_get_attribute_info() for each usage attribute. I was just thinking that since each usage attribute is found in a row, one for each field I think, it'd be easier to create iio channels that

Re: [PATCH 3/3] IO: hid-sensor-magn-3d: Add in support for True/Magnetic North HID usages

2014-05-28 Thread Reyad Attiyat
Hey Srinivas, Well I could use sensor_hub_input_get_attribute_info() for each usage attribute. I was just thinking that since each usage attribute is found in a row, one for each field I think, it'd be easier to create iio channels that way. This would eliminate running the for loop search for

Re: [PATCH 3/3] IO: hid-sensor-magn-3d: Add in support for True/Magnetic North HID usages

2014-05-28 Thread Srinivas Pandruvada
On 05/28/2014 02:15 PM, Reyad Attiyat wrote: +static void sensor_hub_fill_attr_info( + struct hid_sensor_hub_attribute_info *info, + s32 index, s32 report_id, struct hid_field *field) +{ + info->index = index; + info->report_id = report_id; +

Re: [PATCH 3/3] IO: hid-sensor-magn-3d: Add in support for True/Magnetic North HID usages

2014-05-28 Thread Reyad Attiyat
> +static void sensor_hub_fill_attr_info( > + struct hid_sensor_hub_attribute_info *info, > + s32 index, s32 report_id, struct hid_field *field) > +{ > + info->index = index; > + info->report_id = report_id; > + info->units = field->unit; > +

[PATCH 3/3] IO: hid-sensor-magn-3d: Add in support for True/Magnetic North HID usages

2014-05-28 Thread Reyad Attiyat
Updated magn_3d_channel enum for all possible north channels Added functions to setup iio_chan_spec array depending on a hid usage report Renamed magn_val to iio_val to differentiate the index being used Updated magn_3d_state struct to hold pointer array (magn_val_addr[]) to iio_val and a count

[PATCH 3/3] IO: hid-sensor-magn-3d: Add in support for True/Magnetic North HID usages

2014-05-28 Thread Reyad Attiyat
Updated magn_3d_channel enum for all possible north channels Added functions to setup iio_chan_spec array depending on a hid usage report Renamed magn_val to iio_val to differentiate the index being used Updated magn_3d_state struct to hold pointer array (magn_val_addr[]) to iio_val and a count

Re: [PATCH 3/3] IO: hid-sensor-magn-3d: Add in support for True/Magnetic North HID usages

2014-05-28 Thread Reyad Attiyat
+static void sensor_hub_fill_attr_info( + struct hid_sensor_hub_attribute_info *info, + s32 index, s32 report_id, struct hid_field *field) +{ + info-index = index; + info-report_id = report_id; + info-units = field-unit; + info-unit_expo

Re: [PATCH 3/3] IO: hid-sensor-magn-3d: Add in support for True/Magnetic North HID usages

2014-05-28 Thread Srinivas Pandruvada
On 05/28/2014 02:15 PM, Reyad Attiyat wrote: +static void sensor_hub_fill_attr_info( + struct hid_sensor_hub_attribute_info *info, + s32 index, s32 report_id, struct hid_field *field) +{ + info-index = index; + info-report_id = report_id; +

Re: [PATCH 3/3] IO: hid-sensor-magn-3d: Add in support for True/Magnetic North HID usages

2014-05-28 Thread Reyad Attiyat
Hey Srinivas, Well I could use sensor_hub_input_get_attribute_info() for each usage attribute. I was just thinking that since each usage attribute is found in a row, one for each field I think, it'd be easier to create iio channels that way. This would eliminate running the for loop search for

Re: [PATCH 3/3] IO: hid-sensor-magn-3d: Add in support for True/Magnetic North HID usages

2014-05-28 Thread Srinivas Pandruvada
Hi Reyad, On 05/28/2014 02:35 PM, Reyad Attiyat wrote: Hey Srinivas, Well I could use sensor_hub_input_get_attribute_info() for each usage attribute. I was just thinking that since each usage attribute is found in a row, one for each field I think, it'd be easier to create iio channels that

Fwd: [PATCH 3/3] IO: hid-sensor-magn-3d: Add in support for True/Magnetic North HID usages

2014-05-28 Thread Reyad Attiyat
Forgot to forward to list -- Forwarded message -- From: Reyad Attiyat reyad.atti...@gmail.com Date: Wed, May 28, 2014 at 4:57 PM Subject: Re: [PATCH 3/3] IO: hid-sensor-magn-3d: Add in support for True/Magnetic North HID usages To: Srinivas Pandruvada srinivas.pandruv