Questions on physdev vs. classdev

Artem Kachitchkine Artem.Kachitchkin at Sun.COM
Tue Jan 24 13:11:15 PST 2006


Joe,

> It seems like Linux distinguishes between physical devices (e.g. a PCI
> card), and logical devices (a PCI card that happens to be a sound card).
>  Therefore, one physdev event will be triggered as well as one classdev
> event.  Is that correct?

 From my experience in porting HAL to Solaris (soon to be released), 
physdev vs classdev can be considered a Linux artifact. You should be 
able to write a HAL backend only by looking at the spec document. 
Everything under hald/linux2 directory should not matter for hald/freebsd.

If you look at the spec:

http://cvs.freedesktop.org/*checkout*/hal/hal/doc/spec/hal-spec.html?only_with_tag=HEAD

the way "pci card as well as sound card" case is represented is through 
physical vs functional properties. I.e. you don't need two HAL devices, 
you just associate two (or more) namespaces: you sound card would have 
both pci.* properties and alsa.* (or oss.*) properties.

> Okay, I guess I have a third question.  I've created some
> FreeBSD-specific properties such as freebsd.dev_name and
> info.freebsd.driver.  Do I need to register these anywhere, or is this
> something I can do after the fact?

I think you can just include spec update with your patch.

-Artem.


More information about the hal mailing list