How to get info into HAL?
Richard Hughes
hughsient at gmail.com
Fri Jul 14 13:05:22 PDT 2006
On Fri, 2006-07-14 at 12:50 -0700, bsmith wrote:
> Richard Hughes wrote:
> > On Mon, 2006-07-10 at 15:54 -0700, bsmith wrote:
> >> I'm writing a battery driver for an ARM system and
> >>I'd like HAL to keep the battery info. HAL sees the /sys
> >>entry but it needs the current_charge info.
> >>
> >>- How do you get a property into HAL?
> >>- Is is part of the configuration in one of the udi files?
> >>- Does it need to be hard coded into a helper app?
> >>- If the later, how does HAL tie to the helper app?
> >>- Is there a programer's manual that describes all this?
> >
> >
> > It's probably best to write a little addon, you should look at the
> > addon-hid-ups addon for an example of how to extract the battery info
> > from a custom source and expose it in HAL.
> >
> > Tell us how you get on.
>
> Richard
> Thanks for the reply. I've given up on HAL as being too
> undocumented to use. Instead I've written a udev rule that
> calls dbus-send to get the battery event to its final destination.
>
> BTW: I work for PalmSource where we are building a highly memory
> constrained desktop on dedicated hardware. (PDAs have become
> small desktops these days.) HAL seems pretty tightly tied to the
> PC (and ACPI) and might be a poor fit for a handheld system with
> an ARM CPU, battery, low disk, and relatively low RAM.
>
> Seems like HAL is the only game in town which kind of unfortunate
> for those of us building PDAs, smartphones, and other embedded
> devices. Not that HAL isn't great; it's just that its assumptions
> are all wrong for us.
Yes, I know. I'm looking at porting HAL to the 770, and my initial port
did so much "#if 0" it was stupid.
I'm thinking we need to make HAL a *lot* more modular, or just
reimpliment a 'hal-tiny' (with 90% of the dbus api, but 2% of the code)
for embedded devices.
R.
More information about the hal
mailing list