diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-07-03 06:24:35 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2008-07-03 11:51:26 -0400 |
commit | d10d8a5f79e3e33db1a9f177c54187e2312598f2 (patch) | |
tree | 169c87061bf5ba7c8cb5aae1eef37f9f61391bcb /arch/arm/mach-s3c2412 | |
parent | fd2de272b23bbb866294ff72f55d3731fe6a4c92 (diff) |
[ARM] JIVE: Add i2c device info for LIS302DL sensor
Add i2c bus definition for the LIS302DL sensor driver
which is connected on the i2c bus.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s3c2412')
-rw-r--r-- | arch/arm/mach-s3c2412/mach-jive.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c index 2e6350d68779..7f5d0025060d 100644 --- a/arch/arm/mach-s3c2412/mach-jive.c +++ b/arch/arm/mach-s3c2412/mach-jive.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/serial_core.h> | 21 | #include <linux/serial_core.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/i2c.h> | ||
23 | 24 | ||
24 | #include <video/ili9320.h> | 25 | #include <video/ili9320.h> |
25 | 26 | ||
@@ -34,6 +35,7 @@ | |||
34 | 35 | ||
35 | #include <asm/plat-s3c/regs-serial.h> | 36 | #include <asm/plat-s3c/regs-serial.h> |
36 | #include <asm/plat-s3c/nand.h> | 37 | #include <asm/plat-s3c/nand.h> |
38 | #include <asm/plat-s3c/iic.h> | ||
37 | 39 | ||
38 | #include <asm/arch/regs-power.h> | 40 | #include <asm/arch/regs-power.h> |
39 | #include <asm/arch/regs-gpio.h> | 41 | #include <asm/arch/regs-gpio.h> |
@@ -396,7 +398,7 @@ static void jive_lcd_spi_chipselect(struct s3c2410_spigpio_info *spi, int cs) | |||
396 | } | 398 | } |
397 | 399 | ||
398 | static struct s3c2410_spigpio_info jive_lcd_spi = { | 400 | static struct s3c2410_spigpio_info jive_lcd_spi = { |
399 | .bus_num = 1, | 401 | .bus_num = 0, |
400 | .pin_clk = S3C2410_GPG8, | 402 | .pin_clk = S3C2410_GPG8, |
401 | .pin_mosi = S3C2410_GPB8, | 403 | .pin_mosi = S3C2410_GPB8, |
402 | .chip_select = jive_lcd_spi_chipselect, | 404 | .chip_select = jive_lcd_spi_chipselect, |
@@ -449,6 +451,24 @@ static struct spi_board_info __initdata jive_spi_devs[] = { | |||
449 | }, | 451 | }, |
450 | }; | 452 | }; |
451 | 453 | ||
454 | /* I2C bus and device configuration. */ | ||
455 | |||
456 | static struct s3c2410_platform_i2c jive_i2c_cfg = { | ||
457 | .max_freq = 80 * 1000, | ||
458 | .bus_freq = 50 * 1000, | ||
459 | .flags = S3C_IICFLG_FILTER, | ||
460 | .sda_delay = 2, | ||
461 | }; | ||
462 | |||
463 | static struct i2c_board_info jive_i2c_devs[] = { | ||
464 | [0] = { | ||
465 | I2C_BOARD_INFO("lis302dl", 0x1c), | ||
466 | .irq = IRQ_EINT14, | ||
467 | }, | ||
468 | }; | ||
469 | |||
470 | /* The platform devices being used. */ | ||
471 | |||
452 | static struct platform_device *jive_devices[] __initdata = { | 472 | static struct platform_device *jive_devices[] __initdata = { |
453 | &s3c_device_usb, | 473 | &s3c_device_usb, |
454 | &s3c_device_rtc, | 474 | &s3c_device_rtc, |
@@ -638,6 +658,9 @@ static void __init jive_machine_init(void) | |||
638 | 658 | ||
639 | spi_register_board_info(jive_spi_devs, ARRAY_SIZE(jive_spi_devs)); | 659 | spi_register_board_info(jive_spi_devs, ARRAY_SIZE(jive_spi_devs)); |
640 | 660 | ||
661 | s3c_device_i2c.dev.platform_data = &jive_i2c_cfg; | ||
662 | i2c_register_board_info(0, jive_i2c_devs, ARRAY_SIZE(jive_i2c_devs)); | ||
663 | |||
641 | platform_add_devices(jive_devices, ARRAY_SIZE(jive_devices)); | 664 | platform_add_devices(jive_devices, ARRAY_SIZE(jive_devices)); |
642 | } | 665 | } |
643 | 666 | ||