Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d61015fa authored by Bryan Wu's avatar Bryan Wu
Browse files

ARM: at91: convert old leds drivers to gpio_led and led_trigger drivers



Build with at91 defconfigs successfully

Signed-off-by: default avatarBryan Wu <bryan.wu@canonical.com>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
parent 8f88731d
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -219,8 +219,6 @@ static struct gpio_led csb_leds[] = {


static void __init csb337_board_init(void)
static void __init csb337_board_init(void)
{
{
	/* Setup the LEDs */
	at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
	/* Serial */
	/* Serial */
	/* DBGU on ttyS0 */
	/* DBGU on ttyS0 */
	at91_register_uart(0, 0, 0);
	at91_register_uart(0, 0, 0);
+15 −3
Original line number Original line Diff line number Diff line
@@ -137,11 +137,20 @@ static struct spi_board_info __initdata ecb_at91spi_devices[] = {
	},
	},
};
};


/*
 * LEDs
 */
static struct gpio_led ecb_leds[] = {
	{	/* D1 */
		.name			= "led1",
		.gpio			= AT91_PIN_PC7,
		.active_low		= 1,
		.default_trigger	= "heartbeat",
	}
};

static void __init ecb_at91board_init(void)
static void __init ecb_at91board_init(void)
{
{
	/* Setup the LEDs */
	at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7);

	/* Serial */
	/* Serial */
	/* DBGU on ttyS0. (Rx & Tx only) */
	/* DBGU on ttyS0. (Rx & Tx only) */
	at91_register_uart(0, 0, 0);
	at91_register_uart(0, 0, 0);
@@ -164,6 +173,9 @@ static void __init ecb_at91board_init(void)


	/* SPI */
	/* SPI */
	at91_add_device_spi(ecb_at91spi_devices, ARRAY_SIZE(ecb_at91spi_devices));
	at91_add_device_spi(ecb_at91spi_devices, ARRAY_SIZE(ecb_at91spi_devices));

	/* LEDs */
	at91_gpio_leds(ecb_leds, ARRAY_SIZE(ecb_leds));
}
}


MACHINE_START(ECBAT91, "emQbit's ECB_AT91")
MACHINE_START(ECBAT91, "emQbit's ECB_AT91")
+20 −2
Original line number Original line Diff line number Diff line
@@ -92,10 +92,26 @@ static struct spi_board_info eco920_spi_devices[] = {
	},
	},
};
};


/*
 * LEDs
 */
static struct gpio_led eco920_leds[] = {
	{       /* D1 */
		.name                   = "led1",
		.gpio                   = AT91_PIN_PB0,
		.active_low             = 1,
		.default_trigger        = "heartbeat",
	},
	{       /* D2 */
		.name                   = "led2",
		.gpio                   = AT91_PIN_PB1,
		.active_low             = 1,
		.default_trigger        = "timer",
	}
};

static void __init eco920_board_init(void)
static void __init eco920_board_init(void)
{
{
	/* Setup the LEDs */
	at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
	/* DBGU on ttyS0. (Rx & Tx only */
	/* DBGU on ttyS0. (Rx & Tx only */
	at91_register_uart(0, 0, 0);
	at91_register_uart(0, 0, 0);
	at91_add_device_serial();
	at91_add_device_serial();
@@ -126,6 +142,8 @@ static void __init eco920_board_init(void)
	);
	);


	at91_add_device_spi(eco920_spi_devices, ARRAY_SIZE(eco920_spi_devices));
	at91_add_device_spi(eco920_spi_devices, ARRAY_SIZE(eco920_spi_devices));
	/* LEDs */
	at91_gpio_leds(eco920_leds, ARRAY_SIZE(eco920_leds));
}
}


MACHINE_START(ECO920, "eco920")
MACHINE_START(ECO920, "eco920")
+14 −3
Original line number Original line Diff line number Diff line
@@ -65,11 +65,20 @@ static struct at91_udc_data __initdata kafa_udc_data = {
	.pullup_pin	= AT91_PIN_PB7,
	.pullup_pin	= AT91_PIN_PB7,
};
};


/*
 * LEDs
 */
static struct gpio_led kafa_leds[] = {
	{	/* D1 */
		.name			= "led1",
		.gpio			= AT91_PIN_PB4,
		.active_low		= 1,
		.default_trigger	= "heartbeat",
	},
};

static void __init kafa_board_init(void)
static void __init kafa_board_init(void)
{
{
	/* Set up the LEDs */
	at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4);

	/* Serial */
	/* Serial */
	/* DBGU on ttyS0. (Rx & Tx only) */
	/* DBGU on ttyS0. (Rx & Tx only) */
	at91_register_uart(0, 0, 0);
	at91_register_uart(0, 0, 0);
@@ -87,6 +96,8 @@ static void __init kafa_board_init(void)
	at91_add_device_i2c(NULL, 0);
	at91_add_device_i2c(NULL, 0);
	/* SPI */
	/* SPI */
	at91_add_device_spi(NULL, 0);
	at91_add_device_spi(NULL, 0);
	/* LEDs */
	at91_gpio_leds(kafa_leds, ARRAY_SIZE(kafa_leds));
}
}


MACHINE_START(KAFA, "Sperry-Sun KAFA")
MACHINE_START(KAFA, "Sperry-Sun KAFA")
+20 −3
Original line number Original line Diff line number Diff line
@@ -95,11 +95,26 @@ static struct atmel_nand_data __initdata kb9202_nand_data = {
	.num_parts	= ARRAY_SIZE(kb9202_nand_partition),
	.num_parts	= ARRAY_SIZE(kb9202_nand_partition),
};
};


/*
 * LEDs
 */
static struct gpio_led kb9202_leds[] = {
	{	/* D1 */
		.name			= "led1",
		.gpio			= AT91_PIN_PC19,
		.active_low		= 1,
		.default_trigger	= "heartbeat",
	},
	{	/* D2 */
		.name			= "led2",
		.gpio			= AT91_PIN_PC18,
		.active_low		= 1,
		.default_trigger	= "timer",
	}
};

static void __init kb9202_board_init(void)
static void __init kb9202_board_init(void)
{
{
	/* Set up the LEDs */
	at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18);

	/* Serial */
	/* Serial */
	/* DBGU on ttyS0. (Rx & Tx only) */
	/* DBGU on ttyS0. (Rx & Tx only) */
	at91_register_uart(0, 0, 0);
	at91_register_uart(0, 0, 0);
@@ -127,6 +142,8 @@ static void __init kb9202_board_init(void)
	at91_add_device_spi(NULL, 0);
	at91_add_device_spi(NULL, 0);
	/* NAND */
	/* NAND */
	at91_add_device_nand(&kb9202_nand_data);
	at91_add_device_nand(&kb9202_nand_data);
	/* LEDs */
	at91_gpio_leds(kb9202_leds, ARRAY_SIZE(kb9202_leds));
}
}


MACHINE_START(KB9200, "KB920x")
MACHINE_START(KB9200, "KB920x")
Loading