Re: [RFC] Driver for Arduino-as-I2C-adapter

2015-05-18 Thread Angelo Compagnucci
Dear Bernhard Kraft,

2015-05-18 18:53 GMT+02:00 Bernhard Kraft :
> Hi,
>
> On 2015-05-18 15:00, Alex Beregszaszi wrote:
>
>> There are many cheap I2C adapter projects (mostly USB though). One of
>> the simple ones (i2c-tiny-usb) is included in the kernel  [...]
>
>
> I knew of the OpenSource project i2c-tiny-usb. But sadly the hardware ist
> not sold anywhere (At least I didn't find vendors).
>
>
>> As regarding to cheap serial line based adapters, there are two I have
>> seen before [...]
>
>
> None of them seems to have kernel drivers available. So I could stick to my
> own homebrewn Arduino solution.
>
>
>> I am afraid handling serial devices within a i2c kernel driver might be
>> tricky and purists probably dislike the idea.
>
>
> Currently there is at least one driver for such a case already in the
> kernel: drivers/i2c/busses/i2c-taos-evm.c
>
> I found it by "grep serio.h" in i2c/busses/. But this driver rather only
> supports SMBus which is kind of subset of I2C. Or you could call it I2C with
> more strict requirements upon timing and protocol.
>
> In fact this would have been the driver I would have based my work on if
> someone said: Go on, this is a good thing to include in the kernel.

Personally, I find the idea very interesting, Arduino is so common
that using it a usb/i2c bridge could benefit really a lot of people.
Actually I'm think also to spi!

> But for now I think I will just publish the Arduino sketch and a sample
> implementation on how to access I2C devices with it.

Probably we should stick to other protocol driver implementation, but
from a rapid analisys, this will be the second in kernel serial to i2c
adapter, so I think there is not such a string standard protocol in
this field.

Please publish your sketch, I think making the driver is really not a
complex matter!
Count on me for any help, I really like the idea to have my name on
such an interesting project!

Sincerely, Angelo

>
> greetings,
> Bernhard
> --
> Wer nicht gelegentlich auch einmal kausalwidrige Dinge zu denken vermag,
> wird seine Wissenschaft nie um eine neue Idee bereichern können.
> Max Planck (1858-1947)
> ___
> devel mailing list
> de...@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



-- 
Profile: http://it.linkedin.com/in/compagnucciangelo
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [RFC] Driver for Arduino-as-I2C-adapter

2015-05-19 Thread Angelo Compagnucci
Hi Alex,

2015-05-19 13:59 GMT+02:00 Alex Beregszaszi :
> Hi,
>
> Angelo Compagnucci wrote:
>
> Dear Bernhard Kraft,
>
> 2015-05-18 18:53 GMT+02:00 Bernhard Kraft :
>
> But for now I think I will just publish the Arduino sketch and a sample
> implementation on how to access I2C devices with it.
>
> Probably we should stick to other protocol driver implementation, but
> from a rapid analisys, this will be the second in kernel serial to i2c
> adapter, so I think there is not such a string standard protocol in
> this field.
>
> Please publish your sketch, I think making the driver is really not a
> complex matter!
> Count on me for any help, I really like the idea to have my name on
> such an interesting project!
>
> I have  worked on some I2C drivers for Linux, as well as Arduino and
> searched for cheaper options countless times.  Yesterday's email made me to
> search again and really liked the way one of products I've mentioned was
> structured.

Great! Looking at the kernel, the USB-ISS doesn't have a ready made
driver. This could be a counter argument cause we will use another I2C
over UART protocol.

> So I sat down and wrote an Arduino implementation of that specification just
> to see what the performance would be. You can find it at:
> https://github.com/axic/dtiic

I had a quick look at code and it seems simple, readable and fastest
at least to sustain the 400khz mode of i2c.

BTW, I'm thinking on making an arduino code compatible with some of
the already in kernel driver and i2c-tiny-usb could be a really valid
candidate. This way we could only ask for a .ino inclusion in mainline
with some sort of documentation on how to cook a homemade I2C over
UART bridge.

Sincerely, Angelo

>
> Best,
> Alex
>



-- 
Profile: http://it.linkedin.com/in/compagnucciangelo
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [RFC] Driver for Arduino-as-I2C-adapter

2015-05-19 Thread Angelo Compagnucci
Hi Alex,

2015-05-19 15:34 GMT+02:00 Angelo Compagnucci :
> Hi Alex,
>
> 2015-05-19 13:59 GMT+02:00 Alex Beregszaszi :
>> Hi,
>>
>> Angelo Compagnucci wrote:
>>
>> Dear Bernhard Kraft,
>>
>> 2015-05-18 18:53 GMT+02:00 Bernhard Kraft :
>>
>> But for now I think I will just publish the Arduino sketch and a sample
>> implementation on how to access I2C devices with it.
>>
>> Probably we should stick to other protocol driver implementation, but
>> from a rapid analisys, this will be the second in kernel serial to i2c
>> adapter, so I think there is not such a string standard protocol in
>> this field.
>>
>> Please publish your sketch, I think making the driver is really not a
>> complex matter!
>> Count on me for any help, I really like the idea to have my name on
>> such an interesting project!
>>
>> I have  worked on some I2C drivers for Linux, as well as Arduino and
>> searched for cheaper options countless times.  Yesterday's email made me to
>> search again and really liked the way one of products I've mentioned was
>> structured.
>
> Great! Looking at the kernel, the USB-ISS doesn't have a ready made
> driver. This could be a counter argument cause we will use another I2C
> over UART protocol.
>
>> So I sat down and wrote an Arduino implementation of that specification just
>> to see what the performance would be. You can find it at:
>> https://github.com/axic/dtiic
>
> I had a quick look at code and it seems simple, readable and fastest
> at least to sustain the 400khz mode of i2c.
>
> BTW, I'm thinking on making an arduino code compatible with some of
> the already in kernel driver and i2c-tiny-usb could be a really valid
> candidate. This way we could only ask for a .ino inclusion in mainline
> with some sort of documentation on how to cook a homemade I2C over
> UART bridge.

The only downside of this approach is that we should write something
USB based, not UART, so it will limit the choice of usable Arduino
board to only the Leonardo.
I think we should stick for an serio based driver to be compatible
with all the boards.

I have no problem in writing such a driver, probably I will look into
this in the next few days.

Sincerely, Angelo

>
> Sincerely, Angelo
>
>>
>> Best,
>> Alex
>>
>
>
>
> --
> Profile: http://it.linkedin.com/in/compagnucciangelo



-- 
Profile: http://it.linkedin.com/in/compagnucciangelo
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel