linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: orientation: hid-sensor-rotation: Add PM function
@ 2016-10-25  1:06 Song Hongyan
  2016-10-30 16:22 ` Jonathan Cameron
  0 siblings, 1 reply; 4+ messages in thread
From: Song Hongyan @ 2016-10-25  1:06 UTC (permalink / raw)
  To: linux-iio; +Cc: srinivas.pandruvada, Song Hongyan

Rotation sensor function does not work due to miss PM function.
Add common hid sensor iio pm function for rotation sensor.

Signed-off-by: Song Hongyan <hongyan.song@intel.com>
---
 drivers/iio/orientation/hid-sensor-rotation.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/orientation/hid-sensor-rotation.c b/drivers/iio/orientation/hid-sensor-rotation.c
index b98b9d9..a97e802c 100644
--- a/drivers/iio/orientation/hid-sensor-rotation.c
+++ b/drivers/iio/orientation/hid-sensor-rotation.c
@@ -335,6 +335,7 @@ static int hid_dev_rot_remove(struct platform_device *pdev)
 	.id_table = hid_dev_rot_ids,
 	.driver = {
 		.name	= KBUILD_MODNAME,
+		.pm     = &hid_sensor_pm_ops,
 	},
 	.probe		= hid_dev_rot_probe,
 	.remove		= hid_dev_rot_remove,
-- 
1.9.1


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

* Re: [PATCH] iio: orientation: hid-sensor-rotation: Add PM function
  2016-10-25  1:06 [PATCH] iio: orientation: hid-sensor-rotation: Add PM function Song Hongyan
@ 2016-10-30 16:22 ` Jonathan Cameron
  2016-10-31  0:32   ` Pandruvada, Srinivas
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Cameron @ 2016-10-30 16:22 UTC (permalink / raw)
  To: Song Hongyan, linux-iio; +Cc: srinivas.pandruvada

On 25/10/16 02:06, Song Hongyan wrote:
> Rotation sensor function does not work due to miss PM function.
> Add common hid sensor iio pm function for rotation sensor.
> 
> Signed-off-by: Song Hongyan <hongyan.song@intel.com>
Does this completely prevent the driver working or merely make it consume
too much power?

Only really makes a difference to which route it takes to mainline and how
fast it gets there!

Jonathan
> ---
>  drivers/iio/orientation/hid-sensor-rotation.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/iio/orientation/hid-sensor-rotation.c b/drivers/iio/orientation/hid-sensor-rotation.c
> index b98b9d9..a97e802c 100644
> --- a/drivers/iio/orientation/hid-sensor-rotation.c
> +++ b/drivers/iio/orientation/hid-sensor-rotation.c
> @@ -335,6 +335,7 @@ static int hid_dev_rot_remove(struct platform_device *pdev)
>  	.id_table = hid_dev_rot_ids,
>  	.driver = {
>  		.name	= KBUILD_MODNAME,
> +		.pm     = &hid_sensor_pm_ops,
>  	},
>  	.probe		= hid_dev_rot_probe,
>  	.remove		= hid_dev_rot_remove,
> 


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

* Re: [PATCH] iio: orientation: hid-sensor-rotation: Add PM function
  2016-10-30 16:22 ` Jonathan Cameron
@ 2016-10-31  0:32   ` Pandruvada, Srinivas
  2016-11-05 17:49     ` Jonathan Cameron
  0 siblings, 1 reply; 4+ messages in thread
From: Pandruvada, Srinivas @ 2016-10-31  0:32 UTC (permalink / raw)
  To: Song, Hongyan, linux-iio@vger.kernel.org, jic23@kernel.org

T24gU3VuLCAyMDE2LTEwLTMwIGF0IDE2OjIyICswMDAwLCBKb25hdGhhbiBDYW1lcm9uIHdyb3Rl
Og0KPiBPbiAyNS8xMC8xNiAwMjowNiwgU29uZyBIb25neWFuIHdyb3RlOg0KPiA+IA0KPiA+IFJv
dGF0aW9uIHNlbnNvciBmdW5jdGlvbiBkb2VzIG5vdCB3b3JrIGR1ZSB0byBtaXNzIFBNIGZ1bmN0
aW9uLg0KPiA+IEFkZCBjb21tb24gaGlkIHNlbnNvciBpaW8gcG0gZnVuY3Rpb24gZm9yIHJvdGF0
aW9uIHNlbnNvci4NCj4gPiANCj4gPiBTaWduZWQtb2ZmLWJ5OiBTb25nIEhvbmd5YW4gPGhvbmd5
YW4uc29uZ0BpbnRlbC5jb20+DQoNCkZpeGVzOiAyYjg5NjM1ZTlhOWUgKCJpaW86IGhpZF9zZW5z
b3JfaHViOiBDb21tb24gUE0gZnVuY3Rpb25zIikNCg0KPiBEb2VzIHRoaXMgY29tcGxldGVseSBw
cmV2ZW50IHRoZSBkcml2ZXIgd29ya2luZyBvciBtZXJlbHkgbWFrZSBpdA0KPiBjb25zdW1lDQo+
IHRvbyBtdWNoIHBvd2VyPw0KSWYgQ09ORklHX1BNIGlzIG5vdCBkZWZpbmVkLCB0aGVuIHRoaXMg
cHJldmVudHMgdGhpcyBzZW5zb3IgdG8NCmZ1bmN0aW9uLiBTbyBhYm92ZSBjb21taXQgY2F1c2Vk
IHRoaXMuDQoNClRoaXMgc2Vuc29yIHdhcyBzdXBwb3NlZCB0byBiZSBhbHdheXMgb24gdG8gdHJp
Z2dlciB3YWtlIHVwIGluIHByaW9yDQpleHRlcm5hbCBodWJzLiBCdXQgd2l0aCB0aGUgbmV3IElT
SCBodWIgdGhpcyBpcyBub3QgdGhlIGNhc2UuDQo+IA0KPiBPbmx5IHJlYWxseSBtYWtlcyBhIGRp
ZmZlcmVuY2UgdG8gd2hpY2ggcm91dGUgaXQgdGFrZXMgdG8gbWFpbmxpbmUNCj4gYW5kIGhvdw0K
PiBmYXN0IGl0IGdldHMgdGhlcmUhDQpJZiBwb3NzaWJsZSBwdXNoIHRvIDQuOSBhbmQgbWFyayB0
byBzdGFibGUuDQoNClRoYW5rcywNClNyaW5pdmFzDQo=

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

* Re: [PATCH] iio: orientation: hid-sensor-rotation: Add PM function
  2016-10-31  0:32   ` Pandruvada, Srinivas
@ 2016-11-05 17:49     ` Jonathan Cameron
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2016-11-05 17:49 UTC (permalink / raw)
  To: Pandruvada, Srinivas, Song, Hongyan, linux-iio@vger.kernel.org

On 31/10/16 00:32, Pandruvada, Srinivas wrote:
> On Sun, 2016-10-30 at 16:22 +0000, Jonathan Cameron wrote:
>> On 25/10/16 02:06, Song Hongyan wrote:
>>>
>>> Rotation sensor function does not work due to miss PM function.
>>> Add common hid sensor iio pm function for rotation sensor.
>>>
>>> Signed-off-by: Song Hongyan <hongyan.song@intel.com>
> 
> Fixes: 2b89635e9a9e ("iio: hid_sensor_hub: Common PM functions")
> 
>> Does this completely prevent the driver working or merely make it
>> consume
>> too much power?
> If CONFIG_PM is not defined, then this prevents this sensor to
> function. So above commit caused this.
> 
> This sensor was supposed to be always on to trigger wake up in prior
> external hubs. But with the new ISH hub this is not the case.
>>
>> Only really makes a difference to which route it takes to mainline
>> and how
>> fast it gets there!
> If possible push to 4.9 and mark to stable.
I've added some more description cribbed from your reply here
and a little header from me to make the point it's actually a fix
that wants to go in fast!

Applied to the fixes-togreg branch of iio.git.

Thanks,

Jonathan
> 
> Thanks,
> Srinivas
> N�����r��y���b�X��ǧv�^�)޺{.n�+����{��*"��^n�r���z�\x1a��h����&��\x1e�G���h�\x03(�階�ݢj"��\x1a�^[m�����z�ޖ���f���h���~�mml==
> 


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

end of thread, other threads:[~2016-11-05 17:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-25  1:06 [PATCH] iio: orientation: hid-sensor-rotation: Add PM function Song Hongyan
2016-10-30 16:22 ` Jonathan Cameron
2016-10-31  0:32   ` Pandruvada, Srinivas
2016-11-05 17:49     ` 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).