Re: [PATCH] driver: misc: bmp085: remove "of_match_table" property.

2012-08-07 Thread Warner Losh

On Aug 7, 2012, at 4:52 AM, Mark Brown wrote:

> On Tue, Aug 07, 2012 at 08:43:44AM +0300, Felipe Balbi wrote:
>> On Mon, Aug 06, 2012 at 04:42:14PM +0100, Mark Brown wrote:
> 
>>> It's good practice to have an explict compatible string even if the
>>> default happens to work in order to avoid any name clashes.
> 
>> of_i2c.c makes no use whatsoever of the compatible string. See that it
>> will build an i2c_boardinfo and register a new device. That compatible
> 
> If that's all that's done it seems like a bug frankly, certainly based
> on previous discussions it ought to be.  There are collisions out there,
> they've just happened to not bite us yet

Also keep in mind that the device tree is supposed to be a description of the 
hardware, and different implementations of the device tree may use the 
compatible string.

Warner

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] driver: misc: bmp085: remove "of_match_table" property.

2012-08-07 Thread Mark Brown
On Tue, Aug 07, 2012 at 08:43:44AM +0300, Felipe Balbi wrote:
> On Mon, Aug 06, 2012 at 04:42:14PM +0100, Mark Brown wrote:

> > It's good practice to have an explict compatible string even if the
> > default happens to work in order to avoid any name clashes.

> of_i2c.c makes no use whatsoever of the compatible string. See that it
> will build an i2c_boardinfo and register a new device. That compatible

If that's all that's done it seems like a bug frankly, certainly based
on previous discussions it ought to be.  There are collisions out there,
they've just happened to not bite us yet

> string is just churn and has no use at all.

This is device tree we're talking about, there's a lot churn anyway.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] driver: misc: bmp085: remove of_match_table property.

2012-08-07 Thread Mark Brown
On Tue, Aug 07, 2012 at 08:43:44AM +0300, Felipe Balbi wrote:
 On Mon, Aug 06, 2012 at 04:42:14PM +0100, Mark Brown wrote:

  It's good practice to have an explict compatible string even if the
  default happens to work in order to avoid any name clashes.

 of_i2c.c makes no use whatsoever of the compatible string. See that it
 will build an i2c_boardinfo and register a new device. That compatible

If that's all that's done it seems like a bug frankly, certainly based
on previous discussions it ought to be.  There are collisions out there,
they've just happened to not bite us yet

 string is just churn and has no use at all.

This is device tree we're talking about, there's a lot churn anyway.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] driver: misc: bmp085: remove of_match_table property.

2012-08-07 Thread Warner Losh

On Aug 7, 2012, at 4:52 AM, Mark Brown wrote:

 On Tue, Aug 07, 2012 at 08:43:44AM +0300, Felipe Balbi wrote:
 On Mon, Aug 06, 2012 at 04:42:14PM +0100, Mark Brown wrote:
 
 It's good practice to have an explict compatible string even if the
 default happens to work in order to avoid any name clashes.
 
 of_i2c.c makes no use whatsoever of the compatible string. See that it
 will build an i2c_boardinfo and register a new device. That compatible
 
 If that's all that's done it seems like a bug frankly, certainly based
 on previous discussions it ought to be.  There are collisions out there,
 they've just happened to not bite us yet

Also keep in mind that the device tree is supposed to be a description of the 
hardware, and different implementations of the device tree may use the 
compatible string.

Warner

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] driver: misc: bmp085: remove "of_match_table" property.

2012-08-06 Thread Felipe Balbi
Hi,

On Mon, Aug 06, 2012 at 04:42:14PM +0100, Mark Brown wrote:
> On Mon, Aug 06, 2012 at 12:30:34PM +0300, Felipe Balbi wrote:
> > On Mon, Aug 06, 2012 at 02:58:44PM +0530, Sourav Poddar wrote:
> > > There is an automatic binding done for I2C devices in the of_i2c core
> > > code. So, DT will be able to bind to any I2C device using the
> > > already existing table: MODULE_DEVICE_TABLE(i2c, bmp085_id).
> 
> > Acked-by: Felipe Balbi 
> 
> It's good practice to have an explict compatible string even if the
> default happens to work in order to avoid any name clashes.

of_i2c.c makes no use whatsoever of the compatible string. See that it
will build an i2c_boardinfo and register a new device. That compatible
string is just churn and has no use at all.

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH] driver: misc: bmp085: remove "of_match_table" property.

2012-08-06 Thread Mark Brown
On Mon, Aug 06, 2012 at 12:30:34PM +0300, Felipe Balbi wrote:
> On Mon, Aug 06, 2012 at 02:58:44PM +0530, Sourav Poddar wrote:
> > There is an automatic binding done for I2C devices in the of_i2c core
> > code. So, DT will be able to bind to any I2C device using the
> > already existing table: MODULE_DEVICE_TABLE(i2c, bmp085_id).

> Acked-by: Felipe Balbi 

It's good practice to have an explict compatible string even if the
default happens to work in order to avoid any name clashes.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] driver: misc: bmp085: remove "of_match_table" property.

2012-08-06 Thread Felipe Balbi
On Mon, Aug 06, 2012 at 02:58:44PM +0530, Sourav Poddar wrote:
> There is an automatic binding done for I2C devices in the of_i2c core
> code. So, DT will be able to bind to any I2C device using the
> already existing table: MODULE_DEVICE_TABLE(i2c, bmp085_id).
> 
> Tested on omap5430 evm.
> 
> Cc: Benoit Cousson 
> Cc: Felipe Balbi 
> Cc: Santosh Shilimkar 
> Signed-off-by: Sourav Poddar 

Acked-by: Felipe Balbi 

> ---
>  drivers/misc/bmp085-i2c.c |7 ---
>  1 files changed, 0 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/misc/bmp085-i2c.c b/drivers/misc/bmp085-i2c.c
> index 9943971..a4f33c9 100644
> --- a/drivers/misc/bmp085-i2c.c
> +++ b/drivers/misc/bmp085-i2c.c
> @@ -57,12 +57,6 @@ static int bmp085_i2c_remove(struct i2c_client *client)
>   return bmp085_remove(>dev);
>  }
>  
> -static const struct of_device_id bmp085_of_match[] = {
> - { .compatible = "bosch,bmp085", },
> - { },
> -};
> -MODULE_DEVICE_TABLE(of, bmp085_of_match);
> -
>  static const struct i2c_device_id bmp085_id[] = {
>   { BMP085_NAME, 0 },
>   { "bmp180", 0 },
> @@ -74,7 +68,6 @@ static struct i2c_driver bmp085_i2c_driver = {
>   .driver = {
>   .owner  = THIS_MODULE,
>   .name   = BMP085_NAME,
> - .of_match_table = bmp085_of_match
>   },
>   .id_table   = bmp085_id,
>   .probe  = bmp085_i2c_probe,
> -- 
> 1.7.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
balbi


signature.asc
Description: Digital signature


[PATCH] driver: misc: bmp085: remove "of_match_table" property.

2012-08-06 Thread Sourav Poddar
There is an automatic binding done for I2C devices in the of_i2c core
code. So, DT will be able to bind to any I2C device using the
already existing table: MODULE_DEVICE_TABLE(i2c, bmp085_id).

Tested on omap5430 evm.

Cc: Benoit Cousson 
Cc: Felipe Balbi 
Cc: Santosh Shilimkar 
Signed-off-by: Sourav Poddar 
---
 drivers/misc/bmp085-i2c.c |7 ---
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/drivers/misc/bmp085-i2c.c b/drivers/misc/bmp085-i2c.c
index 9943971..a4f33c9 100644
--- a/drivers/misc/bmp085-i2c.c
+++ b/drivers/misc/bmp085-i2c.c
@@ -57,12 +57,6 @@ static int bmp085_i2c_remove(struct i2c_client *client)
return bmp085_remove(>dev);
 }
 
-static const struct of_device_id bmp085_of_match[] = {
-   { .compatible = "bosch,bmp085", },
-   { },
-};
-MODULE_DEVICE_TABLE(of, bmp085_of_match);
-
 static const struct i2c_device_id bmp085_id[] = {
{ BMP085_NAME, 0 },
{ "bmp180", 0 },
@@ -74,7 +68,6 @@ static struct i2c_driver bmp085_i2c_driver = {
.driver = {
.owner  = THIS_MODULE,
.name   = BMP085_NAME,
-   .of_match_table = bmp085_of_match
},
.id_table   = bmp085_id,
.probe  = bmp085_i2c_probe,
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] driver: misc: bmp085: remove of_match_table property.

2012-08-06 Thread Sourav Poddar
There is an automatic binding done for I2C devices in the of_i2c core
code. So, DT will be able to bind to any I2C device using the
already existing table: MODULE_DEVICE_TABLE(i2c, bmp085_id).

Tested on omap5430 evm.

Cc: Benoit Cousson b-cous...@ti.com
Cc: Felipe Balbi ba...@ti.com
Cc: Santosh Shilimkar santosh.shilim...@ti.com
Signed-off-by: Sourav Poddar sourav.pod...@ti.com
---
 drivers/misc/bmp085-i2c.c |7 ---
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/drivers/misc/bmp085-i2c.c b/drivers/misc/bmp085-i2c.c
index 9943971..a4f33c9 100644
--- a/drivers/misc/bmp085-i2c.c
+++ b/drivers/misc/bmp085-i2c.c
@@ -57,12 +57,6 @@ static int bmp085_i2c_remove(struct i2c_client *client)
return bmp085_remove(client-dev);
 }
 
-static const struct of_device_id bmp085_of_match[] = {
-   { .compatible = bosch,bmp085, },
-   { },
-};
-MODULE_DEVICE_TABLE(of, bmp085_of_match);
-
 static const struct i2c_device_id bmp085_id[] = {
{ BMP085_NAME, 0 },
{ bmp180, 0 },
@@ -74,7 +68,6 @@ static struct i2c_driver bmp085_i2c_driver = {
.driver = {
.owner  = THIS_MODULE,
.name   = BMP085_NAME,
-   .of_match_table = bmp085_of_match
},
.id_table   = bmp085_id,
.probe  = bmp085_i2c_probe,
-- 
1.7.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] driver: misc: bmp085: remove of_match_table property.

2012-08-06 Thread Felipe Balbi
On Mon, Aug 06, 2012 at 02:58:44PM +0530, Sourav Poddar wrote:
 There is an automatic binding done for I2C devices in the of_i2c core
 code. So, DT will be able to bind to any I2C device using the
 already existing table: MODULE_DEVICE_TABLE(i2c, bmp085_id).
 
 Tested on omap5430 evm.
 
 Cc: Benoit Cousson b-cous...@ti.com
 Cc: Felipe Balbi ba...@ti.com
 Cc: Santosh Shilimkar santosh.shilim...@ti.com
 Signed-off-by: Sourav Poddar sourav.pod...@ti.com

Acked-by: Felipe Balbi ba...@ti.com

 ---
  drivers/misc/bmp085-i2c.c |7 ---
  1 files changed, 0 insertions(+), 7 deletions(-)
 
 diff --git a/drivers/misc/bmp085-i2c.c b/drivers/misc/bmp085-i2c.c
 index 9943971..a4f33c9 100644
 --- a/drivers/misc/bmp085-i2c.c
 +++ b/drivers/misc/bmp085-i2c.c
 @@ -57,12 +57,6 @@ static int bmp085_i2c_remove(struct i2c_client *client)
   return bmp085_remove(client-dev);
  }
  
 -static const struct of_device_id bmp085_of_match[] = {
 - { .compatible = bosch,bmp085, },
 - { },
 -};
 -MODULE_DEVICE_TABLE(of, bmp085_of_match);
 -
  static const struct i2c_device_id bmp085_id[] = {
   { BMP085_NAME, 0 },
   { bmp180, 0 },
 @@ -74,7 +68,6 @@ static struct i2c_driver bmp085_i2c_driver = {
   .driver = {
   .owner  = THIS_MODULE,
   .name   = BMP085_NAME,
 - .of_match_table = bmp085_of_match
   },
   .id_table   = bmp085_id,
   .probe  = bmp085_i2c_probe,
 -- 
 1.7.1
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-kernel in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 Please read the FAQ at  http://www.tux.org/lkml/

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH] driver: misc: bmp085: remove of_match_table property.

2012-08-06 Thread Mark Brown
On Mon, Aug 06, 2012 at 12:30:34PM +0300, Felipe Balbi wrote:
 On Mon, Aug 06, 2012 at 02:58:44PM +0530, Sourav Poddar wrote:
  There is an automatic binding done for I2C devices in the of_i2c core
  code. So, DT will be able to bind to any I2C device using the
  already existing table: MODULE_DEVICE_TABLE(i2c, bmp085_id).

 Acked-by: Felipe Balbi ba...@ti.com

It's good practice to have an explict compatible string even if the
default happens to work in order to avoid any name clashes.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] driver: misc: bmp085: remove of_match_table property.

2012-08-06 Thread Felipe Balbi
Hi,

On Mon, Aug 06, 2012 at 04:42:14PM +0100, Mark Brown wrote:
 On Mon, Aug 06, 2012 at 12:30:34PM +0300, Felipe Balbi wrote:
  On Mon, Aug 06, 2012 at 02:58:44PM +0530, Sourav Poddar wrote:
   There is an automatic binding done for I2C devices in the of_i2c core
   code. So, DT will be able to bind to any I2C device using the
   already existing table: MODULE_DEVICE_TABLE(i2c, bmp085_id).
 
  Acked-by: Felipe Balbi ba...@ti.com
 
 It's good practice to have an explict compatible string even if the
 default happens to work in order to avoid any name clashes.

of_i2c.c makes no use whatsoever of the compatible string. See that it
will build an i2c_boardinfo and register a new device. That compatible
string is just churn and has no use at all.

-- 
balbi


signature.asc
Description: Digital signature