linux-mips
[Top] [All Lists]

Re: [PATCH v2 3/3] pwm: Add Ingenic JZ4740 support

To: Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: [PATCH v2 3/3] pwm: Add Ingenic JZ4740 support
From: Thierry Reding <thierry.reding@avionic-design.de>
Date: Tue, 11 Sep 2012 07:02:11 +0200
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, Antony Pavlov <antonynpavlov@gmail.com>, Maarten ter Huurne <maarten@treewalker.org>
In-reply-to: <504E60F4.9010309@metafoo.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: <1347278719-15276-1-git-send-email-thierry.reding@avionic-design.de> <1347278719-15276-4-git-send-email-thierry.reding@avionic-design.de> <504E60F4.9010309@metafoo.de>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Sep 10, 2012 at 11:51:48PM +0200, Lars-Peter Clausen wrote:
> On 09/10/2012 02:05 PM, Thierry Reding wrote:
> > This commit moves the driver to drivers/pwm and converts it to the new
> > PWM framework.
> > 
> > Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
> 
> Seems to work, thanks a lot. This one and patch 2:
> 
> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
> Tested-by: Lars-Peter Clausen <lars@metafoo.de>
> 
> But I noticed a different problem. Some drivers using the pwm API depend on
> HAVE_PWM (e.g. the pwm beeper driver), but the generic PWM framework does not
> select HAVE_PWM, so I couldn't select the pwm beeper driver. Imo the generic
> PWM framework should select HAVE_PWM

Does it also work if you add || PWM to the PWM beeper driver's depends?
I thought I had done something similar for pwm-backlight, but looking at
the logs I didn't. The reason was that it also uses the new APIs
introduced by the PWM subsystem. For pwm-beeper the situation is
different because it only uses the legacy API and therefore can work
with both the legacy and new frameworks.

I think selecting HAVE_PWM won't work properly because it isn't provided
by all architectures. So you might end up with PWM enabled on PowerPC,
which doesn't define HAVE_PWM and will probably give you Kconfig
warnings and will still not let you select pwm-beeper.

Thierry

Attachment: pgpsJwWiXsReQ.pgp
Description: PGP signature

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