7 Jun
2013
7 Jun
'13
4:39 p.m.
On Fri, Jun 07, 2013 at 08:14:18PM +0800, Nicolin Chen wrote:
Please use subject lines appropriate for the thing you're changing.
According to WM8962 datasheet, the GP5_FN bit of R516 (GPIO 5) depends on the CLKREG_OVD bit of R8 (Clocking2):
"Note that GPIO5 functions are only supported when CLKREG_OVD=1. When CLKREG_OVD=0, the contents of Register R516 must not be changed from the default value."
So set CLKREG_OVD bit before regcache_sync() updates the GP5_FN bit to a non-reset value.
You're missing a whole batch of handling of device reset here - look at how we handle things on power on.