All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] HID Sensor hub driver fixes
@ 2015-01-07 18:14 Srinivas Pandruvada
  2015-01-07 18:14 ` [PATCH 1/2] HID: hid-sensor-hub: Correct documentation Srinivas Pandruvada
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Srinivas Pandruvada @ 2015-01-07 18:14 UTC (permalink / raw)
  To: jkosina, jic23; +Cc: linux-iio, linux-input, Srinivas Pandruvada

Address two bug fixes in the existing code.

Srinivas Pandruvada (2):
  HID: hid-sensor-hub: Correct documentation
  HID: sensor-hub: correct dyn_callback_lock IRQ-safe change

 drivers/hid/hid-sensor-hub.c   | 8 +++++---
 include/linux/hid-sensor-hub.h | 5 +++++
 2 files changed, 10 insertions(+), 3 deletions(-)

-- 
1.9.3


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

* [PATCH 1/2] HID: hid-sensor-hub: Correct documentation
  2015-01-07 18:14 [PATCH 0/2] HID Sensor hub driver fixes Srinivas Pandruvada
@ 2015-01-07 18:14 ` Srinivas Pandruvada
  2015-01-10 22:21   ` Jonathan Cameron
  2015-01-07 18:14 ` [PATCH 2/2] HID: sensor-hub: correct dyn_callback_lock IRQ-safe change Srinivas Pandruvada
       [not found] ` <1420654484-6410-1-git-send-email-srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
  2 siblings, 1 reply; 10+ messages in thread
From: Srinivas Pandruvada @ 2015-01-07 18:14 UTC (permalink / raw)
  To: jkosina, jic23; +Cc: linux-iio, linux-input, Srinivas Pandruvada

During changes to the interface, some documentation field comments
were missed. Added missing comments.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
 include/linux/hid-sensor-hub.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h
index 51f7cca..4173a8f 100644
--- a/include/linux/hid-sensor-hub.h
+++ b/include/linux/hid-sensor-hub.h
@@ -33,6 +33,8 @@
  * @units:		Measurment unit for this attribute.
  * @unit_expo:		Exponent used in the data.
  * @size:		Size in bytes for data size.
+ * @logical_minimum:	Logical minimum value for this attribute.
+ * @logical_maximum:	Logical maximum value for this attribute.
  */
 struct hid_sensor_hub_attribute_info {
 	u32 usage_id;
@@ -146,6 +148,7 @@ int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev,
 
 /**
 * sensor_hub_input_attr_get_raw_value() - Synchronous read request
+* @hsdev:	Hub device instance.
 * @usage_id:	Attribute usage id of parent physical device as per spec
 * @attr_usage_id:	Attribute usage id as per spec
 * @report_id:	Report id to look for
@@ -160,6 +163,7 @@ int sensor_hub_input_attr_get_raw_value(struct hid_sensor_hub_device *hsdev,
 			u32 attr_usage_id, u32 report_id);
 /**
 * sensor_hub_set_feature() - Feature set request
+* @hsdev:	Hub device instance.
 * @report_id:	Report id to look for
 * @field_index:	Field index inside a report
 * @value:	Value to set
@@ -172,6 +176,7 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
 
 /**
 * sensor_hub_get_feature() - Feature get request
+* @hsdev:	Hub device instance.
 * @report_id:	Report id to look for
 * @field_index:	Field index inside a report
 * @value:	Place holder for return value
-- 
1.9.3


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

* [PATCH 2/2] HID: sensor-hub: correct dyn_callback_lock IRQ-safe change
  2015-01-07 18:14 [PATCH 0/2] HID Sensor hub driver fixes Srinivas Pandruvada
  2015-01-07 18:14 ` [PATCH 1/2] HID: hid-sensor-hub: Correct documentation Srinivas Pandruvada
@ 2015-01-07 18:14 ` Srinivas Pandruvada
       [not found] ` <1420654484-6410-1-git-send-email-srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
  2 siblings, 0 replies; 10+ messages in thread
From: Srinivas Pandruvada @ 2015-01-07 18:14 UTC (permalink / raw)
  To: jkosina, jic23; +Cc: linux-iio, linux-input, Srinivas Pandruvada

Commit 0ccf091d1fbc1f99bb7f93bff8cf346769a9b0cd ("HID: sensor-hub:
make dyn_callback_lock IRQ-safe) was supposed to change locks
in sensor_hub_get_callback(), but missed.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
 drivers/hid/hid-sensor-hub.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
index 6a58b6c..e54ce10 100644
--- a/drivers/hid/hid-sensor-hub.c
+++ b/drivers/hid/hid-sensor-hub.c
@@ -135,8 +135,9 @@ static struct hid_sensor_hub_callbacks *sensor_hub_get_callback(
 {
 	struct hid_sensor_hub_callbacks_list *callback;
 	struct sensor_hub_data *pdata = hid_get_drvdata(hdev);
+	unsigned long flags;
 
-	spin_lock(&pdata->dyn_callback_lock);
+	spin_lock_irqsave(&pdata->dyn_callback_lock, flags);
 	list_for_each_entry(callback, &pdata->dyn_callback_list, list)
 		if (callback->usage_id == usage_id &&
 			(collection_index >=
@@ -145,10 +146,11 @@ static struct hid_sensor_hub_callbacks *sensor_hub_get_callback(
 				callback->hsdev->end_collection_index)) {
 			*priv = callback->priv;
 			*hsdev = callback->hsdev;
-			spin_unlock(&pdata->dyn_callback_lock);
+			spin_unlock_irqrestore(&pdata->dyn_callback_lock,
+					       flags);
 			return callback->usage_callback;
 		}
-	spin_unlock(&pdata->dyn_callback_lock);
+	spin_unlock_irqrestore(&pdata->dyn_callback_lock, flags);
 
 	return NULL;
 }
-- 
1.9.3


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

* Re: [PATCH 1/2] HID: hid-sensor-hub: Correct documentation
  2015-01-07 18:14 ` [PATCH 1/2] HID: hid-sensor-hub: Correct documentation Srinivas Pandruvada
@ 2015-01-10 22:21   ` Jonathan Cameron
       [not found]     ` <54B1A5F0.9080904-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Jonathan Cameron @ 2015-01-10 22:21 UTC (permalink / raw)
  To: Srinivas Pandruvada, jkosina; +Cc: linux-iio, linux-input

On 07/01/15 18:14, Srinivas Pandruvada wrote:
> During changes to the interface, some documentation field comments
> were missed. Added missing comments.
> 
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Applied to the togreg branch of iio.git as absence of docs is irritating
rather than a bug ;)

Thanks,
> ---
>  include/linux/hid-sensor-hub.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h
> index 51f7cca..4173a8f 100644
> --- a/include/linux/hid-sensor-hub.h
> +++ b/include/linux/hid-sensor-hub.h
> @@ -33,6 +33,8 @@
>   * @units:		Measurment unit for this attribute.
>   * @unit_expo:		Exponent used in the data.
>   * @size:		Size in bytes for data size.
> + * @logical_minimum:	Logical minimum value for this attribute.
> + * @logical_maximum:	Logical maximum value for this attribute.
>   */
>  struct hid_sensor_hub_attribute_info {
>  	u32 usage_id;
> @@ -146,6 +148,7 @@ int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev,
>  
>  /**
>  * sensor_hub_input_attr_get_raw_value() - Synchronous read request
> +* @hsdev:	Hub device instance.
>  * @usage_id:	Attribute usage id of parent physical device as per spec
>  * @attr_usage_id:	Attribute usage id as per spec
>  * @report_id:	Report id to look for
> @@ -160,6 +163,7 @@ int sensor_hub_input_attr_get_raw_value(struct hid_sensor_hub_device *hsdev,
>  			u32 attr_usage_id, u32 report_id);
>  /**
>  * sensor_hub_set_feature() - Feature set request
> +* @hsdev:	Hub device instance.
>  * @report_id:	Report id to look for
>  * @field_index:	Field index inside a report
>  * @value:	Value to set
> @@ -172,6 +176,7 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
>  
>  /**
>  * sensor_hub_get_feature() - Feature get request
> +* @hsdev:	Hub device instance.
>  * @report_id:	Report id to look for
>  * @field_index:	Field index inside a report
>  * @value:	Place holder for return value
> 


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

* Re: [PATCH 1/2] HID: hid-sensor-hub: Correct documentation
  2015-01-10 22:21   ` Jonathan Cameron
@ 2015-01-10 22:25         ` Jonathan Cameron
  0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Cameron @ 2015-01-10 22:25 UTC (permalink / raw)
  To: Srinivas Pandruvada, jkosina-AlSwsSmVLrQ
  Cc: linux-iio-u79uwXL29TY76Z2rM5mHXA, linux-input-u79uwXL29TY76Z2rM5mHXA

On 10/01/15 22:21, Jonathan Cameron wrote:
> On 07/01/15 18:14, Srinivas Pandruvada wrote:
>> During changes to the interface, some documentation field comments
>> were missed. Added missing comments.
>>
>> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> Applied to the togreg branch of iio.git as absence of docs is irritating
> rather than a bug ;)
Sorry, dopey evening.  This one is Jiri's area not mine so over to him and
backed out of the togreg branch of iio.git.

Sorry about that.

J


> 
> Thanks,
>> ---
>>  include/linux/hid-sensor-hub.h | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h
>> index 51f7cca..4173a8f 100644
>> --- a/include/linux/hid-sensor-hub.h
>> +++ b/include/linux/hid-sensor-hub.h
>> @@ -33,6 +33,8 @@
>>   * @units:		Measurment unit for this attribute.
>>   * @unit_expo:		Exponent used in the data.
>>   * @size:		Size in bytes for data size.
>> + * @logical_minimum:	Logical minimum value for this attribute.
>> + * @logical_maximum:	Logical maximum value for this attribute.
>>   */
>>  struct hid_sensor_hub_attribute_info {
>>  	u32 usage_id;
>> @@ -146,6 +148,7 @@ int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev,
>>  
>>  /**
>>  * sensor_hub_input_attr_get_raw_value() - Synchronous read request
>> +* @hsdev:	Hub device instance.
>>  * @usage_id:	Attribute usage id of parent physical device as per spec
>>  * @attr_usage_id:	Attribute usage id as per spec
>>  * @report_id:	Report id to look for
>> @@ -160,6 +163,7 @@ int sensor_hub_input_attr_get_raw_value(struct hid_sensor_hub_device *hsdev,
>>  			u32 attr_usage_id, u32 report_id);
>>  /**
>>  * sensor_hub_set_feature() - Feature set request
>> +* @hsdev:	Hub device instance.
>>  * @report_id:	Report id to look for
>>  * @field_index:	Field index inside a report
>>  * @value:	Value to set
>> @@ -172,6 +176,7 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
>>  
>>  /**
>>  * sensor_hub_get_feature() - Feature get request
>> +* @hsdev:	Hub device instance.
>>  * @report_id:	Report id to look for
>>  * @field_index:	Field index inside a report
>>  * @value:	Place holder for return value
>>
> 
> --
> 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
> 

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

* Re: [PATCH 1/2] HID: hid-sensor-hub: Correct documentation
@ 2015-01-10 22:25         ` Jonathan Cameron
  0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Cameron @ 2015-01-10 22:25 UTC (permalink / raw)
  To: Srinivas Pandruvada, jkosina; +Cc: linux-iio, linux-input

On 10/01/15 22:21, Jonathan Cameron wrote:
> On 07/01/15 18:14, Srinivas Pandruvada wrote:
>> During changes to the interface, some documentation field comments
>> were missed. Added missing comments.
>>
>> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> Applied to the togreg branch of iio.git as absence of docs is irritating
> rather than a bug ;)
Sorry, dopey evening.  This one is Jiri's area not mine so over to him and
backed out of the togreg branch of iio.git.

Sorry about that.

J


> 
> Thanks,
>> ---
>>  include/linux/hid-sensor-hub.h | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h
>> index 51f7cca..4173a8f 100644
>> --- a/include/linux/hid-sensor-hub.h
>> +++ b/include/linux/hid-sensor-hub.h
>> @@ -33,6 +33,8 @@
>>   * @units:		Measurment unit for this attribute.
>>   * @unit_expo:		Exponent used in the data.
>>   * @size:		Size in bytes for data size.
>> + * @logical_minimum:	Logical minimum value for this attribute.
>> + * @logical_maximum:	Logical maximum value for this attribute.
>>   */
>>  struct hid_sensor_hub_attribute_info {
>>  	u32 usage_id;
>> @@ -146,6 +148,7 @@ int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev,
>>  
>>  /**
>>  * sensor_hub_input_attr_get_raw_value() - Synchronous read request
>> +* @hsdev:	Hub device instance.
>>  * @usage_id:	Attribute usage id of parent physical device as per spec
>>  * @attr_usage_id:	Attribute usage id as per spec
>>  * @report_id:	Report id to look for
>> @@ -160,6 +163,7 @@ int sensor_hub_input_attr_get_raw_value(struct hid_sensor_hub_device *hsdev,
>>  			u32 attr_usage_id, u32 report_id);
>>  /**
>>  * sensor_hub_set_feature() - Feature set request
>> +* @hsdev:	Hub device instance.
>>  * @report_id:	Report id to look for
>>  * @field_index:	Field index inside a report
>>  * @value:	Value to set
>> @@ -172,6 +176,7 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
>>  
>>  /**
>>  * sensor_hub_get_feature() - Feature get request
>> +* @hsdev:	Hub device instance.
>>  * @report_id:	Report id to look for
>>  * @field_index:	Field index inside a report
>>  * @value:	Place holder for return value
>>
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


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

* Re: [PATCH 1/2] HID: hid-sensor-hub: Correct documentation
  2015-01-10 22:25         ` Jonathan Cameron
@ 2015-01-12  8:52             ` Jiri Kosina
  -1 siblings, 0 replies; 10+ messages in thread
From: Jiri Kosina @ 2015-01-12  8:52 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Srinivas Pandruvada, linux-iio-u79uwXL29TY76Z2rM5mHXA,
	linux-input-u79uwXL29TY76Z2rM5mHXA

On Sat, 10 Jan 2015, Jonathan Cameron wrote:

> >> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> > Applied to the togreg branch of iio.git as absence of docs is irritating
> > rather than a bug ;)
> Sorry, dopey evening.  This one is Jiri's area not mine so over to him and
> backed out of the togreg branch of iio.git.
> 
> Sorry about that.

No problem. I guess we have to sort out which tree this whole lot will go 
through anyway.

I haven't yet unfortunately have time go to through the patches at all, so 
I don't know whether they are touching more the HID part or the IIO part. 
It's in my TODO queue.

Thanks,

-- 
Jiri Kosina
SUSE Labs

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

* Re: [PATCH 1/2] HID: hid-sensor-hub: Correct documentation
@ 2015-01-12  8:52             ` Jiri Kosina
  0 siblings, 0 replies; 10+ messages in thread
From: Jiri Kosina @ 2015-01-12  8:52 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: Srinivas Pandruvada, linux-iio, linux-input

On Sat, 10 Jan 2015, Jonathan Cameron wrote:

> >> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> > Applied to the togreg branch of iio.git as absence of docs is irritating
> > rather than a bug ;)
> Sorry, dopey evening.  This one is Jiri's area not mine so over to him and
> backed out of the togreg branch of iio.git.
> 
> Sorry about that.

No problem. I guess we have to sort out which tree this whole lot will go 
through anyway.

I haven't yet unfortunately have time go to through the patches at all, so 
I don't know whether they are touching more the HID part or the IIO part. 
It's in my TODO queue.

Thanks,

-- 
Jiri Kosina
SUSE Labs

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

* Re: [PATCH 0/2] HID Sensor hub driver fixes
  2015-01-07 18:14 [PATCH 0/2] HID Sensor hub driver fixes Srinivas Pandruvada
@ 2015-02-17 12:35     ` Jiri Kosina
  2015-01-07 18:14 ` [PATCH 2/2] HID: sensor-hub: correct dyn_callback_lock IRQ-safe change Srinivas Pandruvada
       [not found] ` <1420654484-6410-1-git-send-email-srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
  2 siblings, 0 replies; 10+ messages in thread
From: Jiri Kosina @ 2015-02-17 12:35 UTC (permalink / raw)
  To: Srinivas Pandruvada
  Cc: jic23-DgEjT+Ai2ygdnm+yROfE0A, linux-iio-u79uwXL29TY76Z2rM5mHXA,
	linux-input-u79uwXL29TY76Z2rM5mHXA

On Wed, 7 Jan 2015, Srinivas Pandruvada wrote:

> Address two bug fixes in the existing code.
> 
> Srinivas Pandruvada (2):
>   HID: hid-sensor-hub: Correct documentation
>   HID: sensor-hub: correct dyn_callback_lock IRQ-safe change
> 
>  drivers/hid/hid-sensor-hub.c   | 8 +++++---
>  include/linux/hid-sensor-hub.h | 5 +++++
>  2 files changed, 10 insertions(+), 3 deletions(-)

Applied to for-3.20/upstream-fixes. Thanks,

-- 
Jiri Kosina
SUSE Labs

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

* Re: [PATCH 0/2] HID Sensor hub driver fixes
@ 2015-02-17 12:35     ` Jiri Kosina
  0 siblings, 0 replies; 10+ messages in thread
From: Jiri Kosina @ 2015-02-17 12:35 UTC (permalink / raw)
  To: Srinivas Pandruvada; +Cc: jic23, linux-iio, linux-input

On Wed, 7 Jan 2015, Srinivas Pandruvada wrote:

> Address two bug fixes in the existing code.
> 
> Srinivas Pandruvada (2):
>   HID: hid-sensor-hub: Correct documentation
>   HID: sensor-hub: correct dyn_callback_lock IRQ-safe change
> 
>  drivers/hid/hid-sensor-hub.c   | 8 +++++---
>  include/linux/hid-sensor-hub.h | 5 +++++
>  2 files changed, 10 insertions(+), 3 deletions(-)

Applied to for-3.20/upstream-fixes. Thanks,

-- 
Jiri Kosina
SUSE Labs

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

end of thread, other threads:[~2015-02-17 12:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-07 18:14 [PATCH 0/2] HID Sensor hub driver fixes Srinivas Pandruvada
2015-01-07 18:14 ` [PATCH 1/2] HID: hid-sensor-hub: Correct documentation Srinivas Pandruvada
2015-01-10 22:21   ` Jonathan Cameron
     [not found]     ` <54B1A5F0.9080904-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-01-10 22:25       ` Jonathan Cameron
2015-01-10 22:25         ` Jonathan Cameron
     [not found]         ` <54B1A6DA.8080103-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-01-12  8:52           ` Jiri Kosina
2015-01-12  8:52             ` Jiri Kosina
2015-01-07 18:14 ` [PATCH 2/2] HID: sensor-hub: correct dyn_callback_lock IRQ-safe change Srinivas Pandruvada
     [not found] ` <1420654484-6410-1-git-send-email-srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-02-17 12:35   ` [PATCH 0/2] HID Sensor hub driver fixes Jiri Kosina
2015-02-17 12:35     ` Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.