|
4#
楼主 |
发表于 2006-5-30 23:39:21
|
只看该作者
同步kernel专家研究的东西
Hi,
Hello.
We had a discussion a month ago or so. Since then we successfully implemented our w1 driver.
Bus master also and the family driver. The read data is correct so everything is fine.
My congratulation!
Will you push it upstream?
Now I want to implement a driver into the kernel which supposed to interpret the data from the w1 slave and provide it as a different format.
The w1 slave what i'm talking about is the ds2760 battery monitor chip.
We can read the data from it through the sysfs. I need to implement also a battery driver which will provide the usual battery interface from the data read from the ds2760.
Why not export data through sysfs and using any other interface in parallel?
There's no interface in the w1 core to:
1.) Ennumerate bus masters
2.) Ennumerate slaves for each busmaster
I'd need that because i have to call the read_block of my slave.
The question is if you wanted to implement anything like that or not. If yes, what's its progress, if no then I'll do it. If you don't have it, i'll do it and send the code for you also. You might want to apply the patch on the mainline kernel as well.
I have such an idea quite long.
Currently, when kernel connecor is almost in mainline, I will create it.
As you probably know, kernel connector is a netlink based interface,
which
allows easy connection userspace and kernelspae.
Some kind of an ioctl.
Using that interface I'm going to allow external modules/userspace
access
to the internal master/slave structures in the following way:
connector's message -> message type -> master/slave operations -> call
appropriate function.
Almost the same as ethtools for network drivers.
But it is long term solution.
Short one is to create some kind of get_master_by_name(), and export
through sysfs
list of master names.
When you have access to the w1_master structure, you can traverse
through ->slist list,
and get access to any slave.
Will it what you mean?
Thanks,
Szabolcs Gyurko |
|