diff options
author | Ben Nizette <bn@niasdigital.com> | 2008-02-06 23:28:57 -0500 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-04-19 20:40:06 -0400 |
commit | 040b28fc0a69281a46adcebd6b31dd74da4a8d49 (patch) | |
tree | 9ce41af956c245292765f7ea5ece3ac7e9230b9b /arch/avr32 | |
parent | e573ebb0326f2f4a29ee2bd143bfc88ab0332926 (diff) |
avr32: pass i2c board info through at32_add_device_twi
New-style I2C drivers require that motherboard-mounted I2C devices are
registered with the I2C core, typically at arch_initcall time. This
can be done nice and neat by passing the struct i2c_board_info[]
through at32_add_device_twi just like we do for the SPI board info.
While we've got the hood up, remove a duplicate declaration of
at32_add_device_twi() in board.h.
[hskinnemoen@atmel.com: add missing i2c_board_info forward-declaration]
Signed-Off-By: Ben Nizette <bn@niasdigital.com>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'arch/avr32')
-rw-r--r-- | arch/avr32/mach-at32ap/at32ap700x.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index cb47afc9fffc..6302bfd58514 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c | |||
@@ -990,7 +990,9 @@ static struct clk atmel_twi0_pclk = { | |||
990 | .index = 2, | 990 | .index = 2, |
991 | }; | 991 | }; |
992 | 992 | ||
993 | struct platform_device *__init at32_add_device_twi(unsigned int id) | 993 | struct platform_device *__init at32_add_device_twi(unsigned int id, |
994 | struct i2c_board_info *b, | ||
995 | unsigned int n) | ||
994 | { | 996 | { |
995 | struct platform_device *pdev; | 997 | struct platform_device *pdev; |
996 | 998 | ||
@@ -1010,6 +1012,9 @@ struct platform_device *__init at32_add_device_twi(unsigned int id) | |||
1010 | 1012 | ||
1011 | atmel_twi0_pclk.dev = &pdev->dev; | 1013 | atmel_twi0_pclk.dev = &pdev->dev; |
1012 | 1014 | ||
1015 | if (b) | ||
1016 | i2c_register_board_info(id, b, n); | ||
1017 | |||
1013 | platform_device_add(pdev); | 1018 | platform_device_add(pdev); |
1014 | return pdev; | 1019 | return pdev; |
1015 | 1020 | ||