Commit 287d4d51 authored by Dmitry Eremin-Solenikov's avatar Dmitry Eremin-Solenikov Committed by Russell King

ARM: 7936/1: sa1100: collie: add support for IrDA transceiver

Collie has onboard IrDA transceiver controlled via active-low gpio. Add
corresponding platform data.
Signed-off-by: default avatarDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 75916d55
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/flash.h> #include <asm/mach/flash.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/irda.h>
#include <asm/hardware/scoop.h> #include <asm/hardware/scoop.h>
#include <asm/mach/sharpsl_param.h> #include <asm/mach/sharpsl_param.h>
...@@ -96,6 +97,37 @@ static struct mcp_plat_data collie_mcp_data = { ...@@ -96,6 +97,37 @@ static struct mcp_plat_data collie_mcp_data = {
.codec_pdata = &collie_ucb1x00_data, .codec_pdata = &collie_ucb1x00_data,
}; };
static int collie_ir_startup(struct device *dev)
{
int rc = gpio_request(COLLIE_GPIO_IR_ON, "IrDA");
if (rc)
return rc;
rc = gpio_direction_output(COLLIE_GPIO_IR_ON, 1);
if (!rc)
return 0;
gpio_free(COLLIE_GPIO_IR_ON);
return rc;
}
static void collie_ir_shutdown(struct device *dev)
{
gpio_free(COLLIE_GPIO_IR_ON);
}
static int collie_ir_set_power(struct device *dev, unsigned int state)
{
gpio_set_value(COLLIE_GPIO_IR_ON, !state);
return 0;
}
static struct irda_platform_data collie_ir_data = {
.startup = collie_ir_startup,
.shutdown = collie_ir_shutdown,
.set_power = collie_ir_set_power,
};
/* /*
* Collie AC IN * Collie AC IN
*/ */
...@@ -400,6 +432,7 @@ static void __init collie_init(void) ...@@ -400,6 +432,7 @@ static void __init collie_init(void)
sa11x0_register_mtd(&collie_flash_data, collie_flash_resources, sa11x0_register_mtd(&collie_flash_data, collie_flash_resources,
ARRAY_SIZE(collie_flash_resources)); ARRAY_SIZE(collie_flash_resources));
sa11x0_register_mcp(&collie_mcp_data); sa11x0_register_mcp(&collie_mcp_data);
sa11x0_register_irda(&collie_ir_data);
sharpsl_save_param(); sharpsl_save_param();
} }
......
...@@ -78,7 +78,7 @@ extern void locomolcd_power(int on); ...@@ -78,7 +78,7 @@ extern void locomolcd_power(int on);
#define COLLIE_TC35143_GPIO_VERSION0 UCB_IO_0 #define COLLIE_TC35143_GPIO_VERSION0 UCB_IO_0
#define COLLIE_TC35143_GPIO_TBL_CHK UCB_IO_1 #define COLLIE_TC35143_GPIO_TBL_CHK UCB_IO_1
#define COLLIE_TC35143_GPIO_VPEN_ON UCB_IO_2 #define COLLIE_TC35143_GPIO_VPEN_ON UCB_IO_2
#define COLLIE_TC35143_GPIO_IR_ON UCB_IO_3 #define COLLIE_GPIO_IR_ON (COLLIE_TC35143_GPIO_BASE + 3)
#define COLLIE_TC35143_GPIO_AMP_ON UCB_IO_4 #define COLLIE_TC35143_GPIO_AMP_ON UCB_IO_4
#define COLLIE_TC35143_GPIO_VERSION1 UCB_IO_5 #define COLLIE_TC35143_GPIO_VERSION1 UCB_IO_5
#define COLLIE_TC35143_GPIO_FS8KLPF UCB_IO_5 #define COLLIE_TC35143_GPIO_FS8KLPF UCB_IO_5
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment