[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1890769.KjIbOv8Xbz@hyperion>
Date: Sun, 02 Sep 2012 15:25:55 +0200
From: Maarten ter Huurne <maarten@...ewalker.org>
To: Thierry Reding <thierry.reding@...onic-design.de>
Cc: Ralf Baechle <ralf@...ux-mips.org>, linux-mips@...ux-mips.org,
linux-kernel@...r.kernel.org,
Antony Pavlov <antonynpavlov@...il.com>,
Lars-Peter Clausen <lars@...afoo.de>
Subject: Re: [PATCH 0/3] MIPS: JZ4740: Move PWM driver to PWM framework
On Sunday 02 September 2012 11:52:27 Thierry Reding wrote:
> This small series fixes a build error due to a circular header
> dependency, exports the timer API so it can be used outside of
> the arch/mips/jz4740 tree and finally moves and converts the
> JZ4740 PWM driver to the PWM framework.
>
> Note that I don't have any hardware to test this on, so I had to
> rely on compile tests only. Patches 1 and 2 should probably go
> through the MIPS tree, while I can take patch 3 through the PWM
> tree. It touches a couple of files in arch/mips but the changes
> are unlikely to cause conflicts.
Exporting the hardware outputs PWM2-7 as index 0-5 in the PWM core is rather
confusing. I discussed with Lars on IRC and it's probably better to expose
PWM0-7 through the API, but refuse to hand out PWM0 and PWM1 when requested,
since their associated timers are in use by the system. I attached a diff
that illustrates this approach.
Note that if this approach is taken, the beeper ID in board-qi_lb60.c should
be changed back from 2 to 4, since the beeper is attached to PWM4.
I tested the "for-next" branch on the Dingoo A320 with the pwm-backlight
driver. It didn't work at first, because the PWM number and the timer number
didn't align: I requested PWM number 5 to get PWM7 and the GPIO of PWM7 was
used, but with timer 5 instead of timer 7, resulting in a dark screen.
However, it works fine after adding PWM0/1 as described above.
If other people want to test on real hardware, you can find the code in
branch jz-3.6-rc2-pwm in the qi-kernel repository. Unfortunately our web
interface for git is still broken, but the repo itself is fine.
git://projects.qi-hardware.com/qi-kernel.git
Bye,
Maarten
View attachment "jz4740-pwm-all-8.diff" of type "text/x-patch" (780 bytes)
Powered by blists - more mailing lists