All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] drm/bridge: ptn3460: Fix I2C ID table to match the reported modalias
@ 2015-05-14 14:31 Javier Martinez Canillas
  2015-05-14 15:08 ` Doug Anderson
  2015-05-15  9:21   ` Thierry Reding
  0 siblings, 2 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2015-05-14 14:31 UTC (permalink / raw)
  To: Thierry Reding, Olof Johansson
  Cc: David Airlie, Ajay Kumar, Daniel Vetter, Krzysztof Kozlowski,
	Doug Anderson, linux-samsung-soc, linux-kernel, dri-devel,
	Javier Martinez Canillas

I2C drivers that support OF, have both an I2C and OF device ID tables
that are used to fill the supported module aliases. But currently the
I2C core only uses the OF table to match a device with a driver and
the aliases information are always reported in the form i2c:<name>.

The client->name is used as the name postfix and when booting with OF
this is obtained with of_modalias_node() which drops the compatible
string vendor prefix.

So for I2C drivers, the I2C and OF device ID tables should be keep in
sync in order to make module auto-loading to work but the I2C device
entries shouldn't have the vendor prefix since that is not reported.

Before this patch:

MODALIAS=i2c:ptn3460

$ modinfo | grep alias
alias:          i2c:nxp,ptn3460
alias:          of:N*T*Cnxp,ptn3460*

After this patch:

MODALIAS=i2c:ptn3460

$ modinfo | grep alias
alias:          i2c:ptn3460
alias:          of:N*T*Cnxp,ptn3460*

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 drivers/gpu/drm/bridge/ptn3460.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/ptn3460.c b/drivers/gpu/drm/bridge/ptn3460.c
index 9d2f053382e1..2cc15419088d 100644
--- a/drivers/gpu/drm/bridge/ptn3460.c
+++ b/drivers/gpu/drm/bridge/ptn3460.c
@@ -389,7 +389,7 @@ static int ptn3460_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ptn3460_i2c_table[] = {
-	{"nxp,ptn3460", 0},
+	{"ptn3460", 0},
 	{},
 };
 MODULE_DEVICE_TABLE(i2c, ptn3460_i2c_table);
-- 
2.1.4


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

* Re: [PATCH 1/1] drm/bridge: ptn3460: Fix I2C ID table to match the reported modalias
  2015-05-14 14:31 [PATCH 1/1] drm/bridge: ptn3460: Fix I2C ID table to match the reported modalias Javier Martinez Canillas
@ 2015-05-14 15:08 ` Doug Anderson
  2015-05-15  9:21   ` Thierry Reding
  1 sibling, 0 replies; 4+ messages in thread
From: Doug Anderson @ 2015-05-14 15:08 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Thierry Reding, Olof Johansson, David Airlie, Ajay Kumar,
	Daniel Vetter, Krzysztof Kozlowski, linux-samsung-soc,
	linux-kernel, dri-devel

Javier,

On Thu, May 14, 2015 at 7:31 AM, Javier Martinez Canillas
<javier.martinez@collabora.co.uk> wrote:
> I2C drivers that support OF, have both an I2C and OF device ID tables
> that are used to fill the supported module aliases. But currently the
> I2C core only uses the OF table to match a device with a driver and
> the aliases information are always reported in the form i2c:<name>.
>
> The client->name is used as the name postfix and when booting with OF
> this is obtained with of_modalias_node() which drops the compatible
> string vendor prefix.
>
> So for I2C drivers, the I2C and OF device ID tables should be keep in
> sync in order to make module auto-loading to work but the I2C device
> entries shouldn't have the vendor prefix since that is not reported.
>
> Before this patch:
>
> MODALIAS=i2c:ptn3460
>
> $ modinfo | grep alias
> alias:          i2c:nxp,ptn3460
> alias:          of:N*T*Cnxp,ptn3460*
>
> After this patch:
>
> MODALIAS=i2c:ptn3460
>
> $ modinfo | grep alias
> alias:          i2c:ptn3460
> alias:          of:N*T*Cnxp,ptn3460*
>
> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
> ---
>  drivers/gpu/drm/bridge/ptn3460.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Doug Anderson <dianders@chromium.org>

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

* Re: [PATCH 1/1] drm/bridge: ptn3460: Fix I2C ID table to match the reported modalias
  2015-05-14 14:31 [PATCH 1/1] drm/bridge: ptn3460: Fix I2C ID table to match the reported modalias Javier Martinez Canillas
@ 2015-05-15  9:21   ` Thierry Reding
  2015-05-15  9:21   ` Thierry Reding
  1 sibling, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2015-05-15  9:21 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Olof Johansson, David Airlie, Ajay Kumar, Daniel Vetter,
	Krzysztof Kozlowski, Doug Anderson, linux-samsung-soc,
	linux-kernel, dri-devel

[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]

On Thu, May 14, 2015 at 04:31:29PM +0200, Javier Martinez Canillas wrote:
> I2C drivers that support OF, have both an I2C and OF device ID tables
> that are used to fill the supported module aliases. But currently the
> I2C core only uses the OF table to match a device with a driver and
> the aliases information are always reported in the form i2c:<name>.
> 
> The client->name is used as the name postfix and when booting with OF
> this is obtained with of_modalias_node() which drops the compatible
> string vendor prefix.
> 
> So for I2C drivers, the I2C and OF device ID tables should be keep in
> sync in order to make module auto-loading to work but the I2C device
> entries shouldn't have the vendor prefix since that is not reported.
> 
> Before this patch:
> 
> MODALIAS=i2c:ptn3460
> 
> $ modinfo | grep alias
> alias:          i2c:nxp,ptn3460
> alias:          of:N*T*Cnxp,ptn3460*
> 
> After this patch:
> 
> MODALIAS=i2c:ptn3460
> 
> $ modinfo | grep alias
> alias:          i2c:ptn3460
> alias:          of:N*T*Cnxp,ptn3460*
> 
> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
> ---
>  drivers/gpu/drm/bridge/ptn3460.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH 1/1] drm/bridge: ptn3460: Fix I2C ID table to match the reported modalias
@ 2015-05-15  9:21   ` Thierry Reding
  0 siblings, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2015-05-15  9:21 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Krzysztof Kozlowski, linux-samsung-soc, Daniel Vetter,
	Doug Anderson, dri-devel, linux-kernel, Ajay Kumar


[-- Attachment #1.1: Type: text/plain, Size: 1283 bytes --]

On Thu, May 14, 2015 at 04:31:29PM +0200, Javier Martinez Canillas wrote:
> I2C drivers that support OF, have both an I2C and OF device ID tables
> that are used to fill the supported module aliases. But currently the
> I2C core only uses the OF table to match a device with a driver and
> the aliases information are always reported in the form i2c:<name>.
> 
> The client->name is used as the name postfix and when booting with OF
> this is obtained with of_modalias_node() which drops the compatible
> string vendor prefix.
> 
> So for I2C drivers, the I2C and OF device ID tables should be keep in
> sync in order to make module auto-loading to work but the I2C device
> entries shouldn't have the vendor prefix since that is not reported.
> 
> Before this patch:
> 
> MODALIAS=i2c:ptn3460
> 
> $ modinfo | grep alias
> alias:          i2c:nxp,ptn3460
> alias:          of:N*T*Cnxp,ptn3460*
> 
> After this patch:
> 
> MODALIAS=i2c:ptn3460
> 
> $ modinfo | grep alias
> alias:          i2c:ptn3460
> alias:          of:N*T*Cnxp,ptn3460*
> 
> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
> ---
>  drivers/gpu/drm/bridge/ptn3460.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Thierry

[-- Attachment #1.2: Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2015-05-15  9:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-14 14:31 [PATCH 1/1] drm/bridge: ptn3460: Fix I2C ID table to match the reported modalias Javier Martinez Canillas
2015-05-14 15:08 ` Doug Anderson
2015-05-15  9:21 ` Thierry Reding
2015-05-15  9:21   ` Thierry Reding

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.