public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Derek Cheung <derek.cheung@sympatico.ca>
Cc: "'Andrew Morton'" <akpm@osdl.org>,
	greg@kroah.com, Linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kernel 2.6.11.6 -  I2C adaptor for ColdFire 5282 CPU
Date: Tue, 05 Apr 2005 20:10:27 -0700	[thread overview]
Message-ID: <42535323.8040403@osdl.org> (raw)
In-Reply-To: <003901c53a51$0093b7d0$1501a8c0@Mainframe>

Derek Cheung wrote:
> 
>> Below please find the patch file I "diff" against Linux 2.6.11.6. It
>> contains the I2C adaptor for ColdFire 5282 CPU. Since most ColdFire
> 
> CPU
> 
>> shares the same I2C register set, the code can be easily adopted for
>> other ColdFire CPUs for I2C operations.
>>
>> I have tested the code on a ColdFire 5282Lite CPU board
>> (http://www.axman.com/Pages/cml-5282LITE.html) running uClinux 2.6.9
>> with LM75 and DS1621 temperature sensor chips. As advised by David
>> McCullough, the code will be incorporated in the next uClinux
> release.
> 
>> The patch contains:
>>
>> linux/drivers/i2c/busses
>>  		i2c-mcf5282.c (new file)
>>  		i2c-mcf5282.h (new file)
>>  		Kconfig (modified)
>>  		Makefile (modified)

It also includes Kconfig.orig & Makefile.orig &
m528xsim.h.orig .
You should use
   diff -X dontdiff
where dontdiff is a filename to exclude the listed files,
where dontdiff includes *.orig .
There is a fairly up-to-date dontdiff file available at
http://developer.osdl.org/rddunlap/doc/dontdiff-osdl

A diffstat summary would (hereby requested in the future)
would let us see which files are modified and how much
they are modified:

  drivers/i2c/busses/Kconfig            |   10
  drivers/i2c/busses/Kconfig.orig       |  489 
++++++++++++++++++++++++++++++++++
  drivers/i2c/busses/Makefile           |    2
  drivers/i2c/busses/Makefile.orig      |   46 +++
  drivers/i2c/busses/i2c-mcf5282.c      |  407 
++++++++++++++++++++++++++++
  drivers/i2c/busses/i2c-mcf5282.h      |   45 +++
  include/asm-m68knommu/m528xsim.h      |  112 +++++++
  include/asm-m68knommu/m528xsim.h.orig |   45 +++
  8 files changed, 1156 insertions(+)


>>  
>> linux/include/asm-m68knommu
>>  		m528xsim.h (modified)
>>
>> Please let me know if you have any questions.
> 
> 
> The patch was very wordwrapped by your email client.  Please fix that up
> (first email the patch to yourself and test that the result still
> applies OK) or
> resend as an email attachment.

linux_dev/include/asm-m68knommu/m528xsim.h:

some spaces in this expression (& elsewhere) would make it
easier to read:
+#define MCF5282_I2C_I2ADR_ADDR(x) 
(((x)&0x7F)<<0x01)

Oh, it's not even used.... don't need it then.
And this one is not used:
+#define MCF5282_I2C_I2FDR_IC(x)                         (((x)&0x3F))

Lots of the bit-level definitions aren't used and usually aren't
added unless used.

Comment (7) doesn't match name (hm, and it's not used):
+/* Interrupt Control Register 7 */
+#define MCF5282_INTC0_ICR17     (volatile u8 *) (MCF_IPSBAR + 0x0C51)

These are not used -- but if they were, we generally like to
have macro expressions wrapped in parentheses:
+#define MCF5282_QSPI_QMR        MCF_IPSBAR + 0x0340
+#define MCF5282_QSPI_QDLYR      MCF_IPSBAR + 0x0344
+#define MCF5282_QSPI_QWR        MCF_IPSBAR + 0x0348
+#define MCF5282_QSPI_QIR        MCF_IPSBAR + 0x034C
+#define MCF5282_QSPI_QAR        MCF_IPSBAR + 0x0350
+#define MCF5282_QSPI_QDR        MCF_IPSBAR + 0x0354
+#define MCF5282_QSPI_QCR        MCF_IPSBAR + 0x0354

i2c-mcf5282.h:

Please limit line lengths to 80 characters in source files:  e.g.:
+static int mcf5282_i2c_start(const char read_write, const u16 
target_address, const enum I2C_START_TYPE i2c_start);

What is this one for?
+void dumpReg(char *, u16 addr, u8 data);


I'm looking over the primary .c file separately now.

-- 
~Randy

  reply	other threads:[~2005-04-06  3:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20050405044836.GA17336@kroah.com>
2005-04-06  2:18 ` [PATCH] kernel 2.6.11.6 - I2C adaptor for ColdFire 5282 CPU Derek Cheung
2005-04-06  2:21   ` Andrew Morton
2005-04-06  2:33     ` Derek Cheung
2005-04-06  3:10       ` Randy.Dunlap [this message]
2005-04-07 22:37         ` Matt Mackall
2005-04-07 22:42           ` [PATCH] Add dontdiff file Randy.Dunlap
2005-04-06  3:43       ` [PATCH] kernel 2.6.11.6 - I2C adaptor for ColdFire 5282 CPU Randy.Dunlap
2005-04-06 14:25         ` Greg KH
2005-04-10 16:47         ` Derek Cheung
2005-04-10 23:54           ` Andrew Morton
2005-04-11  3:32           ` Randy.Dunlap
2005-04-11 20:03           ` Greg KH
2005-04-14  1:12             ` Derek Cheung
2005-04-17 22:03               ` Greg KH
2005-04-18 21:10               ` Jean Delvare
2005-04-06  3:27   ` Greg KH

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=42535323.8040403@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=Linux-kernel@vger.kernel.org \
    --cc=akpm@osdl.org \
    --cc=derek.cheung@sympatico.ca \
    --cc=greg@kroah.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