--- In [email protected], "Stéphane Herraiz"
<[EMAIL PROTECTED]> wrote:
>
> Hello Geert,
> I'm a new in driver development so I don't understand what to do install
> your driver.
> Do I need to just modify the i2c file in devboard-R2_01 and
recompile the
> fimage?
> In fact I have a problem using the original I2C driver, I see
communication
> (on my scope) but the result of a reading :
>  i2c_arg = I2C_READARG(DS1337_WADDR | 1, reg);
>  val = ioctl(fd_i2c, _IO(ETRAXI2C_IOCTYPE, I2C_READREG), i2c_arg);
> ...is still val=255. Do I need to use phrozen patch???
> thanks to help a beginner...
> 

Hi Stéphane,

Regarding the "old" I2C driver, I can tell you it was not very
"flexible".  I don't know the component you're using, but it might be,
for instance, that you first have to write an address where you later
one want to read from.  This is what is called an I2C communication
with repeated start functionality.
The function you're using, is not capable of doing this.

That's why I changed the I2C driver (John Crispin has done the first
version of that driver, I optimised and changed it quite drastically
afterwards).

I mentioned John's name, so indeed you MUST use the Phrozen SDK
distribution made by John.  I'm using it too...

To continue: with my modifications, you should be able to access your
device, even when a repeated start condition is needed (this is called
the I2C_WRITEREAD ioctl call).

I've written an article on my Wiki pages on what all has to be done to
get this driver in "dynamic allocation" mode.

Pls. check it here:

http://www.gevawebsolutions.com/wiki/index.php?title=FB_General_Issues#Adding_a_dynamic_MAJOR_number:_the_steps_to_take...

I know this is a lot of stuff, but since you say you're a beginning
kernel driver developer, it might anyhow interesting to follow the
explanation.

Pls. read it very carefully and if you want to take the challenge
(which I would like very much), follow and execute the steps described.

This has two advantages:

1. you will learn a bit about the structure of the whole FoxBoard setup.

2. I will have feedback on possible errors in the article... ;-)

I will try to make another .rar file with all the files I've changed
to make those things working.  This way, you won't have to
create/change the files yourself.  That might be an easier option...
I'll add some guideline to it too.  But give me some time to do this...

On the other hand, if John and/or Sergio are accepting my changes
(including the procedure I described on the Wiki pages) and putting
them in the next Phrozen SDK (Beta2, that would be), then you should
not be bothered with it too much.

But still I think you should take the challenge of trying to follow
the guidelines I wrote down on the Wiki.  I think/guess you will learn
quite a bit from it (at least, I did...).

Let me know if you experience problems!

Hoped to help,

Best rgds,

--Geert

Reply via email to