Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112353
b: refs/heads/master
c: a745a62
h: refs/heads/master
i:
  112351: febc416
v: v3
  • Loading branch information
David Brownell authored and Russell King committed Sep 18, 2008
1 parent 01896e2 commit 2b211f8
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 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: fbd03a1cbc04833a952b0d603df96e4800445979
refs/heads/master: a745a622434d9c3ff6505125b37fd6828ecadb87
20 changes: 19 additions & 1 deletion trunk/arch/arm/mach-at91/board-sam9260ek.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/spi/spi.h>
#include <linux/spi/at73c213.h>
#include <linux/clk.h>
#include <linux/i2c/at24.h>

#include <mach/hardware.h>
#include <asm/setup.h>
Expand Down Expand Up @@ -222,6 +223,23 @@ static struct gpio_led ek_leds[] = {
}
};

/*
* I2C devices
*/
static struct at24_platform_data at24c512 = {
.byte_len = SZ_512K / 8,
.page_size = 128,
.flags = AT24_FLAG_ADDR16,
};

static struct i2c_board_info __initdata ek_i2c_devices[] = {
{
I2C_BOARD_INFO("24c512", 0x50),
.platform_data = &at24c512,
},
/* more devices can be added using expansion connectors */
};

static void __init ek_board_init(void)
{
/* Serial */
Expand All @@ -239,7 +257,7 @@ static void __init ek_board_init(void)
/* MMC */
at91_add_device_mmc(0, &ek_mmc_data);
/* I2C */
at91_add_device_i2c(NULL, 0);
at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
/* SSC (to AT73C213) */
at73c213_set_clk(&at73c213_data);
at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
Expand Down
21 changes: 20 additions & 1 deletion trunk/arch/arm/mach-at91/board-sam9263ek.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <linux/platform_device.h>
#include <linux/spi/spi.h>
#include <linux/spi/ads7846.h>
#include <linux/i2c/at24.h>
#include <linux/fb.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>
Expand Down Expand Up @@ -202,6 +203,24 @@ static struct atmel_nand_data __initdata ek_nand_data = {
};


/*
* I2C devices
*/
static struct at24_platform_data at24c512 = {
.byte_len = SZ_512K / 8,
.page_size = 128,
.flags = AT24_FLAG_ADDR16,
};


static struct i2c_board_info __initdata ek_i2c_devices[] = {
{
I2C_BOARD_INFO("24c512", 0x50),
.platform_data = &at24c512,
},
/* more devices can be added using expansion connectors */
};

/*
* LCD Controller
*/
Expand Down Expand Up @@ -360,7 +379,7 @@ static void __init ek_board_init(void)
/* NAND */
at91_add_device_nand(&ek_nand_data);
/* I2C */
at91_add_device_i2c(NULL, 0);
at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
/* LCD Controller */
at91_add_device_lcdc(&ek_lcdc_data);
/* Push Buttons */
Expand Down

0 comments on commit 2b211f8

Please sign in to comment.