mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2] i2c: add Marvell 64xxx driver
Date: Thu, 17 Jul 2014 15:59:16 +0400	[thread overview]
Message-ID: <20140717155916.64f4883aa00804098683c222@gmail.com> (raw)
In-Reply-To: <53C79869.4010000@gmail.com>

On Thu, 17 Jul 2014 11:33:29 +0200
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> wrote:

> On 07/16/2014 11:25 PM, Antony Pavlov wrote:
> > This driver is also used for Allwinner SoCs I2C controllers.
> >
> > Ported from linux-3.15.
> >
> > The most notable barebox driver version changes:
> >
> >    * drop message offloading support;
> >    * add reg-io-width parameter to use driver with byte-oriented
> >      controller versions.
> >
> > Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> > ---
> [...]
> > diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
> > new file mode 100644
> > index 0000000..324796a
> > --- /dev/null
> > +++ b/drivers/i2c/busses/i2c-mv64xxx.c
> > @@ -0,0 +1,687 @@
> > +/*
> > + * Driver for the i2c controller on the Marvell line of host bridges
> > + * (e.g, gt642[46]0, mv643[46]0, mv644[46]0, and Orion SoC family).
> > + *
> > + * This code was ported from linux-3.15 kernel by Antony Pavlov.
> > + *
> > + * Author: Mark A. Greer <mgreer@mvista.com>
> > + *
> > + * 2005 (c) MontaVista, Software, Inc.  This file is licensed under
> > + * the terms of the GNU General Public License version 2.  This program
> > + * is licensed "as is" without any warranty of any kind, whether express
> > + * or implied.
> > + */
> > +#include <common.h>
> > +#include <driver.h>
> > +#include <init.h>
> > +#include <of.h>
> > +#include <malloc.h>
> > +#include <types.h>
> > +#include <xfuncs.h>
> > +#include <clock.h>
> > +#include <linux/clk.h>
> > +#include <linux/err.h>
> > +
> > +#include <io.h>
> > +#include <i2c/i2c.h>
> > +#include <printk.h>
> > +
> > +#define MV64XXX_I2C_ADDR_ADDR(val)			((val & 0x7f) << 1)
> > +#define MV64XXX_I2C_BAUD_DIV_N(val)			(val & 0x7)
> > +#define MV64XXX_I2C_BAUD_DIV_M(val)			((val & 0xf) << 3)
> > +
> > +#define	MV64XXX_I2C_REG_CONTROL_ACK			0x00000004
> > +#define	MV64XXX_I2C_REG_CONTROL_IFLG			0x00000008
> > +#define	MV64XXX_I2C_REG_CONTROL_STOP			0x00000010
> > +#define	MV64XXX_I2C_REG_CONTROL_START			0x00000020
> > +#define	MV64XXX_I2C_REG_CONTROL_TWSIEN			0x00000040
> > +#define	MV64XXX_I2C_REG_CONTROL_INTEN			0x00000080
> 
> Antony,
> 
> I'll have a look at the driver itself later, but your patch is full
> of superfluous tabs like above between '#define' and 'MV64XXX_foo'.

I have kept original linux driver formatting.

Please see it with any interactive two panels diff tool (e.g. vimdiff):

   vimdiff barebox.git/drivers/i2c/busses/i2c-mv64xxx.c linux.git/drivers/i2c/busses/i2c-mv64xxx.c

> 
> Isn't checkpatch.pl complaining about it?

On the one hand I need to change all writel/readl to mv64xxx_write/mv64xxx_read, so
some lines become 'over 80 characters'.

But on the other hand I'm trying to keep formatting compatibility with original linux driver;
I decided to keep original formatting even if lines become 'over 80 characters'.

Moreover Sascha said that there is no problem with 'line over 80 characters' warnings :)
see http://lists.infradead.org/pipermail/barebox/2014-June/019484.html


> Anyway, no need to resend before I have tested the driver itself.

 Great! The driver needs addition tests.

-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2014-07-17 11:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16 21:25 Antony Pavlov
2014-07-16 21:25 ` Antony Pavlov
2014-07-17  9:33   ` Sebastian Hesselbarth
2014-07-17 11:59     ` Antony Pavlov [this message]
2014-07-22  8:51   ` Sebastian Hesselbarth
2014-07-22  9:57     ` Antony Pavlov
2014-07-22 11:05       ` Sebastian Hesselbarth
2014-07-22 11:58         ` Antony Pavlov
2014-07-22 16:21     ` Antony Pavlov
2014-07-22 16:53       ` Sebastian Hesselbarth

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=20140717155916.64f4883aa00804098683c222@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=sebastian.hesselbarth@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox