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

2014-06-10 Thread Reyad Attiyat
Hey Jonathan, I will make the changes you suggested thanks for reviewing this. Any conclusions on the naming, did you want me to change the sysfs name to in_rot_from_north_true/magnetic? On Mon, Jun 9, 2014 at 2:55 PM, Jonathan Cameron ji...@kernel.org wrote: On 03/06/14 00:14, Reyad Attiyat

[PATCH] HID: hid-sensor-hub: Make all locks of dyn_callback_lock disable interrupts.

2014-06-10 Thread Reyad Attiyat
The dynamic callback lock (dyn_callback_lock) must not be interrupted when locked because the lock is used in the interrupt handler function sensor_hub_raw_event(). Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/hid/hid-sensor-hub.c | 31 ++- 1 file

Re: [PATCH] HID: hid-sensor-hub: Make all locks of dyn_callback_lock disable interrupts.

2014-06-10 Thread Reyad Attiyat
Hey Jiri, I read your other email and see this is now staged. You can ignore this sorry for the noise. On Tue, Jun 10, 2014 at 3:11 PM, Reyad Attiyat reyad.atti...@gmail.com wrote: The dynamic callback lock (dyn_callback_lock) must not be interrupted when locked because the lock is used

[PATCH 1/3] IIO: Add iio magn_north ABI documentation

2014-05-28 Thread Reyad Attiyat
Update documentation for HID compass true/magnetic north sensor. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- Documentation/ABI/testing/sysfs-bus-iio | 76 + 1 file changed, 76 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-iio b

[PATCH 2/3] IIO: Add iio_chan modifier for True/Magnetic North HID usages

2014-05-28 Thread Reyad Attiyat
Updated iio_chan_info_enum for compass north sensor usages, including magnetic/true north and tilt compensation. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/iio/industrialio-core.c | 4 include/linux/iio/types.h | 4 2 files changed, 8 insertions(+) diff

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

2014-05-28 Thread Reyad Attiyat
of the iio channels found Updated magn_3d_parse_report to scan for all compass usages and create channels for each Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 278 +- 1 file changed, 183 insertions(+), 95

[PATCH 0/3] IIO: hid-sensor-magn-3d: Add support for compass north usage attribute

2014-05-28 Thread Reyad Attiyat
Update hid-sensor-magn-3d to dynamically create IIO channels Update IIO to include modifiers for true/magnetic north and tilt compensation compass usages Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com Reyad Attiyat (3): IIO: Added iio magn_north ABI documentation IIO: Add iio_chan

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 Reyad Attiyat
, May 28, 2014 at 4:25 PM, Srinivas Pandruvada srinivas.pandruv...@linux.intel.com wrote: 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

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

[PATCH] IIO: Support for True/Magnetic north

2014-05-26 Thread Reyad Attiyat
working on this soon. Thank You, Reyad Attiyat Reyad Attiyat (1): IIO: Added iio magn_north ABI documentation Documentation/ABI/testing/sysfs-bus-iio | 76 + 1 file changed, 76 insertions(+) -- 1.9.0 -- To unsubscribe from this list: send the line

[PATCH] IIO: Added iio magn_north ABI documentation

2014-05-26 Thread Reyad Attiyat
Added documentation for HID magnometer true/magnetic north sensor. --- Documentation/ABI/testing/sysfs-bus-iio | 76 + 1 file changed, 76 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index

[PATCHv2] HID: Debug: Add labels for HID Sensor Usages

2014-05-27 Thread Reyad Attiyat
Add in debugfs report descriptor labels for HID Sensor Usages. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/hid/hid-debug.c | 79 + 1 file changed, 79 insertions(+) diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c

[PATCH] HID: hid-sensor-hub: Set report quirk for Microsoft Surface

2014-05-27 Thread Reyad Attiyat
Add the Microsoft Surface Pro 2 Type/Touch and default device hardware ID's Set report quirk for the device in hid-sensor-hub Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/hid/hid-ids.h| 3 +++ drivers/hid/hid-sensor-hub.c | 9 + 2 files changed, 12 insertions

[PATCH] HID: hid-sensor-hub: Add and set report quirk for Microsoft Surface Pro 2

2014-05-13 Thread Reyad Attiyat
--- drivers/hid/hid-ids.h| 3 +++ drivers/hid/hid-sensor-hub.c | 8 2 files changed, 11 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 34bb220..18e2099 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -633,6 +633,9 @@ #define

[PATCH] HID: Debug: Add labels for HID Sensor Usages

2014-05-13 Thread Reyad Attiyat
--- drivers/hid/hid-debug.c | 79 + 1 file changed, 79 insertions(+) diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index 53b771d..25cc71c 100644 --- a/drivers/hid/hid-debug.c +++ b/drivers/hid/hid-debug.c @@ -272,6 +272,85 @@

[PATCH] HID: hid-sensor-hub: Fix lockdep warning for dynamic callback locks.

2014-05-13 Thread Reyad Attiyat
Changes all dyn_callback_lock spinlocks to spinlocks that disable interrupts. The dynamic callback lock (dyn_callback_lock) must not be interrupted when locked as it is used in an interrupt handler function, sensor_hub_raw_event. --- drivers/hid/hid-sensor-hub.c | 31

Re: [PATCH] HID: hid-sensor-hub: Add and set report quirk for Microsoft Surface Pro 2

2014-05-13 Thread Reyad Attiyat
Ignore this patch I'll have to resend On Tue, May 13, 2014 at 7:53 PM, Reyad Attiyat reyad.atti...@gmail.com wrote: --- drivers/hid/hid-ids.h| 3 +++ drivers/hid/hid-sensor-hub.c | 8 2 files changed, 11 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid

[PATCH] HID: hid-sensor-hub: Add Microsoft Surface Pro 2 HID ID and set report quirk

2014-05-13 Thread Reyad Attiyat
--- drivers/hid/hid-ids.h| 3 +++ drivers/hid/hid-sensor-hub.c | 9 + 2 files changed, 12 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 34bb220..18e2099 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -633,6 +633,9 @@ #define

Re: [PATCH] HID: hid-sensor-hub: Fix lockdep warning for dynamic callback locks.

2014-05-13 Thread Reyad Attiyat
Here is a sample of the kernel lockdep warning I got after turingon dynamic debugging: https://bugzilla.kernel.org/show_bug.cgi?id=73321#c3 On Tue, May 13, 2014 at 8:03 PM, Reyad Attiyat reyad.atti...@gmail.com wrote: Changes all dyn_callback_lock spinlocks to spinlocks that disable

HID Sensor support for True/Magnetic North usage attributes

2014-05-13 Thread Reyad Attiyat
://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 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

[PATCH v3 2/3] iio: types: Added support for rotation from north usage attributes

2014-06-16 Thread Reyad Attiyat
Added the rotation from north usage attributes to the iio modifier enum and to the iio modifier names array. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/iio/industrialio-core.c | 4 include/linux/iio/types.h | 4 2 files changed, 8 insertions(+) diff --git

[PATCH v3 3/3] iio: hid-sensor-magn-3d: Add support for rotation from north usage attributes

2014-06-16 Thread Reyad Attiyat
Added the ability for this driver to scan for a range of hid usage attributes. This allows for dynamic creation of iio channels such as rotation from north and/or magnetic flux axises (X, Y, Z). Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/iio/magnetometer/hid-sensor-magn

[PATCH v3 0/3] IIO: Add support for rotation from north usage attributes

2014-06-16 Thread Reyad Attiyat
channel and value arrays Use proper return errors (-EINVAL) and (-ENOMEM) Reyad Attiyat (3): iio: documentation: Added documentation for rotation from north usage attributes iio: types: Added support for rotation from north usage attributes iio: hid-sensor-magn-3d: Add support

[PATCH v3 1/3] iio: documentation: Added documentation for rotation from north usage attributes

2014-06-16 Thread Reyad Attiyat
Added documentation for the sysfs attributes added by the rotation from north usage attributes. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- Documentation/ABI/testing/sysfs-bus-iio | 79 - 1 file changed, 78 insertions(+), 1 deletion(-) diff --git

Re: [PATCH 2/3] IIO: Add iio_chan modifier for True/Magnetic North HID usages

2014-06-02 Thread Reyad Attiyat
Hey Jonathan, I think we need the naming to explicitly mention north_magnetic instead of just north. Whilst it is obvious what north means when you have north true alongside it, it won't be so obvious if one just has the north attribute to see in a particular driver - if anything I'd have

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

2014-06-02 Thread Reyad Attiyat
points to iio_val[] Updated magn_3d_parse_report to scan for all compass usages and create iio channels for each Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 271 +- 1 file changed, 177 insertions(+), 94

[PATCHv2 2/3] IIO: Add iio_chan modifier for True/Magnetic North HID usages

2014-06-02 Thread Reyad Attiyat
Updated iio modifier enum for compass north usages, including magnetic/true north with tilt compensation. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/iio/industrialio-core.c | 4 include/linux/iio/types.h | 4 2 files changed, 8 insertions(+) diff --git

[PATCHv2 0/3] IIO: Add support for compass north usage attribute

2014-06-02 Thread Reyad Attiyat
The following patches allow the hid-sensor-magn-3d driver to handle the north usage attribute. It allows the driver to dynamically create IIO channels depending on which HID reports are found. Reyad Attiyat (3): IIO: Documentation: Add north attribute to ABI docs IIO: Add iio_chan modifier

[PATCHv2 1/3] IIO: Documentation: Add north attribute to ABI docs

2014-06-02 Thread Reyad Attiyat
Updated ABI documentation to inculde compass north usages. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- Documentation/ABI/testing/sysfs-bus-iio | 76 + 1 file changed, 76 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-iio b

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

2014-06-04 Thread Reyad Attiyat
that are enabled as found. Thanks, Reyad Attiyat -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH] Add HID's to hid-microsoft driver of Surface Type/Touch Cover 2 to fix bug

2014-01-20 Thread Reyad Attiyat
for the device and not hid-multitouch. From 866c814f3f6740a5a79858fdf8bf5bbcdc3b57f8 Mon Sep 17 00:00:00 2001 From: Reyad Attiyat reyad.atti...@gmail.com Date: Mon, 20 Jan 2014 16:24:49 -0600 Subject: [PATCH 1/2] Added in ID's for Surface Type/Touch cover 2 to the hid-microsoft driver --- drivers

Re: [PATCH] Add HID's to hid-microsoft driver of Surface Type/Touch Cover 2 to fix bug

2014-01-20 Thread Reyad Attiyat
On Tue, Jan 21, 2014 at 12:47 AM, Jiri Kosina jkos...@suse.cz wrote: On Mon, 20 Jan 2014, Reyad Attiyat wrote: The below patch fixes a bug 64811 (https://bugzilla.kernel.org/show_bug.cgi?id=64811) of the Microsoft Surface Type/Touch cover 2 devices being detected as a multitouch device

RE: [PATCH] Add HID's to hid-microsoft driver of Surface Type/Touch Cover 2 to fix bug

2014-01-21 Thread Reyad Attiyat
and your special hid driver. Thanks for clearing that up. I understand the proper use of this array now, under this circumstance and am glad to know that there will be no race when added. From 291742873dcf181faf9657b41279487f31302c73 Mon Sep 17 00:00:00 2001 From: Reyad Attiyat reyad.atti

[PATCH] hid-microsoft: Add ID's for Surface Type/Touch Cover 2

2014-01-22 Thread Reyad Attiyat
. The patch adds the hardware id's of the device to hid-microsoft and to the HID special driver array, which makes the device get handled by hid-generic/hid-input properly. Singed-off-by: Reyad Attiyat reyad.atti...@gmail.com Reviewed-by: Benjamin Tissoiresbenjamin.tissoi...@redhat.com

Re: [PATCH 2/2] HID: core: do not scan constant input report

2014-03-31 Thread Reyad Attiyat
Tested on Surface Pro 2 Type Cover 2 on kernel 3.15/multitouch rebased on 3.14. The device is now handled by hid-generic and hid-sensor-hub as expected. There is a newer UEFI and touch cover firmware that I have not tried, as you need windows update to get drivers for this device. I will try and

[PATCH v5 2/4] iio: types: Added support for rotation from north usage attributes

2014-07-09 Thread Reyad Attiyat
Added the rotation from north usage attributes to the iio modifier enum and to the iio modifier names array. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/iio/industrialio-core.c | 4 include/linux/iio/types.h | 4 2 files changed, 8 insertions(+) diff --git

[PATCH v5 4/4] iio: hid-sensor-magn-3d: Add support for rotation from north

2014-07-09 Thread Reyad Attiyat
Add the HID usage attribute ID's and IIO channel info for rotation from north support. Changes from v4 Removed the scan index as this is set dynamically Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 53 ++- 1

[PATCH v5 1/4] iio: Documentation: Add documentation for rotation from north sensor usage attributes

2014-07-09 Thread Reyad Attiyat
Added documentation for the sysfs attributes supported by the rotation from north sensor. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- Documentation/ABI/testing/sysfs-bus-iio | 82 + 1 file changed, 82 insertions(+) diff --git a/Documentation/ABI

[PATCH v5 3/4] iio: hid-sensor-magn-3d: Scan for usage attributes before setting up iio channels

2014-07-09 Thread Reyad Attiyat
formatting Added comment about magn_val_addr and iio_vals Added more debugging information and checks Removed static initalizing of scan_index, it is now set dynamically Use struct iio_chan_spec address field to store magn array index (could be set statically) Signed-off-by: Reyad Attiyat reyad.atti

[PATCH v5 0/4] iio: Add support for rotation from north

2014-07-09 Thread Reyad Attiyat
attribute. The scan_index field is generated when creating an iio channel. Reyad Attiyat (4): iio: Documentation: Add documentation for rotation from north sensor usage attributes iio: types: Added support for rotation from north usage attributes iio: hid-sensor-magn-3d: Scan for usage

Re: [PATCH v5 3/4] iio: hid-sensor-magn-3d: Scan for usage attributes before setting up iio channels

2014-07-09 Thread Reyad Attiyat
and don't believe it needs any other changes Thanks. On Wed, Jul 9, 2014 at 2:30 PM, Reyad Attiyat reyad.atti...@gmail.com wrote: Scan for and count the HID usage attributes supported by the driver. This allows for the driver to only setup the IIO channels for the sensor usages present

Re: [PATCH v5 0/4] iio: Add support for rotation from north

2014-07-09 Thread Reyad Attiyat
parse_report returns (-EINVAL or -ENOMEM) in probe Thanks, Reyad Attiyat On Wed, Jul 9, 2014 at 2:45 PM, Srinivas Pandruvada srinivas.pandruv...@linux.intel.com wrote: On 07/09/2014 12:30 PM, Reyad Attiyat wrote: This series of patches modifies magn-3d driver to handle the rotation from north

[PATCH v7 3/4] iio: hid-sensor-magn-3d: Scan for usage attributes before setting up iio channels

2014-07-20 Thread Reyad Attiyat
Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com Acked-by: Srinivas Pandruvada srinivas.pandruv...@linux.intel.com --- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 152 ++ 1 file changed, 105 insertions(+), 47 deletions(-) diff --git a/drivers/iio/magnetometer/hid

[PATCH v7 2/4] iio: types: Added support for rotation from north usage attributes

2014-07-20 Thread Reyad Attiyat
Added the rotation from north usage attributes to the iio modifier enum and to the iio modifier names array. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com Acked-by: Srinivas Pandruvada srinivas.pandruv...@linux.intel.com --- drivers/iio/industrialio-core.c | 4 include/linux/iio

[PATCH v7 4/4] iio: hid-sensor-magn-3d: Add support for rotation from north

2014-07-20 Thread Reyad Attiyat
Add the HID usage attribute ID's and IIO channel info for rotation from north support. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com Acked-by: Srinivas Pandruvada srinivas.pandruv...@linux.intel.com --- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 53 ++- 1 file

[PATCH v7 0/4] iio: Add support for rotation from north

2014-07-20 Thread Reyad Attiyat
to iio_push_to_buffer Reyad Attiyat (4): iio: Documentation: Add documentation for rotation from north sensor usage attributes iio: types: Added support for rotation from north usage attributes iio: hid-sensor-magn-3d: Scan for usage attributes before setting up iio channels iio: hid-sensor-magn

[PATCH v7 1/4] iio: Documentation: Add documentation for rotation from north sensor usage attributes

2014-07-20 Thread Reyad Attiyat
Added documentation for the sysfs attributes supported by the rotation from north sensor. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com Acked-by: Srinivas Pandruvada srinivas.pandruv...@linux.intel.com --- Documentation/ABI/testing/sysfs-bus-iio | 82 + 1

[PATCH v4 1/4] iio: Documentation: Add documentation for rotation from north sensor usage attributes

2014-06-29 Thread Reyad Attiyat
Added documentation for the sysfs attributes supported by the rotation from north sensor. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- Documentation/ABI/testing/sysfs-bus-iio | 82 + 1 file changed, 82 insertions(+) diff --git a/Documentation/ABI

[PATCH v4 0/4] Add support for rotation from north to the hid-sensor-magn-3d driver

2014-06-29 Thread Reyad Attiyat
the values from the static array of IIO configurations. There is also an array used to store each channel IIO value pointer for each HID usage attribute. Reyad Attiyat (4): iio: Documentation: Add documentation for rotation from north sensor usage attributes iio: types: Added support

[PATCH v4 4/4] iio: hid-sensor-magn-3d: Add support for rotation from north

2014-06-29 Thread Reyad Attiyat
Add the HID usage attribute ID's and IIO channel info for rotation from north support. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 58 ++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH v4 3/4] iio: hid-sensor-magn-3d: Scan for usage attributes before setting up iio channels

2014-06-29 Thread Reyad Attiyat
Scan for and count the HID usage attributes supported by the driver. This allows for the driver to only setup the IIO channels for the sensor usages present in the HID USB reports. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 111

[PATCH v4 2/4] iio: types: Added support for rotation from north usage attributes

2014-06-29 Thread Reyad Attiyat
Added the rotation from north usage attributes to the iio modifier enum and to the iio modifier names array. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/iio/industrialio-core.c | 4 include/linux/iio/types.h | 4 2 files changed, 8 insertions(+) diff --git

Re: [PATCH v4 3/4] iio: hid-sensor-magn-3d: Scan for usage attributes before setting up iio channels

2014-07-08 Thread Reyad Attiyat
Hey Jonathan, Thanks for the review. I'll be sure to fix up all the formatting you mentioned and run it through the checkpatch.pl script. There should be an explanation here of what has changed from one version to the next. Will include updates in future patch notes. The patches should have

Re: [PATCH v4 3/4] iio: hid-sensor-magn-3d: Scan for usage attributes before setting up iio channels

2014-07-08 Thread Reyad Attiyat
in the probe function. Can you review your logic? It is possible that platforms don't have all attributes, so looks like the probe is returnning with error. On 07/07/2014 09:44 AM, Jonathan Cameron wrote: On 30/06/14 03:58, Reyad Attiyat wrote: Scan for and count the HID usage attributes supported

Re: [PATCH v5 0/4] iio: Add support for rotation from north

2014-07-15 Thread Reyad Attiyat
the attached diff, which will fix this. Thanks, Srinivas On 07/09/2014 03:12 PM, Reyad Attiyat wrote: Hey Srinivas, I did look into the panic you sent. I wasn't sure exactly what caused the NULL pointer. I tested it with out applying the last rotation from north patch, so no hid usages

[PATCH v6 4/4] iio: hid-sensor-magn-3d: Add support for rotation from north

2014-07-17 Thread Reyad Attiyat
Add the HID usage attribute ID's and IIO channel info for rotation from north support. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 53 ++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH v6 1/4] iio: Documentation: Add documentation for rotation from north sensor usage attributes

2014-07-17 Thread Reyad Attiyat
Added documentation for the sysfs attributes supported by the rotation from north sensor. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- Documentation/ABI/testing/sysfs-bus-iio | 82 + 1 file changed, 82 insertions(+) diff --git a/Documentation/ABI

[PATCH v6 3/4] iio: hid-sensor-magn-3d: Scan for usage attributes before setting up iio channels

2014-07-17 Thread Reyad Attiyat
-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 149 ++ 1 file changed, 105 insertions(+), 44 deletions(-) diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c index b2b0937

[PATCH v6 0/4] iio: Add support for rotation from north

2014-07-17 Thread Reyad Attiyat
This series of patches modifies magn-3d driver to handle the rotation from north usage. This is done by scanning the report and then building the iio arrays (vals and channels) dynamically. Changes from V5 - Fix kernel panics from dereference Reyad Attiyat (4): iio: Documentation: Add

[PATCH v6 2/4] iio: types: Added support for rotation from north usage attributes

2014-07-17 Thread Reyad Attiyat
Added the rotation from north usage attributes to the iio modifier enum and to the iio modifier names array. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/iio/industrialio-core.c | 4 include/linux/iio/types.h | 4 2 files changed, 8 insertions(+) diff --git

[PATCH] hid: usbhid: Use flag HID_DISCONNECTED when a usb device is removed

2014-07-24 Thread Reyad Attiyat
Set disconnected flag in struct usbhid when a usb device is removed. Check for disconnected flag before sending urb requests. This prevents a kernel panic when a hid driver calls hid_hw_request() after removing a usb device. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/hid

Re: [PATCH] hid: usbhid: Use flag HID_DISCONNECTED when a usb device is removed

2014-07-25 Thread Reyad Attiyat
at 12:13 AM, Reyad Attiyat reyad.atti...@gmail.com wrote: Set disconnected flag in struct usbhid when a usb device is removed. Check for disconnected flag before sending urb requests. This prevents a kernel panic when a hid driver calls hid_hw_request() after removing a usb device. Signed-off

[PATCH] iio: hid-sensor-magn-3d: Fix build warning

2014-07-25 Thread Reyad Attiyat
Fix build warning, sizeof() called on dynamically sized pointer, by removing the call and the dependent function parameter. It is not needed or used in this driver, when pushing values to an iio buffer. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/iio/magnetometer/hid-sensor

Re: [PATCH] iio: hid-sensor-magn-3d: Fix build warning

2014-07-25 Thread Reyad Attiyat
Whoops looks like I typed an extra character, sorry should have caught this. Thanks Sirinivas will resend. On Fri, Jul 25, 2014 at 2:52 PM, Srinivas Pandruvada srinivas.pandruv...@linux.intel.com wrote: On 07/25/2014 12:32 PM, Reyad Attiyat wrote: Fix build warning, sizeof() called

[PATCH v2] iio: hid-sensor-magn-3d: Fix build warning

2014-07-25 Thread Reyad Attiyat
Fix build warning, sizeof() called on dynamically sized pointer, by removing the call and the dependent function parameter. It is not needed or used in this driver, when pushing values to an iio buffer. Changes from v1 - Fix mistake in varible name Signed-off-by: Reyad Attiyat reyad.atti

[PATCH] HID: microsoft: Add quirk for MS Surface Type/Touch cover

2015-06-26 Thread Reyad Attiyat
The newer frimware on MS Surface 2 tablets causes the type and touch cover keyboards to timeout when waiting for reports. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/hid/usbhid/hid-quirks.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hid/usbhid/hid

Re: [PATCH] HID: microsoft: Add quirk for MS Surface Type/Touch cover

2015-06-28 Thread Reyad Attiyat
This is missing a device ID I will need to resubmit Sorry, Reyad Attiyat On Fri, Jun 26, 2015 at 1:00 AM, Reyad Attiyat reyad.atti...@gmail.com wrote: The newer frimware on MS Surface 2 tablets causes the type and touch cover keyboards to timeout when waiting for reports. Signed-off

[PATCH v2] HID: microsoft: Add quirk for MS Surface Type/Touch cover

2015-06-28 Thread Reyad Attiyat
The newer firmware on MS Surface 2 tablets causes the type and touch cover keyboards to timeout when waiting for reports. The quirk HID_QUIRK_NO_INIT_REPORTS allows them to function normally. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/hid/usbhid/hid-quirks.c | 3 +++ 1

[PATCH] usb: xhci: Add support for URB_ZERO_PACKET to bulk/sg transfers

2015-06-28 Thread Reyad Attiyat
This commit checks for the URB_ZERO_PACKET flag and creates an extra zero-length td if the urb transfer length is a multiple of the endpoint max packet length. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/usb/host/xhci-ring.c | 41 - 1

Re: [PATCH] usb: xhci: Add support for URB_ZERO_PACKET to bulk/sg transfers

2015-06-28 Thread Reyad Attiyat
Sorry I have forgotten to change the dp loop check line in the bulk_sg function. Will resubmit. On Sun, Jun 28, 2015 at 7:36 PM, Reyad Attiyat reyad.atti...@gmail.com wrote: This commit checks for the URB_ZERO_PACKET flag and creates an extra zero-length td if the urb transfer length

[PATCH v2] usb: xhci: Add support for URB_ZERO_PACKET to bulk/sg transfers

2015-06-28 Thread Reyad Attiyat
This commmit checks for the URB_ZERO_PACKET flag and creates an extra zero-length td if the urb transfer length is a multiple of the endpoint's max packet length. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/usb/host/xhci-ring.c | 43

[PATCH] mwifiex: usb: Fix double add error when submitting rx urb

2015-06-28 Thread Reyad Attiyat
] ? kthread_create_on_node+0x230/0x230 [ 84.461586] [817e9662] ret_from_fork+0x42/0x70 [ 84.461590] [810cb070] ? kthread_create_on_node+0x230/0x230 [ 84.461593] ---[ end trace 65103af5e6fb3444 ]--- Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/net/wireless/mwifiex/usb.c | 6

[PATCH v3] usb: xhci: Add support for URB_ZERO_PACKET to bulk/sg transfers

2015-07-02 Thread Reyad Attiyat
This commit checks for the URB_ZERO_PACKET flag and creates an extra zero-length td if the urb transfer length is a multiple of the endpoint's max packet length. Signed-off-by: Reyad Attiyat reyad.atti...@gmail.com --- drivers/usb/host/xhci-ring.c | 66

Re: [PATCH v3] usb: xhci: Add support for URB_ZERO_PACKET to bulk/sg transfers

2015-07-02 Thread Reyad Attiyat
once as there is a check in finish_td() to ensure that all td's have been received. If you think I should change anything else please let me know. Thank you, Reyad Attiyat On Thu, Jul 2, 2015 at 1:54 PM, Reyad Attiyat reyad.atti...@gmail.com wrote: This commit checks for the URB_ZERO_PACKET flag

Re: [PATCH v2] usb: xhci: Add support for URB_ZERO_PACKET to bulk/sg transfers

2015-06-29 Thread Reyad Attiyat
these checks as well to keep in line with the their implementation. Do you think this is the best method for creating a zero-length packet, will every trb convert into at least one endpoint packet? Thank you, Reyad Attiyat On Mon, Jun 29, 2015 at 10:48 AM, Mathias Nyman mathias.ny...@intel.com wrote

[PATCH] hid_sensor_magn_3d: Fix scale for rotation from north channels

2015-07-15 Thread Reyad Attiyat
Some devices on a hid sensor hub will not report a measurement unit. This causes the rotation from north channels to have an incorrect scale value. This patch will set the unit to degrees if the maximum value is 360 when the unit exponent value is accounted for. Signed-off-by: Reyad Attiyat

Re: [PATCH] hid_sensor_magn_3d: Fix scale for rotation from north channels

2015-07-19 Thread Reyad Attiyat
Thanks for the review. I don't believe many devices have this problem no need to rush it. On Sun, Jul 19, 2015 at 7:57 AM, Jonathan Cameron ji...@kernel.org wrote: On 15/07/15 08:43, Reyad Attiyat wrote: Some devices on a hid sensor hub will not report a measurement unit. This causes

RE: [PATCH] Add HID's to hid-microsoft driver of Surface Type/Touch Cover 2 to fix bug

2014-01-21 Thread Reyad Attiyat
r this circumstance and am glad to know that there will be no race when added. >> >> From 291742873dcf181faf9657b41279487f31302c73 Mon Sep 17 00:00:00 2001 >> From: Reyad Attiyat >> Date: Tue, 21 Jan 2014 01:22:25 -0600 >> Subject: [PATCH 1/1] Added in HID's for Micr

[PATCH] hid-microsoft: Add ID's for Surface Type/Touch Cover 2

2014-01-22 Thread Reyad Attiyat
. The patch adds the hardware id's of the device to hid-microsoft and to the HID special driver array, which makes the device get handled by hid-generic/hid-input properly. Singed-off-by: Reyad Attiyat Reviewed-by: Benjamin Tissoires --- drivers/hid/hid-core.c | 2 ++ drivers/hid/hid-ids.h

[PATCH] Add HID's to hid-microsoft driver of Surface Type/Touch Cover 2 to fix bug

2014-01-20 Thread Reyad Attiyat
for the device and not hid-multitouch. >From 866c814f3f6740a5a79858fdf8bf5bbcdc3b57f8 Mon Sep 17 00:00:00 2001 From: Reyad Attiyat Date: Mon, 20 Jan 2014 16:24:49 -0600 Subject: [PATCH 1/2] Added in ID's for Surface Type/Touch cover 2 to the hid-microsoft driver --- drivers/hid/hid-ids.h

Re: [PATCH] Add HID's to hid-microsoft driver of Surface Type/Touch Cover 2 to fix bug

2014-01-20 Thread Reyad Attiyat
On Tue, Jan 21, 2014 at 12:47 AM, Jiri Kosina wrote: > On Mon, 20 Jan 2014, Reyad Attiyat wrote: > >> The below patch fixes a bug 64811 >> (https://bugzilla.kernel.org/show_bug.cgi?id=64811) of the Microsoft >> Surface Type/Touch cover 2 devices being detected a

Re: [PATCH 2/3] IIO: Add iio_chan modifier for True/Magnetic North HID usages

2014-06-02 Thread Reyad Attiyat
Hey Jonathan, > > I think we need the naming to explicitly mention north_magnetic instead > of just north. Whilst it is obvious what north means when you have north > true alongside it, it won't be so obvious if one just has the north > attribute > to see in a particular driver - if anything I'd

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

2014-06-02 Thread Reyad Attiyat
points to iio_val[] Updated magn_3d_parse_report to scan for all compass usages and create iio channels for each Signed-off-by: Reyad Attiyat --- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 271 +- 1 file changed, 177 insertions(+), 94 deletions(-) diff --git

[PATCHv2 2/3] IIO: Add iio_chan modifier for True/Magnetic North HID usages

2014-06-02 Thread Reyad Attiyat
Updated iio modifier enum for compass north usages, including magnetic/true north with tilt compensation. Signed-off-by: Reyad Attiyat --- drivers/iio/industrialio-core.c | 4 include/linux/iio/types.h | 4 2 files changed, 8 insertions(+) diff --git a/drivers/iio/industrialio

[PATCHv2 0/3] IIO: Add support for compass north usage attribute

2014-06-02 Thread Reyad Attiyat
The following patches allow the hid-sensor-magn-3d driver to handle the north usage attribute. It allows the driver to dynamically create IIO channels depending on which HID reports are found. Reyad Attiyat (3): IIO: Documentation: Add north attribute to ABI docs IIO: Add iio_chan modifier

[PATCHv2 1/3] IIO: Documentation: Add north attribute to ABI docs

2014-06-02 Thread Reyad Attiyat
Updated ABI documentation to inculde compass north usages. Signed-off-by: Reyad Attiyat --- Documentation/ABI/testing/sysfs-bus-iio | 76 + 1 file changed, 76 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs

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

2014-06-04 Thread Reyad Attiyat
atic channels that are enabled as found. Thanks, Reyad Attiyat -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

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

2014-06-10 Thread Reyad Attiyat
Hey Jonathan, I will make the changes you suggested thanks for reviewing this. Any conclusions on the naming, did you want me to change the sysfs name to "in_rot_from_north_true/magnetic"? On Mon, Jun 9, 2014 at 2:55 PM, Jonathan Cameron wrote: > On 03/06/14 00:14, Reyad

[PATCH] HID: hid-sensor-hub: Make all locks of dyn_callback_lock disable interrupts.

2014-06-10 Thread Reyad Attiyat
The dynamic callback lock (dyn_callback_lock) must not be interrupted when locked because the lock is used in the interrupt handler function sensor_hub_raw_event(). Signed-off-by: Reyad Attiyat --- drivers/hid/hid-sensor-hub.c | 31 ++- 1 file changed, 18 insertions

Re: [PATCH] HID: hid-sensor-hub: Make all locks of dyn_callback_lock disable interrupts.

2014-06-10 Thread Reyad Attiyat
Hey Jiri, I read your other email and see this is now staged. You can ignore this sorry for the noise. On Tue, Jun 10, 2014 at 3:11 PM, Reyad Attiyat wrote: > The dynamic callback lock (dyn_callback_lock) must not be interrupted > when locked because the lock is used in the interrupt h

Re: [PATCH 2/2] HID: core: do not scan constant input report

2014-03-31 Thread Reyad Attiyat
Tested on Surface Pro 2 Type Cover 2 on kernel 3.15/multitouch rebased on 3.14. The device is now handled by hid-generic and hid-sensor-hub as expected. There is a newer UEFI and touch cover firmware that I have not tried, as you need windows update to get drivers for this device. I will try and

[PATCH] IIO: Support for True/Magnetic north

2014-05-26 Thread Reyad Attiyat
working on this soon. Thank You, Reyad Attiyat Reyad Attiyat (1): IIO: Added iio magn_north ABI documentation Documentation/ABI/testing/sysfs-bus-iio | 76 + 1 file changed, 76 insertions(+) -- 1.9.0 -- To unsubscribe from this list: send the line

[PATCH] IIO: Added iio magn_north ABI documentation

2014-05-26 Thread Reyad Attiyat
Added documentation for HID magnometer true/magnetic north sensor. --- Documentation/ABI/testing/sysfs-bus-iio | 76 + 1 file changed, 76 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index

[PATCHv2] HID: Debug: Add labels for HID Sensor Usages

2014-05-27 Thread Reyad Attiyat
Add in debugfs report descriptor labels for HID Sensor Usages. Signed-off-by: Reyad Attiyat --- drivers/hid/hid-debug.c | 79 + 1 file changed, 79 insertions(+) diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index 53b771d..25cc71c

[PATCH] HID: hid-sensor-hub: Set report quirk for Microsoft Surface

2014-05-27 Thread Reyad Attiyat
Add the Microsoft Surface Pro 2 Type/Touch and default device hardware ID's Set report quirk for the device in hid-sensor-hub Signed-off-by: Reyad Attiyat --- drivers/hid/hid-ids.h| 3 +++ drivers/hid/hid-sensor-hub.c | 9 + 2 files changed, 12 insertions(+) diff --git

[PATCH 1/3] IIO: Add iio magn_north ABI documentation

2014-05-28 Thread Reyad Attiyat
Update documentation for HID compass true/magnetic north sensor. Signed-off-by: Reyad Attiyat --- Documentation/ABI/testing/sysfs-bus-iio | 76 + 1 file changed, 76 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing

[PATCH 2/3] IIO: Add iio_chan modifier for True/Magnetic North HID usages

2014-05-28 Thread Reyad Attiyat
Updated iio_chan_info_enum for compass north sensor usages, including magnetic/true north and tilt compensation. Signed-off-by: Reyad Attiyat --- drivers/iio/industrialio-core.c | 4 include/linux/iio/types.h | 4 2 files changed, 8 insertions(+) diff --git a/drivers/iio

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

2014-05-28 Thread Reyad Attiyat
of the iio channels found Updated magn_3d_parse_report to scan for all compass usages and create channels for each Signed-off-by: Reyad Attiyat --- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 278 +- 1 file changed, 183 insertions(+), 95 deletions(-) diff --git

[PATCH 0/3] IIO: hid-sensor-magn-3d: Add support for compass north usage attribute

2014-05-28 Thread Reyad Attiyat
Update hid-sensor-magn-3d to dynamically create IIO channels Update IIO to include modifiers for true/magnetic north and tilt compensation compass usages Signed-off-by: Reyad Attiyat Reyad Attiyat (3): IIO: Added iio magn_north ABI documentation IIO: Add iio_chan modifier for True/Magnetic

  1   2   >