linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: i2c-hid: Add hid-over-i2c name to i2c id table
@ 2016-03-08 19:25 Dmitry Torokhov
  2016-03-09 18:37 ` Andrew Duggan
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Dmitry Torokhov @ 2016-03-08 19:25 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Benjamin Tissoires, Mika Westerberg, Benson Leung, linux-input,
	linux-kernel

When using the device tree binding OF compatible = "hid-over-i2c" the
i2c id table also needs to have that name in order to auto load this
driver, since i2c core reports module alias as i2c:<string> where
<string> is compatible string of OF binding stripped of manufacturer's
prefix.

Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
---
 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 b921693..a2c6c98 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -1191,6 +1191,7 @@ static const struct dev_pm_ops i2c_hid_pm = {
 
 static const struct i2c_device_id i2c_hid_id_table[] = {
 	{ "hid", 0 },
+	{ "hid-over-i2c", 0 },
 	{ },
 };
 MODULE_DEVICE_TABLE(i2c, i2c_hid_id_table);
-- 
2.7.0.rc3.207.g0ac5344


-- 
Dmitry

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

* Re: [PATCH] HID: i2c-hid: Add hid-over-i2c name to i2c id table
  2016-03-08 19:25 [PATCH] HID: i2c-hid: Add hid-over-i2c name to i2c id table Dmitry Torokhov
@ 2016-03-09 18:37 ` Andrew Duggan
  2016-03-09 19:50 ` Benjamin Tissoires
  2016-03-09 20:50 ` Jiri Kosina
  2 siblings, 0 replies; 9+ messages in thread
From: Andrew Duggan @ 2016-03-09 18:37 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Jiri Kosina, Benjamin Tissoires, Mika Westerberg, Benson Leung,
	linux-input, linux-kernel

On Tue, Mar 8, 2016 at 11:25 AM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> When using the device tree binding OF compatible = "hid-over-i2c" the
> i2c id table also needs to have that name in order to auto load this
> driver, since i2c core reports module alias as i2c:<string> where
> <string> is compatible string of OF binding stripped of manufacturer's
> prefix.
>
> Signed-off-by: Benson Leung <bleung@chromium.org>
> Signed-off-by: Dmitry Torokhov <dtor@chromium.org>

Tested-by: Andrew Duggan <aduggan@synaptics.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 b921693..a2c6c98 100644
> --- a/drivers/hid/i2c-hid/i2c-hid.c
> +++ b/drivers/hid/i2c-hid/i2c-hid.c
> @@ -1191,6 +1191,7 @@ static const struct dev_pm_ops i2c_hid_pm = {
>
>  static const struct i2c_device_id i2c_hid_id_table[] = {
>         { "hid", 0 },
> +       { "hid-over-i2c", 0 },
>         { },
>  };
>  MODULE_DEVICE_TABLE(i2c, i2c_hid_id_table);
> --
> 2.7.0.rc3.207.g0ac5344
>
>
> --
> Dmitry
> --
> 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

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

* Re: [PATCH] HID: i2c-hid: Add hid-over-i2c name to i2c id table
  2016-03-08 19:25 [PATCH] HID: i2c-hid: Add hid-over-i2c name to i2c id table Dmitry Torokhov
  2016-03-09 18:37 ` Andrew Duggan
@ 2016-03-09 19:50 ` Benjamin Tissoires
  2016-03-09 20:50 ` Jiri Kosina
  2 siblings, 0 replies; 9+ messages in thread
From: Benjamin Tissoires @ 2016-03-09 19:50 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Jiri Kosina, Mika Westerberg, Benson Leung, linux-input, linux-kernel

On Mar 08 2016 or thereabouts, Dmitry Torokhov wrote:
> When using the device tree binding OF compatible = "hid-over-i2c" the
> i2c id table also needs to have that name in order to auto load this
> driver, since i2c core reports module alias as i2c:<string> where
> <string> is compatible string of OF binding stripped of manufacturer's
> prefix.

OK, so the story here is during the first submissions, I had something
similar (i2c-hid or so). I was then told that it was not necessary to
use "i2c" in the name given that it was an I2C driver already. But it
looks like when I created the device tree binding, I forgot about it and
messed around a little bit, again.

My apologies, and:
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>.

Would it make sense to remove the other name ("hid") which should have
less compatibility issues (all the users *should* be in the kernel
tree).

Cheers,
Benjamin

> 
> Signed-off-by: Benson Leung <bleung@chromium.org>
> Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
> ---
>  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 b921693..a2c6c98 100644
> --- a/drivers/hid/i2c-hid/i2c-hid.c
> +++ b/drivers/hid/i2c-hid/i2c-hid.c
> @@ -1191,6 +1191,7 @@ static const struct dev_pm_ops i2c_hid_pm = {
>  
>  static const struct i2c_device_id i2c_hid_id_table[] = {
>  	{ "hid", 0 },
> +	{ "hid-over-i2c", 0 },
>  	{ },
>  };
>  MODULE_DEVICE_TABLE(i2c, i2c_hid_id_table);
> -- 
> 2.7.0.rc3.207.g0ac5344
> 
> 
> -- 
> Dmitry

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

* Re: [PATCH] HID: i2c-hid: Add hid-over-i2c name to i2c id table
  2016-03-08 19:25 [PATCH] HID: i2c-hid: Add hid-over-i2c name to i2c id table Dmitry Torokhov
  2016-03-09 18:37 ` Andrew Duggan
  2016-03-09 19:50 ` Benjamin Tissoires
@ 2016-03-09 20:50 ` Jiri Kosina
  2016-03-10  0:15   ` Dmitry Torokhov
  2 siblings, 1 reply; 9+ messages in thread
From: Jiri Kosina @ 2016-03-09 20:50 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Benjamin Tissoires, Mika Westerberg, Benson Leung, linux-input,
	linux-kernel

On Tue, 8 Mar 2016, Dmitry Torokhov wrote:

> When using the device tree binding OF compatible = "hid-over-i2c" the
> i2c id table also needs to have that name in order to auto load this
> driver, since i2c core reports module alias as i2c:<string> where
> <string> is compatible string of OF binding stripped of manufacturer's
> prefix.
> 
> Signed-off-by: Benson Leung <bleung@chromium.org>
> Signed-off-by: Dmitry Torokhov <dtor@chromium.org>

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs

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

* Re: [PATCH] HID: i2c-hid: Add hid-over-i2c name to i2c id table
  2016-03-09 20:50 ` Jiri Kosina
@ 2016-03-10  0:15   ` Dmitry Torokhov
  2016-03-10  9:05     ` Jiri Kosina
  0 siblings, 1 reply; 9+ messages in thread
From: Dmitry Torokhov @ 2016-03-10  0:15 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Benjamin Tissoires, Mika Westerberg, Benson Leung, linux-input, lkml

On Wed, Mar 9, 2016 at 12:50 PM, Jiri Kosina <jikos@kernel.org> wrote:
> On Tue, 8 Mar 2016, Dmitry Torokhov wrote:
>
>> When using the device tree binding OF compatible = "hid-over-i2c" the
>> i2c id table also needs to have that name in order to auto load this
>> driver, since i2c core reports module alias as i2c:<string> where
>> <string> is compatible string of OF binding stripped of manufacturer's
>> prefix.
>>
>> Signed-off-by: Benson Leung <bleung@chromium.org>
>> Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
>
> Applied, thanks.

Crap, can you change author on this to "Benson Leung
<bleung@chromium.org>" and on "HID: i2c-hid: Fix suspend/resume when
already runtime suspended" to "Doug Anderson <dianders@chromium.org>"?

I need to fix my script...

Thanks.

-- 
Dmitry

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

* Re: [PATCH] HID: i2c-hid: Add hid-over-i2c name to i2c id table
  2016-03-10  0:15   ` Dmitry Torokhov
@ 2016-03-10  9:05     ` Jiri Kosina
  0 siblings, 0 replies; 9+ messages in thread
From: Jiri Kosina @ 2016-03-10  9:05 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Benjamin Tissoires, Mika Westerberg, Benson Leung, linux-input, lkml

On Wed, 9 Mar 2016, Dmitry Torokhov wrote:

> >> When using the device tree binding OF compatible = "hid-over-i2c" the
> >> i2c id table also needs to have that name in order to auto load this
> >> driver, since i2c core reports module alias as i2c:<string> where
> >> <string> is compatible string of OF binding stripped of manufacturer's
> >> prefix.
> >>
> >> Signed-off-by: Benson Leung <bleung@chromium.org>
> >> Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
> >
> > Applied, thanks.
> 
> Crap, can you change author on this to "Benson Leung
> <bleung@chromium.org>" and on "HID: i2c-hid: Fix suspend/resume when
> already runtime suspended" to "Doug Anderson <dianders@chromium.org>"?
> 
> I need to fix my script...

Alright, this is one of the rare ocasions where I believe that rebase of a 
public git tree is justifiable. I've just fixed the commits and pushed out 
the new branches.

Thanks,

-- 
Jiri Kosina
SUSE Labs

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

* Re: [PATCH] HID: i2c-hid: Add hid-over-i2c name to i2c id table.
  2014-10-14 22:59 ` Dmitry Torokhov
@ 2014-10-23 18:45   ` Benjamin Tissoires
  0 siblings, 0 replies; 9+ messages in thread
From: Benjamin Tissoires @ 2014-10-23 18:45 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Benson Leung, jkosina, aduggan, linux-input, linux-kernel, olofj,
	satoshi.noguchi

On Oct 14 2014 or thereabouts, Dmitry Torokhov wrote:
> On Tue, Oct 14, 2014 at 02:44:01PM -0700, Benson Leung wrote:
> > When using the device tree binding of compatible = "hid-over-i2c"
> > the i2c id table also needs to have that name in order to
> > auto load this driver.
> > 
> > Signed-off-by: Benson Leung <bleung@chromium.org>
> > ---
> >  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 747d544..1a7605f 100644
> > --- a/drivers/hid/i2c-hid/i2c-hid.c
> > +++ b/drivers/hid/i2c-hid/i2c-hid.c
> > @@ -1123,6 +1123,7 @@ static const struct dev_pm_ops i2c_hid_pm = {
> >  
> >  static const struct i2c_device_id i2c_hid_id_table[] = {
> >  	{ "hid", 0 },
> > +	{ "hid-over-i2c", 0 },
> >  	{ },
> >  };
> >  MODULE_DEVICE_TABLE(i2c, i2c_hid_id_table);
> 
> So we already emit this string this as a module device table (OF one),
> why do we need to duplicate it in I2C? This seems like a generic problem
> and not an individual driver one.
> 

Correct me if I am wrong, but isn't it a chromium problem, rather than a
generic OF one?
IIRC, when I introduced the OF binding, the name did not need to be in
the i2c id table because udev was taking that in charge. At least I do
not remember having to manually modprobing the driver.

A quick check in the drivers/input/touchscreen shows that many OF
enumerated touchscreens do not have an exact duplicate of the of
compatible name and the i2c device id one. Most of them have a vendor
prefix in the of name.

I did not used this binding for a long time, so I can not guarantee I am
right, but this change seems weird to me.

Cheers,
Benjamin


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

* Re: [PATCH] HID: i2c-hid: Add hid-over-i2c name to i2c id table.
  2014-10-14 21:44 Benson Leung
@ 2014-10-14 22:59 ` Dmitry Torokhov
  2014-10-23 18:45   ` Benjamin Tissoires
  0 siblings, 1 reply; 9+ messages in thread
From: Dmitry Torokhov @ 2014-10-14 22:59 UTC (permalink / raw)
  To: Benson Leung
  Cc: jkosina, benjamin.tissoires, aduggan, linux-input, linux-kernel,
	olofj, satoshi.noguchi

On Tue, Oct 14, 2014 at 02:44:01PM -0700, Benson Leung wrote:
> When using the device tree binding of compatible = "hid-over-i2c"
> the i2c id table also needs to have that name in order to
> auto load this driver.
> 
> Signed-off-by: Benson Leung <bleung@chromium.org>
> ---
>  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 747d544..1a7605f 100644
> --- a/drivers/hid/i2c-hid/i2c-hid.c
> +++ b/drivers/hid/i2c-hid/i2c-hid.c
> @@ -1123,6 +1123,7 @@ static const struct dev_pm_ops i2c_hid_pm = {
>  
>  static const struct i2c_device_id i2c_hid_id_table[] = {
>  	{ "hid", 0 },
> +	{ "hid-over-i2c", 0 },
>  	{ },
>  };
>  MODULE_DEVICE_TABLE(i2c, i2c_hid_id_table);

So we already emit this string this as a module device table (OF one),
why do we need to duplicate it in I2C? This seems like a generic problem
and not an individual driver one.

Thanks.

-- 
Dmitry

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

* [PATCH] HID: i2c-hid: Add hid-over-i2c name to i2c id table.
@ 2014-10-14 21:44 Benson Leung
  2014-10-14 22:59 ` Dmitry Torokhov
  0 siblings, 1 reply; 9+ messages in thread
From: Benson Leung @ 2014-10-14 21:44 UTC (permalink / raw)
  To: jkosina, benjamin.tissoires, aduggan, linux-input, linux-kernel
  Cc: olofj, bleung, satoshi.noguchi, dmitry.torokhov

When using the device tree binding of compatible = "hid-over-i2c"
the i2c id table also needs to have that name in order to
auto load this driver.

Signed-off-by: Benson Leung <bleung@chromium.org>
---
 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 747d544..1a7605f 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -1123,6 +1123,7 @@ static const struct dev_pm_ops i2c_hid_pm = {
 
 static const struct i2c_device_id i2c_hid_id_table[] = {
 	{ "hid", 0 },
+	{ "hid-over-i2c", 0 },
 	{ },
 };
 MODULE_DEVICE_TABLE(i2c, i2c_hid_id_table);
-- 
2.1.0.rc2.206.gedb03e5


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

end of thread, other threads:[~2016-03-10  9:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-08 19:25 [PATCH] HID: i2c-hid: Add hid-over-i2c name to i2c id table Dmitry Torokhov
2016-03-09 18:37 ` Andrew Duggan
2016-03-09 19:50 ` Benjamin Tissoires
2016-03-09 20:50 ` Jiri Kosina
2016-03-10  0:15   ` Dmitry Torokhov
2016-03-10  9:05     ` Jiri Kosina
  -- strict thread matches above, loose matches on Subject: below --
2014-10-14 21:44 Benson Leung
2014-10-14 22:59 ` Dmitry Torokhov
2014-10-23 18:45   ` Benjamin Tissoires

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).