Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: 200703162139.l2GLdpuH001568@pasqua.pmc-sierra.bc.ca
Cc: Ralf Baechle <ralf@linux-mips.org>,
	Marc St-Jean <stjeanma@pmc-sierra.com>,
	akpm@linux-foundation.org, linux-mips@linux-mips.org,
	i2c@lm-sensors.org
Subject: Re: [PATCH 8/12] drivers: PMC MSP71xx TWI driver]
Date: Sat, 17 Mar 2007 08:52:44 +0100	[thread overview]
Message-ID: <20070317085244.f99aad86.khali@linux-fr.org> (raw)
In-Reply-To: <20070316230333.GA17478@linux-mips.org>

Marc,

> ----- Forwarded message from Marc St-Jean <stjeanma@pmc-sierra.com> -----
> 
> From:	Marc St-Jean <stjeanma@pmc-sierra.com>
> Date:	Fri, 16 Mar 2007 15:39:51 -0600
> To:	akpm@linux-foundation.org
> Cc:	linux-mips@linux-mips.org
> Subject: [PATCH 8/12] drivers: PMC MSP71xx TWI driver
> 
> [PATCH 8/12] drivers: PMC MSP71xx TWI driver
> 
> Patch to add TWI driver for the PMC-Sierra MSP71xx devices.
> 
> Reposting patches as a single set at the request of akpm.
> Only 9 of 12 will be posted at this time, 3 more to follow
> when cleanups are complete.
> 
> CCing linux-mips.org since minor changes have occured
> during cleanup of driver patches for other lists.
> 
> Thanks,
> Marc
> 
> Signed-off-by: Marc St-Jean <Marc_St-Jean@pmc-sierra.com>
> ---
> Re-posting patch with recommended changes:
> -No changes.
> 
>  drivers/i2c/algos/Kconfig           |    9 
>  drivers/i2c/algos/Makefile          |    1 
>  drivers/i2c/algos/i2c-algo-pmctwi.c |  197 ++++++++++++++++
>  drivers/i2c/busses/Kconfig          |    7 
>  drivers/i2c/busses/Makefile         |    1 
>  drivers/i2c/busses/i2c-pmcmsp.c     |  419 ++++++++++++++++++++++++++++++++++++
>  include/linux/i2c-algo-pmctwi.h     |  135 +++++++++++
>  7 files changed, 768 insertions(+), 1 deletion(-)

Why are you making a separate algorithm driver? This should really only
be done when the algorithm is very generic. This is the exception, not
the rule. These days I tend to move algorithm code back into the only
bus driver that uses them (i2c-algo-sibyte done recently, i2c-algo-sgi
is next on my list.)

> 
> diff --git a/drivers/i2c/algos/Kconfig b/drivers/i2c/algos/Kconfig
> index af02034..794f7bb 100644
> --- a/drivers/i2c/algos/Kconfig
> +++ b/drivers/i2c/algos/Kconfig
> @@ -49,5 +49,12 @@ config I2C_ALGO_SGI
>  	  Supports the SGI interfaces like the ones found on SGI Indy VINO
>  	  or SGI O2 MACE.
>  
> -endmenu
> +config I2C_ALGO_PMCTWI
> +	tristate "I2C PMC TWI interfaces"
> +	depends on I2C && PMC_MSP

As a matter of fact, each time an algorithm depends on specific
hardware, you can be reasonably certain that it should NOT be made a
generic algorithm driver.

> +	help
> +	  Implements the PMC TWI SoC algorithm for various implementations.
>  
> +	  Be sure to select the proper bus for your platform below.
> +
> +endmenu

-- 
Jean Delvare

  reply	other threads:[~2007-03-17  7:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-16 23:03 [PATCH 8/12] drivers: PMC MSP71xx TWI driver] Ralf Baechle
2007-03-17  7:52 ` Jean Delvare [this message]
2007-03-19 10:41   ` Ladislav Michl
2007-03-19 13:36     ` Jean Delvare
  -- strict thread matches above, loose matches on Subject: below --
2007-03-21  0:42 Marc St-Jean
2007-03-21 15:34 ` Jean Delvare

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=20070317085244.f99aad86.khali@linux-fr.org \
    --to=khali@linux-fr.org \
    --cc=200703162139.l2GLdpuH001568@pasqua.pmc-sierra.bc.ca \
    --cc=akpm@linux-foundation.org \
    --cc=i2c@lm-sensors.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=stjeanma@pmc-sierra.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