* [PATCH 1/2] HID: Show I2C bus type in hid_connect()
@ 2015-09-28 12:15 Mika Westerberg
2015-09-28 12:15 ` [PATCH 2/2] HID: i2c-hid: Fill in physical device providing HID functionality Mika Westerberg
2015-09-29 6:35 ` [PATCH 1/2] HID: Show I2C bus type in hid_connect() Daniel Martin
0 siblings, 2 replies; 6+ messages in thread
From: Mika Westerberg @ 2015-09-28 12:15 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Benjamin Tissoires, Mika Westerberg, linux-input
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>";
}
--
2.5.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] HID: i2c-hid: Fill in physical device providing HID functionality
2015-09-28 12:15 [PATCH 1/2] HID: Show I2C bus type in hid_connect() Mika Westerberg
@ 2015-09-28 12:15 ` Mika Westerberg
2015-09-29 6:40 ` Daniel Martin
` (2 more replies)
2015-09-29 6:35 ` [PATCH 1/2] HID: Show I2C bus type in hid_connect() Daniel Martin
1 sibling, 3 replies; 6+ messages in thread
From: Mika Westerberg @ 2015-09-28 12:15 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Benjamin Tissoires, Mika Westerberg, linux-input
Currently hid_connect() prints out following when I2C connected HID devices
is connected:
hid-multitouch 0018:03EB:2136.0001: ... [ATML3432:00 03EB:2136] on
After "on " should read physical device name but it is left empty by the
driver.
Make it look better and fill in the physical device name.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
drivers/hid/i2c-hid/i2c-hid.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index 2871f3c81a4c..10bd8e6e4c9c 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -1028,6 +1028,7 @@ static int i2c_hid_probe(struct i2c_client *client,
snprintf(hid->name, sizeof(hid->name), "%s %04hX:%04hX",
client->name, hid->vendor, hid->product);
+ strlcpy(hid->phys, dev_name(&client->dev), sizeof(hid->phys));
ret = hid_add_device(hid);
if (ret) {
--
2.5.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] HID: Show I2C bus type in hid_connect()
2015-09-28 12:15 [PATCH 1/2] HID: Show I2C bus type in hid_connect() Mika Westerberg
2015-09-28 12:15 ` [PATCH 2/2] HID: i2c-hid: Fill in physical device providing HID functionality Mika Westerberg
@ 2015-09-29 6:35 ` Daniel Martin
1 sibling, 0 replies; 6+ messages in thread
From: Daniel Martin @ 2015-09-29 6:35 UTC (permalink / raw)
To: Mika Westerberg; +Cc: Jiri Kosina, Benjamin Tissoires, linux-input
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] HID: i2c-hid: Fill in physical device providing HID functionality
2015-09-28 12:15 ` [PATCH 2/2] HID: i2c-hid: Fill in physical device providing HID functionality Mika Westerberg
@ 2015-09-29 6:40 ` Daniel Martin
2015-09-29 9:06 ` Benjamin Tissoires
2015-09-29 10:07 ` Jiri Kosina
2 siblings, 0 replies; 6+ messages in thread
From: Daniel Martin @ 2015-09-29 6:40 UTC (permalink / raw)
To: Mika Westerberg; +Cc: Jiri Kosina, Benjamin Tissoires, linux-input
On 28 September 2015 at 14:15, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
> Currently hid_connect() prints out following when I2C connected HID devices
> is connected:
>
> hid-multitouch 0018:03EB:2136.0001: ... [ATML3432:00 03EB:2136] on
>
> After "on " should read physical device name but it is left empty by the
> driver.
>
> Make it look better and fill in the physical device name.
>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> ---
> drivers/hid/i2c-hid/i2c-hid.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
> index 2871f3c81a4c..10bd8e6e4c9c 100644
> --- a/drivers/hid/i2c-hid/i2c-hid.c
> +++ b/drivers/hid/i2c-hid/i2c-hid.c
> @@ -1028,6 +1028,7 @@ static int i2c_hid_probe(struct i2c_client *client,
>
> snprintf(hid->name, sizeof(hid->name), "%s %04hX:%04hX",
> client->name, hid->vendor, hid->product);
> + strlcpy(hid->phys, dev_name(&client->dev), sizeof(hid->phys));
>
> ret = hid_add_device(hid);
> if (ret) {
> --
Tested and
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] HID: i2c-hid: Fill in physical device providing HID functionality
2015-09-28 12:15 ` [PATCH 2/2] HID: i2c-hid: Fill in physical device providing HID functionality Mika Westerberg
2015-09-29 6:40 ` Daniel Martin
@ 2015-09-29 9:06 ` Benjamin Tissoires
2015-09-29 10:07 ` Jiri Kosina
2 siblings, 0 replies; 6+ messages in thread
From: Benjamin Tissoires @ 2015-09-29 9:06 UTC (permalink / raw)
To: Mika Westerberg; +Cc: Jiri Kosina, linux-input
On Sep 28 2015 or thereabouts, Mika Westerberg wrote:
> Currently hid_connect() prints out following when I2C connected HID devices
> is connected:
>
> hid-multitouch 0018:03EB:2136.0001: ... [ATML3432:00 03EB:2136] on
>
> After "on " should read physical device name but it is left empty by the
> driver.
>
> Make it look better and fill in the physical device name.
>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> ---
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cheers,
Benjamin
> drivers/hid/i2c-hid/i2c-hid.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
> index 2871f3c81a4c..10bd8e6e4c9c 100644
> --- a/drivers/hid/i2c-hid/i2c-hid.c
> +++ b/drivers/hid/i2c-hid/i2c-hid.c
> @@ -1028,6 +1028,7 @@ static int i2c_hid_probe(struct i2c_client *client,
>
> snprintf(hid->name, sizeof(hid->name), "%s %04hX:%04hX",
> client->name, hid->vendor, hid->product);
> + strlcpy(hid->phys, dev_name(&client->dev), sizeof(hid->phys));
>
> ret = hid_add_device(hid);
> if (ret) {
> --
> 2.5.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] HID: i2c-hid: Fill in physical device providing HID functionality
2015-09-28 12:15 ` [PATCH 2/2] HID: i2c-hid: Fill in physical device providing HID functionality Mika Westerberg
2015-09-29 6:40 ` Daniel Martin
2015-09-29 9:06 ` Benjamin Tissoires
@ 2015-09-29 10:07 ` Jiri Kosina
2 siblings, 0 replies; 6+ messages in thread
From: Jiri Kosina @ 2015-09-29 10:07 UTC (permalink / raw)
To: Mika Westerberg; +Cc: Benjamin Tissoires, linux-input
On Mon, 28 Sep 2015, Mika Westerberg wrote:
> Currently hid_connect() prints out following when I2C connected HID devices
> is connected:
>
> hid-multitouch 0018:03EB:2136.0001: ... [ATML3432:00 03EB:2136] on
>
> After "on " should read physical device name but it is left empty by the
> driver.
>
> Make it look better and fill in the physical device name.
>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Applied to hid.git#for-4.4/i2c-hid.
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-09-29 10:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-28 12:15 [PATCH 1/2] HID: Show I2C bus type in hid_connect() Mika Westerberg
2015-09-28 12:15 ` [PATCH 2/2] HID: i2c-hid: Fill in physical device providing HID functionality Mika Westerberg
2015-09-29 6:40 ` Daniel Martin
2015-09-29 9:06 ` Benjamin Tissoires
2015-09-29 10:07 ` Jiri Kosina
2015-09-29 6:35 ` [PATCH 1/2] HID: Show I2C bus type in hid_connect() Daniel Martin
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.