sead3-i2c-dev.c 741 B

123456789101112131415161718192021222324252627282930313233
  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. static struct i2c_board_info __initdata sead3_i2c_devices[] = {
  11. {
  12. I2C_BOARD_INFO("adt7476", 0x2c),
  13. .irq = 0,
  14. },
  15. {
  16. I2C_BOARD_INFO("m41t80", 0x68),
  17. .irq = 0,
  18. },
  19. };
  20. static int __init sead3_i2c_init(void)
  21. {
  22. int err;
  23. err = i2c_register_board_info(0, sead3_i2c_devices,
  24. ARRAY_SIZE(sead3_i2c_devices));
  25. if (err < 0)
  26. pr_err("sead3-i2c-dev: cannot register board I2C devices\n");
  27. return err;
  28. }
  29. arch_initcall(sead3_i2c_init);