Re: [PATCH take2] [POWERPC] i2c: adds support for i2c bus on 8xx

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jochen Friedrich <jochen@...>
Cc: linuxppc-embedded@ozlabs.org <linuxppc-embedded@...>, <linux-kernel@...>, <i2c@...>, Carsten Juttner <carjay@...>
Date: Monday, October 15, 2007 - 2:31 pm

On Mon, Oct 15, 2007 at 01:10:12PM +0200, Jochen Friedrich wrote:

Do we really need to be adding features for arch/ppc at this point?  It'll
be going away in June.  arch/ppc-specific things outside of arch/ppc itself
will also be more likely to be missed in the removal.

Also, please post inline rather than as an attachment; attachments are
harder to quote in a reply.


No device_type.


Should be fsl,cpm-i2c.  Is cpm2 i2c the same?  If not, it should be
fsl,cpm1-i2c.  It's probably best to specify it anyway, along with
fsl,mpc885-i2c.


Please add this to mpc885ads_pins, rather than poking the registers
directly.  The relevant lines are:

	{CPM_PORTB, 26, CPM_PIN_OUTPUT},
	{CPM_PORTB, 27, CPM_PIN_OUTPUT},


Why not just make an of_platform device instead of this glue code?


What if I'm just borrowing it? :-)


Should only return IRQ_HANDLED if the event register was non-zero.


Can you fold the if statement into a macro?  Or just do a raw dev_dbg with
no test, like most drivers do.


This appears to be done twice, here and in cpm_reset_iic_params.


Should use fsl,cpm-command rather than hardcoded constants.


It's a 7-bit address...  and are you sure that 0x7e is unique?  Does this
driver even support slave operation?


Why is this hardcoded?


cpm-i2c, not 8xx.


Please put a newline between the if test and the if body.


Why only if there's no microcode relocation?


s/lenth/length/


s/EREMOTEIO/EIO/


s/EREMOTEIO/EINVAL/


On every transfer?


s/-EREMOTEIO/ret/


It's not really Open Firmware... just a flat device tree.


So let's change the title at the top of the file...


Why are you including platform_device, and running glue code in fsl_soc.c,
if this is an of_platform driver?


It's not on the platform bus; it's on the soc of_platform bus.  Why is this
embedded in the i2c_adapter struct anyway?  i2c_adapter should hold a
pointer to whatever the probe function gives you.


Use of_iomap.


Please use the new muram_dpalloc name.


Why is an 8xx driver matching all i2c cpm (i.e. what about cpm2)?

-Scot
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH take2] [POWERPC] i2c: adds support for i2c bus on 8xx, Jochen Friedrich, (Mon Oct 15, 7:10 am)
Re: [PATCH take2] [POWERPC] i2c: adds support for i2c bus on..., Scott Wood, (Mon Oct 15, 2:31 pm)
Re: [i2c] [PATCH take2] [POWERPC] i2c: adds support for i2c ..., Jochen Friedrich, (Tue Oct 23, 11:47 am)