From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Holler Subject: hid-sensor-hub and autoloading of HID sensor modules Date: Mon, 10 Dec 2012 22:07:53 +0100 Message-ID: <50C64F29.9030200@ahsoftware.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Return-path: Sender: linux-iio-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, srinivas.pandruvada-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, matteo.dameno-qxv4g6HH51o@public.gmane.org List-Id: linux-input@vger.kernel.org Hello, as I've just posted a patch to get rid of the vendor and device IDs for USB HID sensor hubs, there is still one problem left: hid-sensor-hub doesn't automatically load the necessary drivers (if they are modules). Here is a suggestion about how to solve that: Create HID groups HID_GROUP_SENSOR_ACCEL, HID_GROUP_SENSOR_TIME, ...) for every type of (supported) sensor (instead of the one HID_GROUP_SENSOR_HUB), scan for their usage pages (e.g. HID_USAGE_SENSOR_ACCEL, HID_USAGE_SENSOR_TIME, ...) set the group and so load the final module and not hid-sensor-hub. hid-sensor-hub will then get loaded automatically. As I don't have any real sensor hubs (and no business with them), I think others should implement such, if that idea got approved to make sense. ;) That just would be some few lines, but I couldn't test them with real-world stuff. Regards, Alexander From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from h1446028.stratoserver.net ([85.214.92.142]:58707 "EHLO mail.ahsoftware.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751041Ab2LJVId (ORCPT ); Mon, 10 Dec 2012 16:08:33 -0500 Message-ID: <50C64F29.9030200@ahsoftware.de> Date: Mon, 10 Dec 2012 22:07:53 +0100 From: Alexander Holler MIME-Version: 1.0 To: linux-iio@vger.kernel.org, linux-input@vger.kernel.org, srinivas.pandruvada@intel.com, matteo.dameno@st.com Subject: hid-sensor-hub and autoloading of HID sensor modules Content-Type: text/plain; charset=ISO-8859-15 Sender: linux-iio-owner@vger.kernel.org List-Id: linux-iio@vger.kernel.org Hello, as I've just posted a patch to get rid of the vendor and device IDs for USB HID sensor hubs, there is still one problem left: hid-sensor-hub doesn't automatically load the necessary drivers (if they are modules). Here is a suggestion about how to solve that: Create HID groups HID_GROUP_SENSOR_ACCEL, HID_GROUP_SENSOR_TIME, ...) for every type of (supported) sensor (instead of the one HID_GROUP_SENSOR_HUB), scan for their usage pages (e.g. HID_USAGE_SENSOR_ACCEL, HID_USAGE_SENSOR_TIME, ...) set the group and so load the final module and not hid-sensor-hub. hid-sensor-hub will then get loaded automatically. As I don't have any real sensor hubs (and no business with them), I think others should implement such, if that idea got approved to make sense. ;) That just would be some few lines, but I couldn't test them with real-world stuff. Regards, Alexander