Skip to contentSkip to conversation

License for the libi2c

DISCUSSION Mihai Buha 3 participants 5 messages May 29, 2013 – Jun 2, 2013 2 messages not in the archive I2C subsystem host drivers

lore
Share & tools
lore

Mihai Buha

author
#0 lore raw

Hello list,

I have just read the Plans for I2C Tools 4 and I saw that Jean (khali) intends to release the new libi2c under the LGPL. I wonder, however, if that is legally possible, since the functions in i2c-dev.h are subject to the GPL, and only the original implementor is allowed to change the licensing terms if I understand the GPL correctly (the file was originally added in the i2c-tools repository by Kyo:sti (kmalkki), but he may have copied the functions from somewhere else).
The only ways I see to change the licensing are the following:
1) GPL'd code can be relicensed as LGPL by any user (I don't think it's possible);
2) Kyo:sti wrote the code, so he should give his written permission to relicense;
3) Kyo:sti copied the code, so the original author should be tracked down and asked to give his written permission to relicense.
This process should be performed for all the code that is to be relicensed as LGPL.

What do you think?

Disclaimer: IANAL.

Thanks,
Mihai Buha

A message that is not in the archive (sent off-list or not yet received): 1369818463.42609.YahooMailNeo-KCWTPBDN160R8UyDmTZ/[email protected]

#2 lore raw

Newbie: accessing i2c features through kernel functions

Hello,

I'm requesting help. I am currently successfully using i2c-dev module. But i'm unable to drive i2c busses from kernel space as i'd do from userspace (with the use of open, read, write, ioctl functions). I can't logically acces glibc.

Can somebody point me how i could do from kernel space ? Given all is actually working (precisely, i can recompile i2c-dev, and i write an userspace code to manage my i2c slave device).

My goal is to keep i2c-dev suitable initialisation, then wrap some i2c commands into the module to expose userspace a simplified API, with all my device commands. I must do this in kernel space, else i'd have done what i'm able to do: create an userspace lib relying on /dev/i2c-x.

Thank you. Once again i apologize if this is not the place but i'm unable to find suitable ML for this kind of request.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Re: Newbie: accessing i2c features through kernel functions

Quoted 6 lines · On Fri, 31 May 2013 11:49:41 +0200 CF <[email protected]>…

I'm requesting help. I am currently successfully using i2c-dev module. But i'm unable to drive i2c busses from kernel space as i'd do from userspace (with the use of open, read, write, ioctl functions). I can't logically acces glibc.

Can somebody point me how i could do from kernel space ?

you need to get the I2C adapter for your bus using i2c_get_adapter() and then send the I2C messages by i2c_transfer().

Anatolij

#5 lore raw

Re: Newbie: accessing i2c features through kernel functions

Quoted 8 lines · Anatolij Gustschin
Quoted 5 lines · On Fri, 31 May 2013 11:49:41 +0200 CF <[email protected]>…

I'm requesting help. I am currently successfully using i2c-dev module. But i'm unable to drive i2c busses from kernel space as i'd do from userspace (with the use of open, read, write, ioctl functions). I can't logically acces glibc.

Quoted 6 lines
Quoted 1 line

Can somebody point me how i could do from kernel space ?

you need to get the I2C adapter for your bus using i2c_get_adapter() and then send the I2C messages by i2c_transfer().

Anatolij

Thank you for your help. I'll feedback as soon as i got something working. CF

#6 lore raw

Re: Newbie: accessing i2c features through kernel functions

In reply to Anatolij Gustschin
Quoted 8 lines · Anatolij Gustschin
Quoted 5 lines · On Fri, 31 May 2013 11:49:41 +0200 CF <[email protected]>…

I'm requesting help. I am currently successfully using i2c-dev module. But i'm unable to drive i2c busses from kernel space as i'd do from userspace (with the use of open, read, write, ioctl functions). I can't logically acces glibc.

Quoted 6 lines
Quoted 1 line

Can somebody point me how i could do from kernel space ?

you need to get the I2C adapter for your bus using i2c_get_adapter() and then send the I2C messages by i2c_transfer().

Anatolij

It works flawlessly. I could directly drive a device attached to my i2c bus simply by wrapping i2c_tranfer() and some i2c_msg messages, thus expose w/e functions i need to propose a reduced instruction set.

I also learned how works fops structure, to retrieve the equivalent of open/read/write/ioctl 's GLIBC in kernel space. Although i don't use it for my need, quick tests worked nicely with them.

I'll perhaps dig how to work with others structures (in example i don't really see how i2c_client works), and i certainly also need to understand the differences between various algorithms.

Thank you !