Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sead3-i2c-dev.c
Go to the documentation of this file.
1 /*
2  * This file is subject to the terms and conditions of the GNU General Public
3  * License. See the file "COPYING" in the main directory of this archive
4  * for more details.
5  *
6  * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
7  */
8 #include <linux/init.h>
9 #include <linux/i2c.h>
10 
11 static struct i2c_board_info __initdata sead3_i2c_devices[] = {
12  {
13  I2C_BOARD_INFO("adt7476", 0x2c),
14  .irq = 0,
15  },
16  {
17  I2C_BOARD_INFO("m41t80", 0x68),
18  .irq = 0,
19  },
20 };
21 
22 static int __init sead3_i2c_init(void)
23 {
24  int err;
25 
26  err = i2c_register_board_info(0, sead3_i2c_devices,
27  ARRAY_SIZE(sead3_i2c_devices));
28  if (err < 0)
29  pr_err("sead3-i2c-dev: cannot register board I2C devices\n");
30  return err;
31 }
32 
33 arch_initcall(sead3_i2c_init);