linux-mips
[Top] [All Lists]

Re: [PATCH] pwm: Get rid of HAVE_PWM

To: Thierry Reding <thierry.reding@avionic-design.de>
Subject: Re: [PATCH] pwm: Get rid of HAVE_PWM
From: Eric Miao <eric.y.miao@gmail.com>
Date: Mon, 8 Oct 2012 10:45:44 +0800
Cc: Lars-Peter Clausen <lars@metafoo.de>, linux-kernel@vger.kernel.org, Russell King <linux@arm.linux.org.uk>, Shawn Guo <shawn.guo@linaro.org>, Haojian Zhuang <haojian.zhuang@gmail.com>, Ralf Baechle <ralf@linux-mips.org>, Dmitry Torokhov <dmitry.torokhov@gmail.com>, Bryan Wu <bryan.wu@canonical.com>, Richard Purdie <rpurdie@rpsys.net>, Samuel Ortiz <sameo@linux.intel.com>, Ashish Jangam <ashish.jangam@kpitcummins.com>, Andrew Jones <drjones@redhat.com>, linux-arm-kernel@lists.infradead.org, linux-mips@linux-mips.org, linux-input@vger.kernel.org, linux-leds@vger.kernel.org
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=LH6lR2octL4Gc1jWAB6ViKVJi89IFE9kA8uNsp3rY28=; b=qkd5qXXQhyiWisGQ7t/ePa6xJp0OtPQU4iZ1vn3DHEGnLIbWRrQ0RxOTPKaJ+XagAS xjq//WfuXL2UIcA//239lY9tMKLoyYa2xRuvy0A77fix9s8a4Kr/NGqDbnPlEyee3stz 7v7eaSO0OK2/3llDvoiLW5uOd7nPaaR7/TGCBZhUSvsndycrpgpZk66Yq/oDByIIjfW8 SzrwQVS9CE5qCK/CmgWcQ/FT/Zws+L040/9T1jSrRfoR7nlzVlqqfwrETltTZ3lsZxHf Jjv2ThU2i5ZavMtiPSa4y3g7vIYcDmcX0/gCbiF7Xrhe/GIFnnK/g61h1JeZkyB7L53r so0Q==
In-reply-to: <20121004191308.GB7228@avionic-0098.mockup.avionic-design.de>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1349330819-11924-1-git-send-email-thierry.reding@avionic-design.de> <506DA487.9070400@metafoo.de> <20121004182931.GA7228@avionic-0098.mockup.avionic-design.de> <506DDA16.8070604@metafoo.de> <20121004191308.GB7228@avionic-0098.mockup.avionic-design.de>
Sender: linux-mips-bounce@linux-mips.org
On Fri, Oct 5, 2012 at 3:13 AM, Thierry Reding
<thierry.reding@avionic-design.de> wrote:
> On Thu, Oct 04, 2012 at 08:48:54PM +0200, Lars-Peter Clausen wrote:
>> On 10/04/2012 08:29 PM, Thierry Reding wrote:
>> > On Thu, Oct 04, 2012 at 05:00:23PM +0200, Lars-Peter Clausen wrote:
>> >> On 10/04/2012 08:06 AM, Thierry Reding wrote:
>> >>> [...]
>> >>> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
>> >>> index 331d574..b38f23d 100644
>> >>> --- a/arch/mips/Kconfig
>> >>> +++ b/arch/mips/Kconfig
>> >>> @@ -219,7 +219,8 @@ config MACH_JZ4740
>> >>>   select GENERIC_GPIO
>> >>>   select ARCH_REQUIRE_GPIOLIB
>> >>>   select SYS_HAS_EARLY_PRINTK
>> >>> - select HAVE_PWM
>> >>> + select PWM
>> >>> + select PWM_JZ4740
>> >>>   select HAVE_CLK
>> >>>   select GENERIC_IRQ_CHIP
>> >>
>> >> I'm not sure if this is such a good idea, not all jz4740 based board
>> >> necessarily require PWM.
>> >
>> > This really only restores previous behaviour. But I agree that this is
>> > potentially not what we want. Maybe we should just not select this for
>> > any boards but rather leave it up to some default configuration. If so
>> > the patch can be made simpler by just removing the HAVE_PWM entries.
>>
>> At least for JZ4740 I think that is the better solution.
>
> Okay, I'll give other people the chance to comment on this. Especially
> for PXA there are many boards that use the PWM for backlight and it
> would be interesting to hear from them how they want this to be handled.

I'd say the original intention to introduce HAVE_PWM (although PXA
makes a lot use of this, but I remember Russell was the first to propose
this), is for board config to indicate its potential usage of the PWM or
rather if PWM is available for use on the board, and then leave the
developer another config option to build or not-to-build.

Personally I think removing HAVE_PWM will simplify the code a bit
and that's a good thing, on the other hand, how to keep a certain level
of flexibility mentioned above remains a small question. I guess with
device tree, this can be mitigated a bit.

<Prev in Thread] Current Thread [Next in Thread>