[PATCH 1/3] i2c: mediatek: add basic driver support
Heiko Schocher
hs at denx.de
Wed Sep 30 07:38:41 CEST 2020
Hello mingming,
Am 09.09.2020 um 08:07 schrieb mingming lee:
> From: Mingming Lee <Mingming.Lee at mediatek.com>
>
> Add MediaTek I2C basic driver
>
> Signed-off-by: Mingming Lee <Mingming.Lee at mediatek.com>
> ---
> drivers/i2c/Kconfig | 9 +
> drivers/i2c/Makefile | 1 +
> drivers/i2c/mt_i2c.c | 619 +++++++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 629 insertions(+)
> create mode 100644 drivers/i2c/mt_i2c.c
Nitpicks only:
As you introduce here new DTS bindings, can you please document them
in u-boot:/doc/device-tree-bindings/
Thanks!
[snip]
> diff --git a/drivers/i2c/mt_i2c.c b/drivers/i2c/mt_i2c.c
> new file mode 100644
> index 0000000..5badde9
> --- /dev/null
> +++ b/drivers/i2c/mt_i2c.c
> @@ -0,0 +1,619 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * MediaTek I2C Interface driver
> + *
> + * Copyright (C) 2020 MediaTek Inc.
> + * Author: Mingming Lee <Mingming.Lee at mediatek.com>
> + */
> +
> +#include <asm/cache.h>
> +#include <asm/io.h>
> +#include <common.h>
> +#include <clk.h>
> +#include <dm.h>
> +#include <i2c.h>
> +#include <linux/delay.h>
> +
> +#define I2C_OK 0
> +#define EINVAL_I2C 22 /* invalid argument */
> +#define ETIMEDOUT_I2C 110 /* connection timed out */
> +#define EACK_I2C 6 /* remote I/O error */
You could use defines from include/linux/errno.h ?
[snip]
Reviewed-by: Heiko Schocher <hs at denx.de>
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