]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/i2c/adi_i2c.c
ARM: uniphier: disable CONFIG_ARCH_FIXUP_FDT_MEMORY
[people/ms/u-boot.git] / drivers / i2c / adi_i2c.c
index 20495b1d7f8c86f28e84ba12255f6024c02f971c..d340639e1a00830104ef002b074430340c23a11f 100644 (file)
@@ -4,9 +4,13 @@
  * Copyright (c) 2006-2014 Analog Devices Inc.
  *
  * Licensed under the GPL-2 or later.
+ *
+ * NOTE: This driver should be converted to driver model before June 2017.
+ * Please see doc/driver-model/i2c-howto.txt for instructions.
  */
 
 #include <common.h>
+#include <console.h>
 #include <i2c.h>
 
 #include <asm/clock.h>
@@ -63,7 +67,7 @@ struct twi_regs {
 #endif
 
 /* All transfers are described by this data structure */
-struct i2c_msg {
+struct adi_i2c_msg {
        u8 flags;
 #define I2C_M_COMBO            0x4
 #define I2C_M_STOP             0x2
@@ -81,7 +85,7 @@ struct i2c_msg {
  * wait_for_completion - manage the actual i2c transfer
  *     @msg: the i2c msg
  */
-static int wait_for_completion(struct twi_regs *twi, struct i2c_msg *msg)
+static int wait_for_completion(struct twi_regs *twi, struct adi_i2c_msg *msg)
 {
        u16 int_stat, ctl;
        ulong timebase = get_timer(0);
@@ -151,7 +155,7 @@ static int i2c_transfer(struct i2c_adapter *adap, uint8_t chip, uint addr,
                (addr >>  8),
                (addr >> 16),
        };
-       struct i2c_msg msg = {
+       struct adi_i2c_msg msg = {
                .flags = flags | (len >= 0xff ? I2C_M_STOP : 0),
                .buf   = buffer,
                .len   = len,