* [PATCH 1/2] i2c: expand I2C's id.name to 23 characters
@ 2008-09-19 18:03 Anton Vorontsov
2008-09-19 20:03 ` Jean Delvare
0 siblings, 1 reply; 3+ messages in thread
From: Anton Vorontsov @ 2008-09-19 18:03 UTC (permalink / raw)
To: Jean Delvare, Ben Dooks; +Cc: linuxppc-dev, i2c
It was discussed[1] that we should match on the first (most specific)
entry in the device tree.
The most lengthy I2C compatible entry for the MPC8349E-mITX MCU
devices is "mc9s08qg8-mpc8349emitx" (w/o vendor name). This means
that we have to allow longer IDs to be used in the I2C subsystem.
[1] http://www.mail-archive.com/linuxppc-dev@ozlabs.org/msg21196.html
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
include/linux/mod_devicetable.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index c4db582..9d9d1f5 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -379,7 +379,7 @@ struct virtio_device_id {
/* i2c */
-#define I2C_NAME_SIZE 20
+#define I2C_NAME_SIZE 23
#define I2C_MODULE_PREFIX "i2c:"
struct i2c_device_id {
--
1.5.6.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] i2c: expand I2C's id.name to 23 characters
2008-09-19 18:03 [PATCH 1/2] i2c: expand I2C's id.name to 23 characters Anton Vorontsov
@ 2008-09-19 20:03 ` Jean Delvare
2008-09-19 20:39 ` Grant Likely
0 siblings, 1 reply; 3+ messages in thread
From: Jean Delvare @ 2008-09-19 20:03 UTC (permalink / raw)
To: Anton Vorontsov; +Cc: linuxppc-dev, i2c, Ben Dooks
On Fri, 19 Sep 2008 22:03:39 +0400, Anton Vorontsov wrote:
> It was discussed[1] that we should match on the first (most specific)
> entry in the device tree.
>
> The most lengthy I2C compatible entry for the MPC8349E-mITX MCU
> devices is "mc9s08qg8-mpc8349emitx" (w/o vendor name). This means
> that we have to allow longer IDs to be used in the I2C subsystem.
>
> [1] http://www.mail-archive.com/linuxppc-dev@ozlabs.org/msg21196.html
Nack. Just come up with shorter names. "mc9s08qg8-mpc8349emitx" is
simply too long to start with. Looking at the mcu_mpc8349emitx driver
you just submitted, you are clearly abusing the i2c client name to pass
platform-specific information, and that's bad. I'm not even sure why
you do that, given that all the names are then handled the same as far
as I can see.
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
> include/linux/mod_devicetable.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
> index c4db582..9d9d1f5 100644
> --- a/include/linux/mod_devicetable.h
> +++ b/include/linux/mod_devicetable.h
> @@ -379,7 +379,7 @@ struct virtio_device_id {
>
> /* i2c */
>
> -#define I2C_NAME_SIZE 20
> +#define I2C_NAME_SIZE 23
> #define I2C_MODULE_PREFIX "i2c:"
>
> struct i2c_device_id {
--
Jean Delvare
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] i2c: expand I2C's id.name to 23 characters
2008-09-19 20:03 ` Jean Delvare
@ 2008-09-19 20:39 ` Grant Likely
0 siblings, 0 replies; 3+ messages in thread
From: Grant Likely @ 2008-09-19 20:39 UTC (permalink / raw)
To: Jean Delvare; +Cc: linuxppc-dev, i2c, Ben Dooks
On Fri, Sep 19, 2008 at 10:03:08PM +0200, Jean Delvare wrote:
> On Fri, 19 Sep 2008 22:03:39 +0400, Anton Vorontsov wrote:
> > It was discussed[1] that we should match on the first (most specific)
> > entry in the device tree.
> >
> > The most lengthy I2C compatible entry for the MPC8349E-mITX MCU
> > devices is "mc9s08qg8-mpc8349emitx" (w/o vendor name). This means
> > that we have to allow longer IDs to be used in the I2C subsystem.
> >
> > [1] http://www.mail-archive.com/linuxppc-dev@ozlabs.org/msg21196.html
>
> Nack. Just come up with shorter names. "mc9s08qg8-mpc8349emitx" is
> simply too long to start with. Looking at the mcu_mpc8349emitx driver
> you just submitted, you are clearly abusing the i2c client name to pass
> platform-specific information, and that's bad. I'm not even sure why
> you do that, given that all the names are then handled the same as far
> as I can see.
The whole "matching on the first entry" thing is just a Linux-internal
heuristic. If the heuristic breaks down (like it does here), then there
is a mechanism to override it in of_base.c which has a
compatible-->modalias translation table.
g.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-19 20:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-19 18:03 [PATCH 1/2] i2c: expand I2C's id.name to 23 characters Anton Vorontsov
2008-09-19 20:03 ` Jean Delvare
2008-09-19 20:39 ` Grant Likely
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).