[U-Boot] [PATCH] i2c: Add support for the Arm's Versatile Express I2C controller.
Heiko Schocher
hs at denx.de
Tue Sep 25 04:35:31 UTC 2018
Hello Liviu,
Am 18.09.2018 um 06:21 schrieb Heiko Schocher:
> Hello Liviu,
>
> Am 17.09.2018 um 18:51 schrieb Liviu Dudau:
>> The Arm Versatile Express I2C controller is a simple register-based
>> controller that uses a register to control the state of the SCL and
>> SDA lines. Add support for it.
>>
>> Signed-off-by: Liviu Dudau <liviu.dudau at foss.arm.com>
>> ---
>> drivers/i2c/Kconfig | 7 +
>> drivers/i2c/Makefile | 1 +
>> drivers/i2c/i2c-versatile.c | 270 ++++++++++++++++++++++++++++++++++++
>> 3 files changed, 278 insertions(+)
>> create mode 100644 drivers/i2c/i2c-versatile.c
>
> Reviewed-by: Heiko Schocher <hs at denx.de>
>
> I am unsure here, if all your patches are a patchserie, or if this
> i2c patch can go seperately through i2c tree ...
I got some checkpatch errors:
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#64:
new file mode 100644
WARNING: Missing a blank line after declarations
#105: FILE: drivers/i2c/i2c-versatile.c:37:
+ int v = !!(readl(priv->base + I2C_CONTROL_REG) & SDA);
+ udelay(priv->delay);
WARNING: Missing a blank line after declarations
#118: FILE: drivers/i2c/i2c-versatile.c:50:
+ int v = !!(readl(priv->base + I2C_CONTROL_REG) & SCL);
+ udelay(priv->delay);
WARNING: line over 80 characters
#187: FILE: drivers/i2c/i2c-versatile.c:119:
+static int versatile_i2c_read_byte(struct versatile_i2c_priv *priv, u8 *byte, u8 ack)
WARNING: Missing a blank line after declarations
#260: FILE: drivers/i2c/i2c-versatile.c:192:
+ u8 ack = (msg->len - i - 1) == 0 ? 1 : 0;
+ ret = versatile_i2c_read_byte(priv, &msg->buf[i], ack);
WARNING: line over 80 characters
#274: FILE: drivers/i2c/i2c-versatile.c:206:
+static int versatile_i2c_xfer(struct udevice *bus, struct i2c_msg *msg, int nmsgs)
WARNING: line over 80 characters
#288: FILE: drivers/i2c/i2c-versatile.c:220:
+static int versatile_i2c_chip_probe(struct udevice *bus, uint chip, uint chip_flags)
WARNING: line over 80 characters
#291: FILE: drivers/i2c/i2c-versatile.c:223:
+ struct i2c_msg msg = { .addr = chip, .flags = chip_flags, .len = 0, .buf = NULL };
WARNING: line over 80 characters
#314: FILE: drivers/i2c/i2c-versatile.c:246:
+ /* U-Boot still doesn't assign automatically sequence numbers to devices */
Please fix them, also "git am" says:
Applying: i2c: Add support for the Arm's Versatile Express I2C controller.
error: new file drivers/i2c/i2c-versatile.c depends on old contents
error: could not build fake ancestor
Could you please rebase your patch on current mainline U-Boot ?
Thanks!
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
More information about the U-Boot
mailing list