Hi,

I'm currently "revamping" the I2C driver which is part of the Phrozen
SDK distribution.

The initial speed (without any modifications done to the code) was
about 62.5 kHz, now I'm able to run it on 100 kHz without any problems
(this is according the "low" I2C speed standard).

So, looks promising, but I still have lots of tests to do...

However, while being busy changing the code, I also wanted to get rid
of the statically defined MAJOR device node number (currently fixed on
123).

While reading the Linux Device Drivers book, I saw that the better way
is to dynamically allocate a MAJOR number, meaning "leave it up to the
kernel to give you a MAJOR number".

This has advantages, since with this method, you will never clash with
a MAJOR number of another device which you don't have under your control.

However, like so many things, this mechanism has also a (so far: one)
disadvantage: you can't create your device node any more in advance.

And that's where my problem currently is to allocate MAJOR numbers "on
the fly" (read: dynamic allocation).

Since the RFS is in read-only area of the flash, you can't create the
device node during the start-up process of the FoxBoard.

Or can you, using another technique?

That's what I want to know.  If I'm able to create the node on the
fly, then it might be wise to switch over to the "new approach" of
allocating a MAJOR number to your character device.
Else, I'm afraid I have to stick to the statical method.

Anyone any suggestion?

Best rgds,

--Geert

Reply via email to