All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mingming Lee <mingming.lee@mediatek.com>
To: u-boot@lists.denx.de
Subject: [PATCH 1/3] i2c: mediatek: add basic driver support
Date: Wed, 30 Sep 2020 14:15:47 +0800	[thread overview]
Message-ID: <1601446547.9215.3.camel@mhfsdcap03> (raw)
In-Reply-To: <22a371ad-76d6-ff6d-ded3-2eeea84bb5ab@denx.de>

On Wed, 2020-09-30 at 07:38 +0200, Heiko Schocher wrote:
> Hello mingming,
> 
> Am 09.09.2020 um 08:07 schrieb mingming lee:
> > From: Mingming Lee <Mingming.Lee@mediatek.com>
> > 
> > Add MediaTek I2C basic driver
> > 
> > Signed-off-by: Mingming Lee <Mingming.Lee@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/
> 
----->thank you for for advice, I would add the new DTS bingding in next
version.

> 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@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 ?
> 
------->I think it is better to use the define from
include/linux/errno.h, and I would modify it in next version today.

> [snip]
> 
> 
> Reviewed-by: Heiko Schocher <hs@denx.de>
> 
> Thanks!
> 
> bye,
> Heiko

  reply	other threads:[~2020-09-30  6:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09  6:07 [PATCH 0/3] Add i2c support for MediaTek mt8512 mingming lee
2020-09-09  6:07 ` [PATCH 1/3] i2c: mediatek: add basic driver support mingming lee
2020-09-30  5:38   ` Heiko Schocher
2020-09-30  6:15     ` Mingming Lee [this message]
2020-09-09  6:07 ` [PATCH 2/3] ARM: dts: Mediatek: add i2c node support for mt8512 mingming lee
2020-09-30  5:40   ` Heiko Schocher
2020-09-09  6:07 ` [PATCH 3/3] configs: mt8512: Enable I2C related configs mingming lee
2020-09-30  5:41   ` Heiko Schocher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1601446547.9215.3.camel@mhfsdcap03 \
    --to=mingming.lee@mediatek.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.