linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Samuel Ortiz <sameo@linux.intel.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 11:25:41 -0700	[thread overview]
Message-ID: <4C910FA5.8020507@oracle.com> (raw)
In-Reply-To: <20100915182145.GF2597@sortiz-mobl>

On 09/15/10 11:21, Samuel Ortiz wrote:
> 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.

So twl6030-pwm is a provider, just like some of the arch/ providers?
OK, I couldn't see that.

>> 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.

OK, thanks.  Do whatever you have to do.

-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

      reply	other threads:[~2010-09-15 18:26 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
2010-09-15 18:25         ` Randy Dunlap [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=4C910FA5.8020507@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=arun.murthy@stericsson.com \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattias.wallin@stericsson.com \
    --cc=sameo@linux.intel.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).