On Fri, Nov 16, 2001 at 04:59:25PM +0100, Benny Sj�strand wrote:
> I have not looked in that part (drivers/net/irda/sa1100_ir.c) what enables
> the power the IR module in the h3600 is the EGPIO9, part of that is done
> in arch/arm/mach-sa1100/h3600.c, and i think for the iPAQ the
> arch/arm/mach-sa1100/h3600.c is a good place to turn on/off the EGPIO9.

That's actually not the right way to go about it - you'll end up with lots
of stuff calling into h3600.c, with lots of exported symbols and such like,
and lots of preprocessor junk which will be a total and utter nightmare to
maintain.  Anything that falls into that category generally doesn't get
past me for sanity reasons.

However, lets look at the existing code to see what it does:

/*
 * This turns the IRDA power on or off on the Compaq H3600
 */
static inline int
sa1100_irda_set_power_h3600(struct sa1100_irda *si, unsigned int state)
{
        if (state)
                set_h3600_egpio(EGPIO_H3600_IR_ON);
        else
                clr_h3600_egpio(EGPIO_H3600_IR_ON);
        return 0;
}

And it hooks into the generic Linux power management layers as well,
shutting down the device at the right times, yada yada yada.  Therefore,
you don't have to do any work for it, apart from making absolutely sure
that the IR transceiver is turned off at boot time.

Don't forget - power management is not only about the sleep state, it's
about the operational state as well.  You shouldn't ignore the latter,
especially on battery devices.

_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
Please visit the above address for information on this list.

Reply via email to