Discussion:
[M560x-driver-devel] Fix s5k83a init (ctl default values)
Lukáš Karas
2009-01-21 15:29:26 UTC
Permalink
Hi Erik.

I tested your cleanup in s5k83a init sequence today. It work fine in all my
test (after clean boot, reboot, resume from suspend (s2ram) and resume from
hibernate (s2disk)).

I found small, but dangerous error in s5k83a init function during tests. This
error set incorrect default ctl values after init. In attachment is patch for
fix this.

By the way, I look up to your pertinacity. All respect!

Regeards, Lukas
Erik Andrén
2009-01-21 15:40:23 UTC
Permalink
Post by Lukáš Karas
Hi Erik.
I tested your cleanup in s5k83a init sequence today. It work fine in all my
test (after clean boot, reboot, resume from suspend (s2ram) and resume from
hibernate (s2disk)).
I found small, but dangerous error in s5k83a init function during tests. This
error set incorrect default ctl values after init. In attachment is patch for
fix this.
Hm.
I don't understand the issue.
Could you elaborate on it please?

Regards,
Erik
Post by Lukáš Karas
By the way, I look up to your pertinacity. All respect!
Regeards, Lukas
Lukáš Karas
2009-01-21 15:52:23 UTC
Permalink
Post by Erik Andrén
Post by Lukáš Karas
Hi Erik.
I tested your cleanup in s5k83a init sequence today. It work fine in all
my test (after clean boot, reboot, resume from suspend (s2ram) and resume
from hibernate (s2disk)).
I found small, but dangerous error in s5k83a init function during tests.
This error set incorrect default ctl values after init. In attachment is
patch for fix this.
Hm.
I don't understand the issue.
Could you elaborate on it please?
In s5k83a world is "sd->sensor_priv" pointer to "s5k83a_priv" struct, instead
s32 array as in other sensors.

So, we need

((struct s5k83a_priv*)sd->sensor_priv)->settings;

instead

sd->sensor_priv;

for get pointer to ctl cache (s32 array).

Regards, Lukas
Erik Andrén
2009-01-21 17:34:02 UTC
Permalink
Post by Erik Andrén
Post by Lukáš Karas
Hi Erik.
I tested your cleanup in s5k83a init sequence today. It work fine in =
all
Post by Erik Andrén
Post by Lukáš Karas
my test (after clean boot, reboot, resume from suspend (s2ram) and re=
sume
Post by Erik Andrén
Post by Lukáš Karas
from hibernate (s2disk)).
I found small, but dangerous error in s5k83a init function during tes=
ts.
Post by Erik Andrén
Post by Lukáš Karas
This error set incorrect default ctl values after init. In attachment=
is
Post by Erik Andrén
Post by Lukáš Karas
patch for fix this.
Hm.
I don't understand the issue.
Could you elaborate on it please?
=20
In s5k83a world is "sd->sensor_priv" pointer to "s5k83a_priv" struct, i=
nstead=20
s32 array as in other sensors.=20
=20
So, we need=20
=20
((struct s5k83a_priv*)sd->sensor_priv)->settings;
=20
instead
=20
sd->sensor_priv;
=20
for get pointer to ctl cache (s32 array).
=20
Doh!

Commited, thanks.

Regards,
Erik
Regards, Lukas
=20
Loading...