Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Device name length restriction?

On Mon, Sep 08, 2008 at 12:13:14PM -0700, Paul Goyette wrote:
> On Mon, 8 Sep 2008, Quentin Garnier wrote:
>> On Mon, Sep 08, 2008 at 11:54:50AM -0700, Paul Goyette wrote:
>>> I've been trying to do some investigation with the I2C device on my
>>> machine that responds to address 0x2E.  It _should_ be an adt7463c
>>> device;  at the very least, if I configure "adt7463c0 at iic1 addr 0x2e"
>>> it should call the match function.
>>> Well, it appears that it doesn't work!

I can't tell from ioconf.c why it doesn't work.  What makes you sure it

>>> Further, if I boot that same kernel with 'boot -c' option, and then try
>>> to find or disable or enable adt7463c0 I get an "invalid argument" error

That's because you can't say "disable device0" in userconf.  You can
either say "disable device" or "disable number" where number is what you
get from "list" or "find".

The reason for that is that it only looks at cf_name in the cfdata

>>> message.  The same find/enable/disable commands work for other devices,
>>> so I'm wondering if maybe there's an internal undocumented limit on the
>>> devicename length?
>>> I could go groveling thru the source code to find the 'boot -c' code,
>>> but figured if I ask here first someone might have an answer off the top
>>> of their head!
>> Can I see the ioconf.c of that kernel?
> kernel config and ioconf.c are attached.  I noticed that ioconf.c  
> includes an entry for adt7467c device, too, even though it is not  
> mentioned in the config file.

No, it's just a iattrdat structure.  config(1) will dump in ioconf.c all
the interface attributes it knows of;  this is a bug/limitation which I
never bothered looking at in details.

That said, there is no valid reason adt74* should be interface
attributes, I'll commit a fix for that.

> static const struct cfiattrdata adt7467ccf_iattrdata = {
>       "adt7467c", 0, {
>               { NULL, NULL, 0 },
>       }
> };

> /*  6: adt7463c0 at iic1 addr 0x2e size -1 */
>     {"adt7463c",      "adt7463c",      0, NORM, loc+ 63,      0, &pspec45},

Quentin Garnier - -
"See the look on my face from staying too long in one place
[...] every time the morning breaks I know I'm closer to falling"
KT Tunstall, Saving My Face, Drastic Fantastic, 2007.

Attachment: pgpTIjWu_IWZJ.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index