What program should be responsible for configuring devices in HAL/DBUS/UDEV environment ?

David Zeuthen david at fubar.dk
Sat Jan 22 07:56:02 PST 2005


On Sat, 2005-01-22 at 15:55 +0200, Paul Ionescu wrote:
> Hi,
> 
> Sooner or later, we'll have legacy ACPI-PNP devices imported in HAL.
> PNP devices usually support multiple configurations, and to by dynamically
> enabled/disabled.
> I already played with my parallel printer port in
> /sys/bus/pnp/devices/00:06 and successfully enabled and disabled it. 
> 

I imagine that callouts (e.g. programs run just after device
discovery but before the device is announced) will configure physical
devices when they appear/disappear and use properties (merged from
device information files or persistent properties that tell who it
should be configured. What does configuration entail?

 1. Specifying what driver to bind to the device
    (right now the kernel does this, but this is about to change
     if I read LKML correctly)

 2. Driver options
    (which I believe, but am not sure, will also be per-device
     instead of per-module)
    (so instead of having quirk-lists in the kernel (such as
     drivers/usb/storage/unusual_devs.h in Linux) we can push
     this from user space using device information files /
     persistent properties)

I also expect that physical devices will implement an interface
org.freedesktop.Hal.Device.Physical with generic methods (e.g.
Suspend/Wakeup); for specific buses we might export e.g. org.
freedesktop.Hal.Device.Physical.PCI etc. etc. See the archives
on how we want to implement such interfaces.

> What program should be responsible for configuring such PNP devices and
> maybe other devices ?
> Let's say that I want to disable my legacy serial port (which is an
> acpi-pnp device), how this should be done, and what are the implications
> for HAL ?

Callouts would do the autoconfiguration. I imagine desktop programs
would take advantage of persistent properties, the above mentioned
interfaces and the Reprobe() method discussed a few days ago to
manipulate this. How the UI is going to look is an open question
though; my current thinking involves something that looks like h-d-m
but...

> Is there any notification sent when I activate/deactivate a pnp device, in
> order that HAL should notice a change ?
> 
> I cannot ask HAL to do this change, because this is out of its specs.
> But if a separate program will do this change, is his duty to let HAL know
> about it, or should HAL discover itself ?
> 

Well, I imagine HAL just keeps track of the various properties, e.g. if
a device can be disabled we should track that somehow. It's all very
blue sky because the kernel side is missing and we still need to put
certain features in HAL to do the userspace side right. I'm sure we'll
need a few tries to get this right. There's also fin things such as 
you want to start hald pretty early on but this is really a distributor
issue...

<shameless plug>
I wrote a bit more about future topics here

 http://www.redhat.com/magazine/003jan05/features/hal/#conc_future
</shameless plug>

Cheers,
David


_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list