diff mbox

[1/2] HID: Show I2C bus type in hid_connect()

Message ID 1443442508-94971-1-git-send-email-mika.westerberg@linux.intel.com (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Mika Westerberg Sept. 28, 2015, 12:15 p.m. UTC
For I2C HID devices output currently looks like:

  hid-multitouch ... input,hidraw0: <UNKNOWN> HID v1.00 Mouse ...

Add knowledge about I2C bus to hid_connect() so that it shows "I2C"
correctly instead of "<UNKNOWN>".

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/hid/hid-core.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Daniel Martin Sept. 29, 2015, 6:35 a.m. UTC | #1
On 28 September 2015 at 14:15, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
> For I2C HID devices output currently looks like:
>
>   hid-multitouch ... input,hidraw0: <UNKNOWN> HID v1.00 Mouse ...
>
> Add knowledge about I2C bus to hid_connect() so that it shows "I2C"
> correctly instead of "<UNKNOWN>".
>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> ---
>  drivers/hid/hid-core.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index 70a11ac38119..7f1baba081a1 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -1678,6 +1678,9 @@ int hid_connect(struct hid_device *hdev, unsigned int connect_mask)
>         case BUS_BLUETOOTH:
>                 bus = "BLUETOOTH";
>                 break;
> +       case BUS_I2C:
> +               bus = "I2C";
> +               break;
>         default:
>                 bus = "<UNKNOWN>";
>         }

Already queued:
    https://git.kernel.org/cgit/linux/kernel/git/jikos/hid.git/commit/?h=for-4.4/upstream&id=0678072755b6672b19ee0fd42748a003912fca09
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 70a11ac38119..7f1baba081a1 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1678,6 +1678,9 @@  int hid_connect(struct hid_device *hdev, unsigned int connect_mask)
 	case BUS_BLUETOOTH:
 		bus = "BLUETOOTH";
 		break;
+	case BUS_I2C:
+		bus = "I2C";
+		break;
 	default:
 		bus = "<UNKNOWN>";
 	}