public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Samuel Ortiz <sameo@linux.intel.com>
To: "Andrey A. Porodko" <andrey.porodko@gmail.com>
Cc: "A. Porodko" <panda@chelcom.ru>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	David Brownell <dbrownell@users.sourceforge.net>,
	Balaji Rao <balajirrao@openmoko.org>,
	Linus Walleij <linus.walleij@stericsson.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Patch for MSP430 support on Neuros OSD2 board
Date: Mon, 30 Nov 2009 11:35:57 +0100	[thread overview]
Message-ID: <20091130103556.GB3696@sortiz.org> (raw)
In-Reply-To: <4B13682D.4030202@gmail.com>

On Mon, Nov 30, 2009 at 11:37:33AM +0500, Andrey A. Porodko wrote:
> Hi Samuel,
> 
> The reason I used "ifdef" instead of refactoring code is that I don't
> have dm355 board to check nor I'm familiar with this hardware and I was
> afraid to screw up what's already done for dm355.
> Initially I created a completely separate driver (although based on
> dm355) for Neuros, but kernel people told me to combine code with existent.
Yes, keeping one driver for those 2 boards is the only way.


> - Is it possible to find someone with dm355 hardware to check if didn't
> screw up it?
Please cc all relevant people to your refactored code (Vipin Bhandari, Kevin
Hilman, David Brownell, see git log drivers/mfd/dm355evm_msp.c) and ask them
for review/test on their HW.
The code as it is really needs some refactoring for being more generic and not
so board specific, so it's not like you'd be doing intrusive useless cleanups.


> - I don't quite understand how to evaluate impact on config_* files, do
> you mean I need to check standard kernel configuration files bundled
> with kernel and make necessary adjustments there?
That's correct, that and the Kconfig dependencies. For example INPUT_DM355EVM
and RTC_DRV_DM355EVM depend on MFD_DM355EVM_MSP at the moment.
Also, if you're changing the driver's exported API, you should also fix all
its current users. In this case, that would mean fixing rtc-dm355evm.c and
dm355evm_keys.c.

Cheers,
Samuel.


> Thank you for a quick reply.
> > Hi Andrey,
> >
> > On Thu, Nov 26, 2009 at 06:17:22PM +0500, Andrey A. Porodko wrote:
> >   
> >> Hello,
> >>
> >> Here is a patch for MSP430 chip support for Neuros OSD2 (Davinci DM6446
> >> based) board.
> >> Patch made against 2.6.32-rc6 kernel.
> >>     
> > Thanks for the patch, here are some comments about it:
> >
> > - Renaming a file may be acceptable, but you have to delete the prvious one.
> > Also, as you're changing the Kconfig symbol, you should evaluate the impact on
> > the current users (in config_* files for example).
> >
> > - Then about the code itself: ifdefs as the one you're doing here is not
> > exactly nice, and leads to a lot of code replication and maintenance burden.
> > It seems that you're trying to have a common MSP430 driver support for 2
> > different boards, which is a good idea. The main problem, if I understand it
> > correctly, is those 2 boards are running the same MSP430 HW running different
> > FWs.
> > What I'd really like to see here would be to have a generic MSP430 support.
> > You'd need to define a FW definition structure (it seems it would mostly be
> > GPIO settings), then have different static definitions for every known firmware
> > revision, and finally have a common probe routine that would go through this
> > firmware structure and sets thing accordingly. You would pass the firmware
> > revision you're using from your board definitions, unless there are some
> > registers on that chip that would let us know about this firmware.
> >
> > Cheers,
> > Samuel.
> >
> >
> >   
> 
> 
> -- 
> Best regards
> Andrey A. Porodko
>  
> 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

      reply	other threads:[~2009-11-30 10:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-26 13:09 Patch for MSP430 support on Neuros OSD2 board A. Porodko
2009-11-26 13:10 ` Mark Brown
2009-11-26 13:17 ` Andrey A. Porodko
2009-11-29 23:46   ` Samuel Ortiz
2009-11-30  6:37     ` Andrey A. Porodko
2009-11-30 10:35       ` Samuel Ortiz [this message]

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=20091130103556.GB3696@sortiz.org \
    --to=sameo@linux.intel.com \
    --cc=andrey.porodko@gmail.com \
    --cc=balajirrao@openmoko.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dbrownell@users.sourceforge.net \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=panda@chelcom.ru \
    /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