Re: /proc vs. /sys

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 21, 2004 at 07:31:57PM +0100, Frank.A.Uepping@t-online.de wrote:
> 
> Ok, here is what I want to achieve.
> 
> I am working on a remote-CAPI implementation for Linux.
>         https://sourceforge.net/projects/rcapi4linux/
> Currently I am porting/rewriting to kernel-2.6.
> 
> The new (for kernel-2.6) remote-CAPI implementation should introduce a new 
> service allowing other code/modules to register/drive a remote-CAPI 
> controller. Basically, a remote-CAPI controller is a CAPI controller with 
> additional capabilities suited to facilitate the implementation of various 
> remote-CAPI solutions. A remote CAPI controller is a pure software device, no 
> physical hardware is involved here!

So a remote CAPI controller is on the current system, right?  How does
it talk to the physical hardware on a different machine?  What does it
use to do the communication?

Does it bind to a specific network interface?  If so, there's your
parent in the sysfs tree :)

> In order to make various information (like the registered controllers, its 
> state, its CAPI applications, etc) available to the user I have chosen to use 
> the sysfs for this (when this is appropriate at all).
> Here is a sample tree:
> 
> /sys/.../rcapi/
> |-- ctr0
> |   |-- manufacturer
> |   |-- serial_number
> |   |-- state
> |   |-- debug
> |   |-- appl0/
> |   |    |--- state
> |   |    |--- remote_id
> |   |    |--- id
> |   |-- appl1/
> |   |    |--- state
> |   |    |--- ...
> |-- ctr1/
> |   |-- manufacturer
> ...
> 
> My questions are:
> Is the sysfs appropriate for this kind of usage?

Yes.

> Where is the right place for my tree in /sys?

See above.

> What are the rough steps needed to implement this?

Convert your code to use a struct device :)

thanks,

greg k-h

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux