[PATCH][RFC] nokia 770 backlight addon for HAL.

David Zeuthen david at fubar.dk
Thu Dec 21 14:49:31 PST 2006


On Thu, 2006-12-21 at 23:03 +0300, Sergey Lapin wrote:
> Hi,
> 
> Please see attached patch.
> 
> It adds addon to support n770 backlight operation.

Cool, thanks for doing this; some comments after our IRC discussion

> +/* Read maximum bl level */
> +/* TODO: set actual maximum level in property! 
> + (ask davidz about that)
> +*/
> +static void write_backlight(int bl)

This comment is probably wrong; if you meant that want to change
laptop_panel.num_levels from the addon instead of setting it from
an .fdi file... it's perfectly valid however you should do it in the
addon's main() function before calling addon_is_ready().

> +       if (!libhal_device_addon_is_ready (halctx, udi, &err)) {
> +               return -4;
> +       }
...
> +       if (!libhal_device_claim_interface (halctx, 

You need to claim the interface before calling addon_is_ready().

There's also some stale comments from the Macbook Pro addon you based
this on I think

> +       /* Search for the graphics card. */
> +       /* Default values: */
> +       /* address = 0x90300000; */
> +       /* length = 0x20000; */

Also, if you can reformat the code so it fits in with the normal HAL
code it would be nice. Thanks.

      David




More information about the hal mailing list