Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172627
b: refs/heads/master
c: 9c196f0
h: refs/heads/master
i:
  172625: 4884c9c
  172623: 53c1004
v: v3
  • Loading branch information
Russell King committed Dec 6, 2009
1 parent 15a94b5 commit d647473
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0831e3e4cf8abcbb772c0cb1eb4406ffcdb974df
refs/heads/master: 9c196f0f8db928ef9a2a935d86d75a218a7131b1
11 changes: 8 additions & 3 deletions trunk/arch/arm/mach-sa1100/h3600.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,23 +347,28 @@ static void __init h3100_map_io(void)
*/
static int h3100_irda_set_power(struct device *dev, unsigned int state)
{
assign_h3100_egpio(IPAQ_EGPIO_IR_ON, state);

gpio_set_value(H3100_GPIO_IR_ON, state);
return 0;
}

static void h3100_irda_set_speed(struct device *dev, unsigned int speed)
{
assign_h3100_egpio(IPAQ_EGPIO_IR_FSEL, !(speed < 4000000));
gpio_set_value(H3100_GPIO_IR_FSEL, !(speed < 4000000));
}

static struct irda_platform_data h3100_irda_data = {
.set_power = h3100_irda_set_power,
.set_speed = h3100_irda_set_speed,
};

static struct gpio_default_state h3100_default_gpio[] = {
{ H3100_GPIO_IR_ON, GPIO_MODE_OUT0, "IrDA power" },
{ H3100_GPIO_IR_FSEL, GPIO_MODE_OUT0, "IrDA fsel" },
};

static void h3100_mach_init(void)
{
h3xxx_init_gpio(h3100_default_gpio, ARRAY_SIZE(h3100_default_gpio));
h3xxx_mach_init();
sa11x0_register_irda(&h3100_irda_data);
}
Expand Down
9 changes: 9 additions & 0 deletions trunk/arch/arm/mach-sa1100/include/mach/h3600_gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@
#define GPIO_H3100_IR_ON GPIO_GPIO (8)
#define GPIO_H3100_IR_FSEL GPIO_GPIO (9)

/* gpiolib versions of the above */
#define H3100_GPIO_BT_ON 2
#define H3100_GPIO_QMUTE 4
#define H3100_GPIO_LCD_3V_ON 5
#define H3100_GPIO_AUD_ON 6
#define H3100_GPIO_AUD_PWR_ON 7
#define H3100_GPIO_IR_ON 8
#define H3100_GPIO_IR_FSEL 9

/* for H3600, audio sample rate clock generator */
#define GPIO_H3600_CLK_SET0 GPIO_GPIO (12)
#define GPIO_H3600_CLK_SET1 GPIO_GPIO (13)
Expand Down

0 comments on commit d647473

Please sign in to comment.