Skip to contentSkip to conversation

iio: hid-sensor: add module alias for autoload

PATCH In review Alexander Holler 4 participants 16 messages Jul 10, 2013 – Jul 13, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover iio: hid-sensor: add module alias for autoload

Hello,

I'm not sure if it was by intention that none of the hid-sensor drivers were loaded automatically. But I assume it was not by intention.

Therefor I've added a module alias to every hid-sensor driver by adding a MODULE_DEVICE_TABLE.

This has another benefit: it makes it possible to use a normale driver name.

Therefor I've changed all driver names to KBUILD_MODNAME instead of HID-SENSOR-2000xx as the later isn't very descriptive when starring at kernel messages.

Regards,

Alexander Holler

#1 lore raw

PATCH 1/4 iio: hid-sensor-accel-3d: add module alias for autoload

Add a MODULE_DEVICE_TABLE in order to let hotplug mechanisms automatically load the driver.

This makes it also possible to use the usual driver name instead of HID-SENSOR-2000xx which isn't very descriptive in kernel messages.

---
 drivers/iio/accel/hid-sensor-accel-3d.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/iio/accel/hid-sensor-accel-3d.c +11 -5
index bbcbd71..275c5d7 100644
@@ -30,10 +30,6 @@
 #include <linux/iio/triggered_buffer.h>
 #include "../common/hid-sensors/hid-sensor-trigger.h"
 
-/*Format: HID-SENSOR-usage_id_in_hex*/
-/*Usage ID from spec for Accelerometer-3D: 0x200073*/
-#define DRIVER_NAME "HID-SENSOR-200073"
-
 enum accel_3d_channel {
 	CHANNEL_SCAN_INDEX_X,
 	CHANNEL_SCAN_INDEX_Y,
@@ -389,9 +385,19 @@ static int hid_accel_3d_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static struct platform_device_id hid_accel_3d_ids[] = {
+	{
+		/* Format: HID-SENSOR-usage_id_in_hex_lowercase */
+		.name = "HID-SENSOR-200073",
+	},
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(platform, hid_accel_3d_ids);
+
 static struct platform_driver hid_accel_3d_platform_driver = {
+	.id_table = hid_accel_3d_ids,
 	.driver = {
-		.name	= DRIVER_NAME,
+		.name	= KBUILD_MODNAME,
 		.owner	= THIS_MODULE,
 	},
 	.probe		= hid_accel_3d_probe,
Signature · 1 line
1.8.1.5
#2 lore raw

PATCH 2/4 iio: hid-sensor-gyro-3d: add module alias for autoload

In reply to Alexander Holler

Add a MODULE_DEVICE_TABLE in order to let hotplug mechanisms automatically load the driver.

This makes it also possible to use the usual driver name instead of HID-SENSOR-2000xx which isn't very descriptive in kernel messages.

---
 drivers/iio/gyro/hid-sensor-gyro-3d.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/iio/gyro/hid-sensor-gyro-3d.c +11 -5
index bc943dd..9cc8aa1 100644
@@ -30,10 +30,6 @@
 #include <linux/iio/triggered_buffer.h>
 #include "../common/hid-sensors/hid-sensor-trigger.h"
 
-/*Format: HID-SENSOR-usage_id_in_hex*/
-/*Usage ID from spec for Gyro-3D: 0x200076*/
-#define DRIVER_NAME "HID-SENSOR-200076"
-
 enum gyro_3d_channel {
 	CHANNEL_SCAN_INDEX_X,
 	CHANNEL_SCAN_INDEX_Y,
@@ -389,9 +385,19 @@ static int hid_gyro_3d_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static struct platform_device_id hid_gyro_3d_ids[] = {
+	{
+		/* Format: HID-SENSOR-usage_id_in_hex_lowercase */
+		.name = "HID-SENSOR-200076",
+	},
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(platform, hid_gyro_3d_ids);
+
 static struct platform_driver hid_gyro_3d_platform_driver = {
+	.id_table = hid_gyro_3d_ids,
 	.driver = {
-		.name	= DRIVER_NAME,
+		.name	= KBUILD_MODNAME,
 		.owner	= THIS_MODULE,
 	},
 	.probe		= hid_gyro_3d_probe,
Signature · 1 line
1.8.1.5
maintainer Acked-by on v1 2/4
#3 lore raw

Re: [PATCH 2/4] iio: hid-sensor-gyro-3d: add module alias for autoload

Tested. You can add my ack.

Quoted 47 lines · Alexander Holler

Add a MODULE_DEVICE_TABLE in order to let hotplug mechanisms automatically load the driver.

This makes it also possible to use the usual driver name instead of HID-SENSOR-2000xx which isn't very descriptive in kernel messages.

---
  drivers/iio/gyro/hid-sensor-gyro-3d.c | 16 +++++++++++-----
  1 file changed, 11 insertions(+), 5 deletions(-)
drivers/iio/gyro/hid-sensor-gyro-3d.c +11 -5
index bc943dd..9cc8aa1 100644
@@ -30,10 +30,6 @@
  #include <linux/iio/triggered_buffer.h>
  #include "../common/hid-sensors/hid-sensor-trigger.h"
 
-/*Format: HID-SENSOR-usage_id_in_hex*/
-/*Usage ID from spec for Gyro-3D: 0x200076*/
-#define DRIVER_NAME "HID-SENSOR-200076"
-
  enum gyro_3d_channel {
  	CHANNEL_SCAN_INDEX_X,
  	CHANNEL_SCAN_INDEX_Y,
@@ -389,9 +385,19 @@ static int hid_gyro_3d_remove(struct platform_device *pdev)
  	return 0;
  }
 
+static struct platform_device_id hid_gyro_3d_ids[] = {
+	{
+		/* Format: HID-SENSOR-usage_id_in_hex_lowercase */
+		.name = "HID-SENSOR-200076",
+	},
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(platform, hid_gyro_3d_ids);
+
  static struct platform_driver hid_gyro_3d_platform_driver = {
+	.id_table = hid_gyro_3d_ids,
  	.driver = {
-		.name	= DRIVER_NAME,
+		.name	= KBUILD_MODNAME,
  		.owner	= THIS_MODULE,
  	},
  	.probe		= hid_gyro_3d_probe,
#4 lore raw

PATCH 3/4 iio: hid-sensor-als: add module alias for autoload

In reply to Alexander Holler

Add a MODULE_DEVICE_TABLE in order to let hotplug mechanisms automatically load the driver.

This makes it also possible to use the usual driver name instead of HID-SENSOR-2000xx which isn't very descriptive in kernel messages.

---
 drivers/iio/light/hid-sensor-als.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/iio/light/hid-sensor-als.c +11 -5
index cdc2cad..9adfef0 100644
@@ -30,10 +30,6 @@
 #include <linux/iio/triggered_buffer.h>
 #include "../common/hid-sensors/hid-sensor-trigger.h"
 
-/*Format: HID-SENSOR-usage_id_in_hex*/
-/*Usage ID from spec for Ambiant-Light: 0x200041*/
-#define DRIVER_NAME "HID-SENSOR-200041"
-
 #define CHANNEL_SCAN_INDEX_ILLUM 0
 
 struct als_state {
@@ -355,9 +351,19 @@ static int hid_als_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static struct platform_device_id hid_als_ids[] = {
+	{
+		/* Format: HID-SENSOR-usage_id_in_hex_lowercase */
+		.name = "HID-SENSOR-200041",
+	},
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(platform, hid_als_ids);
+
 static struct platform_driver hid_als_platform_driver = {
+	.id_table = hid_als_ids,
 	.driver = {
-		.name	= DRIVER_NAME,
+		.name	= KBUILD_MODNAME,
 		.owner	= THIS_MODULE,
 	},
 	.probe		= hid_als_probe,
Signature · 1 line
1.8.1.5
maintainer Acked-by on v1 3/4
#5 lore raw

Re: [PATCH 3/4] iio: hid-sensor-als: add module alias for autoload

Tested. You can add my ack.

Quoted 47 lines · Alexander Holler

Add a MODULE_DEVICE_TABLE in order to let hotplug mechanisms automatically load the driver.

This makes it also possible to use the usual driver name instead of HID-SENSOR-2000xx which isn't very descriptive in kernel messages.

---
  drivers/iio/light/hid-sensor-als.c | 16 +++++++++++-----
  1 file changed, 11 insertions(+), 5 deletions(-)
drivers/iio/light/hid-sensor-als.c +11 -5
index cdc2cad..9adfef0 100644
@@ -30,10 +30,6 @@
  #include <linux/iio/triggered_buffer.h>
  #include "../common/hid-sensors/hid-sensor-trigger.h"
 
-/*Format: HID-SENSOR-usage_id_in_hex*/
-/*Usage ID from spec for Ambiant-Light: 0x200041*/
-#define DRIVER_NAME "HID-SENSOR-200041"
-
  #define CHANNEL_SCAN_INDEX_ILLUM 0
 
  struct als_state {
@@ -355,9 +351,19 @@ static int hid_als_remove(struct platform_device *pdev)
  	return 0;
  }
 
+static struct platform_device_id hid_als_ids[] = {
+	{
+		/* Format: HID-SENSOR-usage_id_in_hex_lowercase */
+		.name = "HID-SENSOR-200041",
+	},
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(platform, hid_als_ids);
+
  static struct platform_driver hid_als_platform_driver = {
+	.id_table = hid_als_ids,
  	.driver = {
-		.name	= DRIVER_NAME,
+		.name	= KBUILD_MODNAME,
  		.owner	= THIS_MODULE,
  	},
  	.probe		= hid_als_probe,
#6 lore raw

PATCH 4/4 iio: hid-sensor-magn-3d: add module alias for autoload

In reply to Alexander Holler

Add a MODULE_DEVICE_TABLE in order to let hotplug mechanisms automatically load the driver.

This makes it also possible to use the usual driver name instead of HID-SENSOR-2000xx which isn't very descriptive in kernel messages.

---
 drivers/iio/magnetometer/hid-sensor-magn-3d.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/iio/magnetometer/hid-sensor-magn-3d.c +11 -5
index 99f4e49..e71127a 100644
@@ -30,10 +30,6 @@
 #include <linux/iio/triggered_buffer.h>
 #include "../common/hid-sensors/hid-sensor-trigger.h"
 
-/*Format: HID-SENSOR-usage_id_in_hex*/
-/*Usage ID from spec for Magnetometer-3D: 0x200083*/
-#define DRIVER_NAME "HID-SENSOR-200083"
-
 enum magn_3d_channel {
 	CHANNEL_SCAN_INDEX_X,
 	CHANNEL_SCAN_INDEX_Y,
@@ -390,9 +386,19 @@ static int hid_magn_3d_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static struct platform_device_id hid_magn_3d_ids[] = {
+	{
+		/* Format: HID-SENSOR-usage_id_in_hex_lowercase */
+		.name = "HID-SENSOR-200083",
+	},
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(platform, hid_magn_3d_ids);
+
 static struct platform_driver hid_magn_3d_platform_driver = {
+	.id_table = hid_magn_3d_ids,
 	.driver = {
-		.name	= DRIVER_NAME,
+		.name	= KBUILD_MODNAME,
 		.owner	= THIS_MODULE,
 	},
 	.probe		= hid_magn_3d_probe,
Signature · 1 line
1.8.1.5
maintainer Acked-by on v1 4/4
#7 lore raw

Re: [PATCH 4/4] iio: hid-sensor-magn-3d: add module alias for autoload

Tested. You can add my ack.

Quoted 47 lines · Alexander Holler

Add a MODULE_DEVICE_TABLE in order to let hotplug mechanisms automatically load the driver.

This makes it also possible to use the usual driver name instead of HID-SENSOR-2000xx which isn't very descriptive in kernel messages.

---
  drivers/iio/magnetometer/hid-sensor-magn-3d.c | 16 +++++++++++-----
  1 file changed, 11 insertions(+), 5 deletions(-)
drivers/iio/magnetometer/hid-sensor-magn-3d.c +11 -5
index 99f4e49..e71127a 100644
@@ -30,10 +30,6 @@
  #include <linux/iio/triggered_buffer.h>
  #include "../common/hid-sensors/hid-sensor-trigger.h"
 
-/*Format: HID-SENSOR-usage_id_in_hex*/
-/*Usage ID from spec for Magnetometer-3D: 0x200083*/
-#define DRIVER_NAME "HID-SENSOR-200083"
-
  enum magn_3d_channel {
  	CHANNEL_SCAN_INDEX_X,
  	CHANNEL_SCAN_INDEX_Y,
@@ -390,9 +386,19 @@ static int hid_magn_3d_remove(struct platform_device *pdev)
  	return 0;
  }
 
+static struct platform_device_id hid_magn_3d_ids[] = {
+	{
+		/* Format: HID-SENSOR-usage_id_in_hex_lowercase */
+		.name = "HID-SENSOR-200083",
+	},
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(platform, hid_magn_3d_ids);
+
  static struct platform_driver hid_magn_3d_platform_driver = {
+	.id_table = hid_magn_3d_ids,
  	.driver = {
-		.name	= DRIVER_NAME,
+		.name	= KBUILD_MODNAME,
  		.owner	= THIS_MODULE,
  	},
  	.probe		= hid_magn_3d_probe,
#8 lore raw
In reply to Alexander Holler

Hi,

There was no intention to prevent auto loading. Did you get chance to test these changes?

Thanks,
Srinivas

Quoted 23 lines · Alexander Holler

Hello,

I'm not sure if it was by intention that none of the hid-sensor drivers were loaded automatically. But I assume it was not by intention.

Therefor I've added a module alias to every hid-sensor driver by adding a MODULE_DEVICE_TABLE.

This has another benefit: it makes it possible to use a normale driver name.

Therefor I've changed all driver names to KBUILD_MODNAME instead of HID-SENSOR-2000xx as the later isn't very descriptive when starring at kernel messages.

Regards,

Alexander Holler

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#9 lore raw

Am 10.07.2013 17:27, schrieb Srinivas Pandruvada:

Quoted 4 lines

Hi,

There was no intention to prevent auto loading. Did you get chance to test these changes?

Sure, I always test patches before I send them out.

Ok, I haven't tested the changes with the iio HID drivers (I don't have any commercial HID sensor hub, so I've just compile tested these patches here, double reading them), but I've tested the similiar changes with a patch for rtc-hid-sensor-time I've send out yesterday. (sorry, no link, lkml.org seems dead, just search for "rtc-hid-sensor-time: add module alias")

It works just fine. An example output is now

Jul  9 19:27:21 dockstar3 kernel: [    5.124444] rtc_hid_sensor_time HID-SENSOR-2000a0.0: milliseconds supported
Jul  9 19:27:21 dockstar3 kernel: [    5.132864] rtc_hid_sensor_time HID-SENSOR-2000a0.0: rtc core: setting system clock to 2013-07-09 17:26:51:328000 UTC (1373390811)
Jul  9 19:27:21 dockstar3 kernel: [    5.146105] rtc_hid_sensor_time HID-SENSOR-2000a0.0: rtc core: registered hid-sensor-time as rtc0

Before the output was e.g.

HID-SENSOR-2000a0 HID-SENSOR-2000a0.0: rtc core: registered hid-sensor-time as rtc0

instead of the above with the descriptive rtc_hid_sensor_time.

Automatic loading of modules works too and it works on ARM, Intel and AMD as module or static linked. ;)

Regards,

Alexander Holler

#10 lore raw
Quoted 16 lines · Alexander Holler

Am 10.07.2013 17:27, schrieb Srinivas Pandruvada:

Quoted 4 lines

Hi,

There was no intention to prevent auto loading. Did you get chance to test these changes?

Sure, I always test patches before I send them out.

Ok, I haven't tested the changes with the iio HID drivers (I don't have any commercial HID sensor hub, so I've just compile tested these patches here, double reading them), but I've tested the similiar changes with a patch for rtc-hid-sensor-time I've send out yesterday. (sorry, no link, lkml.org seems dead, just search for "rtc-hid-sensor-time: add module alias")

It works just fine. An example output is now

Jul  9 19:27:21 dockstar3 kernel: [    5.124444] rtc_hid_sensor_time HID-SENSOR-2000a0.0: milliseconds supported
Jul  9 19:27:21 dockstar3 kernel: [    5.132864] rtc_hid_sensor_time HID-SENSOR-2000a0.0: rtc core: setting system clock to 2013-07-09 17:26:51:328000 UTC (1373390811)
Jul  9 19:27:21 dockstar3 kernel: [    5.146105] rtc_hid_sensor_time HID-SENSOR-2000a0.0: rtc core: registered hid-sensor-time as rtc0
Quoted 5 lines

Before the output was e.g.

HID-SENSOR-2000a0 HID-SENSOR-2000a0.0: rtc core: registered hid-sensor-time as rtc0

instead of the above with the descriptive rtc_hid_sensor_time.

<Agreed. This is better. >

Quoted 10 lines

Automatic loading of modules works too and it works on ARM, Intel and AMD as module or static linked. ;)

Regards,

Alexander Holler

Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#11 lore raw

Am 11.07.2013 19:27, schrieb Srinivas Pandruvada:

Quoted 28 lines · Alexander Holler
Quoted 25 lines

Am 10.07.2013 17:27, schrieb Srinivas Pandruvada:

Quoted 4 lines

Hi,

There was no intention to prevent auto loading. Did you get chance to test these changes?

Sure, I always test patches before I send them out.

Ok, I haven't tested the changes with the iio HID drivers (I don't have any commercial HID sensor hub, so I've just compile tested these patches here, double reading them), but I've tested the similiar changes with a patch for rtc-hid-sensor-time I've send out yesterday. (sorry, no link, lkml.org seems dead, just search for "rtc-hid-sensor-time: add module alias")

It works just fine. An example output is now

Jul  9 19:27:21 dockstar3 kernel: [    5.124444] rtc_hid_sensor_time
HID-SENSOR-2000a0.0: milliseconds supported
Jul  9 19:27:21 dockstar3 kernel: [    5.132864] rtc_hid_sensor_time
HID-SENSOR-2000a0.0: rtc core: setting system clock to 2013-07-09
17:26:51:328000 UTC (1373390811)
Jul  9 19:27:21 dockstar3 kernel: [    5.146105] rtc_hid_sensor_time

HID-SENSOR-2000a0.0: rtc core: registered hid-sensor-time as rtc0

Quoted 9 lines
Quoted 6 lines

Before the output was e.g.

HID-SENSOR-2000a0 HID-SENSOR-2000a0.0: rtc core: registered hid-sensor-time as rtc0

instead of the above with the descriptive rtc_hid_sensor_time.

<Agreed. This is better. >

Quoted 2 lines

Automatic loading of modules works too and it works on ARM, Intel and AMD as module or static linked. ;)

Do you have tested the patches with a real device? I assume you have one. ;)

Regards,

Alexander Holler

maintainer
#12 lore raw
Quoted 36 lines · Alexander Holler

Am 11.07.2013 19:27, schrieb Srinivas Pandruvada:

Quoted 35 lines · Alexander Holler
Quoted 23 lines

Am 10.07.2013 17:27, schrieb Srinivas Pandruvada:

Quoted 4 lines

Hi,

There was no intention to prevent auto loading. Did you get chance to test these changes?

Sure, I always test patches before I send them out.

Ok, I haven't tested the changes with the iio HID drivers (I don't have any commercial HID sensor hub, so I've just compile tested these patches here, double reading them), but I've tested the similiar changes with a patch for rtc-hid-sensor-time I've send out yesterday. (sorry, no link, lkml.org seems dead, just search for "rtc-hid-sensor-time: add module alias")

It works just fine. An example output is now

Jul  9 19:27:21 dockstar3 kernel: [    5.124444] rtc_hid_sensor_time
HID-SENSOR-2000a0.0: milliseconds supported
Jul  9 19:27:21 dockstar3 kernel: [    5.132864] rtc_hid_sensor_time
HID-SENSOR-2000a0.0: rtc core: setting system clock to 2013-07-09
17:26:51:328000 UTC (1373390811)
Jul  9 19:27:21 dockstar3 kernel: [    5.146105] rtc_hid_sensor_time
Quoted 8 lines

HID-SENSOR-2000a0.0: rtc core: registered hid-sensor-time as rtc0

Before the output was e.g.

HID-SENSOR-2000a0 HID-SENSOR-2000a0.0: rtc core: registered hid-sensor-time as rtc0

instead of the above with the descriptive rtc_hid_sensor_time.

<Agreed. This is better. >

Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

Automatic loading of modules works too and it works on ARM, Intel and AMD as module or static linked. ;)

Do you have tested the patches with a real device? I assume you have one. ;)

Regards,

Alexander Holler

Just so you two know. Given this discussion, I'll be lazy about these and wait for an Ack from Srinivas before taking these. Look fine to me, but nice to have confirmation as you say with the actual hardware!

Jonathan

#13 lore raw

Looks fine, but will test on actual hardware in couple of days.

Thanks,
Srinivas

-----Original Message-----
From: Jonathan Cameron [mailto:[email protected]]
Sent: Friday, July 12, 2013 11:45 AM
To: Alexander Holler
Cc: Srinivas Pandruvada; [email protected]; [email protected]; Jonathan Cameron; Pandruvada, Srinivas
Subject: Re: [PATCH 0/4] iio: hid-sensor: add module alias for autoload

Quoted 39 lines · Alexander Holler

Am 11.07.2013 19:27, schrieb Srinivas Pandruvada:

Quoted 28 lines · Alexander Holler
Quoted 25 lines

Am 10.07.2013 17:27, schrieb Srinivas Pandruvada:

Quoted 4 lines

Hi,

There was no intention to prevent auto loading. Did you get chance to test these changes?

Sure, I always test patches before I send them out.

Ok, I haven't tested the changes with the iio HID drivers (I don't have any commercial HID sensor hub, so I've just compile tested these patches here, double reading them), but I've tested the similiar changes with a patch for rtc-hid-sensor-time I've send out yesterday. (sorry, no link, lkml.org seems dead, just search for "rtc-hid-sensor-time: add module alias")

It works just fine. An example output is now

Jul  9 19:27:21 dockstar3 kernel: [    5.124444] rtc_hid_sensor_time
HID-SENSOR-2000a0.0: milliseconds supported
Jul  9 19:27:21 dockstar3 kernel: [    5.132864] rtc_hid_sensor_time
HID-SENSOR-2000a0.0: rtc core: setting system clock to 2013-07-09
17:26:51:328000 UTC (1373390811)
Jul  9 19:27:21 dockstar3 kernel: [    5.146105] rtc_hid_sensor_time

HID-SENSOR-2000a0.0: rtc core: registered hid-sensor-time as rtc0

Quoted 9 lines
Quoted 6 lines

Before the output was e.g.

HID-SENSOR-2000a0 HID-SENSOR-2000a0.0: rtc core: registered hid-sensor-time as rtc0

instead of the above with the descriptive rtc_hid_sensor_time.

<Agreed. This is better. >

Quoted 2 lines

Automatic loading of modules works too and it works on ARM, Intel and AMD as module or static linked. ;)

Quoted 6 lines

Do you have tested the patches with a real device? I assume you have one. ;)

Regards,

Alexander Holler

Just so you two know. Given this discussion, I'll be lazy about these and wait for an Ack from Srinivas before taking these. Look fine to me, but nice to have confirmation as you say with the actual hardware!

Jonathan

#14 lore raw
In reply to Jonathan Cameron

Tested and ready to go.

Thanks,
Srinivas

-----Original Message-----
From: Jonathan Cameron [mailto:[email protected]]
Sent: Friday, July 12, 2013 11:45 AM
To: Alexander Holler
Cc: Srinivas Pandruvada; [email protected]; [email protected]; Jonathan Cameron; Pandruvada, Srinivas
Subject: Re: [PATCH 0/4] iio: hid-sensor: add module alias for autoload

Quoted 39 lines · Alexander Holler

Am 11.07.2013 19:27, schrieb Srinivas Pandruvada:

Quoted 28 lines · Alexander Holler
Quoted 25 lines

Am 10.07.2013 17:27, schrieb Srinivas Pandruvada:

Quoted 4 lines

Hi,

There was no intention to prevent auto loading. Did you get chance to test these changes?

Sure, I always test patches before I send them out.

Ok, I haven't tested the changes with the iio HID drivers (I don't have any commercial HID sensor hub, so I've just compile tested these patches here, double reading them), but I've tested the similiar changes with a patch for rtc-hid-sensor-time I've send out yesterday. (sorry, no link, lkml.org seems dead, just search for "rtc-hid-sensor-time: add module alias")

It works just fine. An example output is now

Jul  9 19:27:21 dockstar3 kernel: [    5.124444] rtc_hid_sensor_time
HID-SENSOR-2000a0.0: milliseconds supported
Jul  9 19:27:21 dockstar3 kernel: [    5.132864] rtc_hid_sensor_time
HID-SENSOR-2000a0.0: rtc core: setting system clock to 2013-07-09
17:26:51:328000 UTC (1373390811)
Jul  9 19:27:21 dockstar3 kernel: [    5.146105] rtc_hid_sensor_time

HID-SENSOR-2000a0.0: rtc core: registered hid-sensor-time as rtc0

Quoted 9 lines
Quoted 6 lines

Before the output was e.g.

HID-SENSOR-2000a0 HID-SENSOR-2000a0.0: rtc core: registered hid-sensor-time as rtc0

instead of the above with the descriptive rtc_hid_sensor_time.

<Agreed. This is better. >

Quoted 2 lines

Automatic loading of modules works too and it works on ARM, Intel and AMD as module or static linked. ;)

Quoted 6 lines

Do you have tested the patches with a real device? I assume you have one. ;)

Regards,

Alexander Holler

Just so you two know. Given this discussion, I'll be lazy about these and wait for an Ack from Srinivas before taking these. Look fine to me, but nice to have confirmation as you say with the actual hardware!

Jonathan

maintainer
#15 lore raw

Thanks,

All 4 applied to the togreg branch of iio.git

Jonathan

Quoted 68 lines · Srinivas

Tested and ready to go.

Thanks,
Srinivas

-----Original Message-----
From: Jonathan Cameron [mailto:[email protected]]
Sent: Friday, July 12, 2013 11:45 AM
To: Alexander Holler
Cc: Srinivas Pandruvada; [email protected]; [email protected]; Jonathan Cameron; Pandruvada, Srinivas
Subject: Re: [PATCH 0/4] iio: hid-sensor: add module alias for autoload

Quoted 39 lines · Alexander Holler

Am 11.07.2013 19:27, schrieb Srinivas Pandruvada:

Quoted 28 lines · Alexander Holler
Quoted 25 lines

Am 10.07.2013 17:27, schrieb Srinivas Pandruvada:

Quoted 4 lines

Hi,

There was no intention to prevent auto loading. Did you get chance to test these changes?

Sure, I always test patches before I send them out.

Ok, I haven't tested the changes with the iio HID drivers (I don't have any commercial HID sensor hub, so I've just compile tested these patches here, double reading them), but I've tested the similiar changes with a patch for rtc-hid-sensor-time I've send out yesterday. (sorry, no link, lkml.org seems dead, just search for "rtc-hid-sensor-time: add module alias")

It works just fine. An example output is now

Jul  9 19:27:21 dockstar3 kernel: [    5.124444] rtc_hid_sensor_time
HID-SENSOR-2000a0.0: milliseconds supported
Jul  9 19:27:21 dockstar3 kernel: [    5.132864] rtc_hid_sensor_time
HID-SENSOR-2000a0.0: rtc core: setting system clock to 2013-07-09
17:26:51:328000 UTC (1373390811)
Jul  9 19:27:21 dockstar3 kernel: [    5.146105] rtc_hid_sensor_time

HID-SENSOR-2000a0.0: rtc core: registered hid-sensor-time as rtc0

Quoted 9 lines
Quoted 6 lines

Before the output was e.g.

HID-SENSOR-2000a0 HID-SENSOR-2000a0.0: rtc core: registered hid-sensor-time as rtc0

instead of the above with the descriptive rtc_hid_sensor_time.

<Agreed. This is better. >

Quoted 2 lines

Automatic loading of modules works too and it works on ARM, Intel and AMD as module or static linked. ;)

Quoted 6 lines

Do you have tested the patches with a real device? I assume you have one. ;)

Regards,

Alexander Holler

Just so you two know. Given this discussion, I'll be lazy about these and wait for an Ack from Srinivas before taking these. Look fine to me, but nice to have confirmation as you say with the actual hardware!

Jonathan
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html