linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Samuel Ortiz <sameo@linux.intel.com>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Arun MURTHY <arun.murthy@stericsson.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linus WALLEIJ <linus.walleij@stericsson.com>,
	Mattias WALLIN <mattias.wallin@stericsson.com>,
	Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Subject: Re: [PATCH] mfd: ab8500: update kconfig for ab8500 core driver
Date: Wed, 15 Sep 2010 20:21:46 +0200	[thread overview]
Message-ID: <20100915182145.GF2597@sortiz-mobl> (raw)
In-Reply-To: <20100915104105.e77dfe8c.randy.dunlap@oracle.com>

Hi Randy,

On Wed, Sep 15, 2010 at 10:41:05AM -0700, Randy Dunlap wrote:
> I don't know what the __crc_* symbols are (I can't find them anywhere).
> 
> The other functions (pwm_config, pwm_free, pwm_request, pwm_disable,
> pwm_enable) exist in multiple places.  This is not good.
> They are very generically named.  The instances of these that are
> provided by platform code are OK (these):
> 
> ./include/linux/pwm.h:19:int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns);
> ./arch/arm/plat-pxa/pwm.c:64:int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
> ./arch/arm/plat-pxa/pwm.c:101:EXPORT_SYMBOL(pwm_config);
> ./arch/arm/plat-samsung/pwm.c:194:int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
> ./arch/arm/plat-samsung/pwm.c:281:EXPORT_SYMBOL(pwm_config);
> ./arch/arm/plat-mxc/pwm.c:55:int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
> ./arch/arm/plat-mxc/pwm.c:114:EXPORT_SYMBOL(pwm_config);
> ./arch/mips/jz4740/pwm.c:94:int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
> 
> but the instances of these that are defined in
> drivers/mfd/twl6030-pwm.c should not be named so generically.
> 
> Changing (Fixing) the function names in twl6030-pwm.c should fix the build problem
> that you reported, I think.  
The pwm "API" relies on someone providing the pwm_* symbols, and then you have
leds_pwm or backlight_pwm calling those symbols out of the blue.
If we change the twl6030-pwm.c function names, no pwm users (backlight, led or
input) will actually be able to use the twl6030 PWM driver.
The pwm API is very poorly designed in my opinion and should provide a way for
pwm drivers to register against it. pwm users will then call into the pwm
framework who would select which driver to use.

> And it will still allow the ab8500 driver to be
> built on other platforms, which is what we prefer when that is possible.
I agree with that, but couldnt see any other fix with the current pwm
situation.

Cheers,
Samuel.

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

  reply	other threads:[~2010-09-15 18:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-15 11:23 [PATCH] mfd: ab8500: update kconfig for ab8500 core driver Arun Murthy
2010-09-15 15:20 ` Randy Dunlap
2010-09-15 17:12   ` Arun MURTHY
2010-09-15 17:41     ` Randy Dunlap
2010-09-15 18:21       ` Samuel Ortiz [this message]
2010-09-15 18:25         ` Randy Dunlap

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=20100915182145.GF2597@sortiz-mobl \
    --to=sameo@linux.intel.com \
    --cc=arun.murthy@stericsson.com \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattias.wallin@stericsson.com \
    --cc=randy.dunlap@oracle.com \
    --cc=srinidhi.kasagar@stericsson.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;
as well as URLs for NNTP newsgroup(s).