+/*
+ * This sets the IRDA power level on the Assabet.
+ */
+static inline int
+sa1100_irda_set_power_assabet(struct sa1100_irda *si, unsigned int state)
+{
+ static unsigned int bcr_state[4] = {
+ ASSABET_BCR_IRDA_MD0,
+ ASSABET_BCR_IRDA_MD1|ASSABET_BCR_IRDA_MD0,
+ ASSABET_BCR_IRDA_MD1,
+ 0
+ };
+
+ if (state < 4) {
+ state = bcr_state[state];
+ ASSABET_BCR_clear(state ^ (ASSABET_BCR_IRDA_MD1|
+ ASSABET_BCR_IRDA_MD0));
+ ASSABET_BCR_set(state);
+ }
+ return 0;
+}
+
+/*
+ * 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)
+{
+ assign_h3600_egpio( IPAQ_EGPIO_IR_ON, state );
+ return 0;
+}
+
+/*
+ * This turns the IRDA power on or off on the Yopy
+ */
+static inline int
+sa1100_irda_set_power_yopy(struct sa1100_irda *si, unsigned int state)
+{
+ if (state)
+ PPSR &= ~GPIO_IRDA_POWER;
+ else
+ PPSR |= GPIO_IRDA_POWER;
+ return 0;
+}
+