AKM8976A » History » Version 6
Paul Kocialkowski, 07/02/2011 09:56 AM
1 | 1 | Paul Kocialkowski | = AKM8976A = |
---|---|---|---|
2 | |||
3 | The goal here is to add support for AKM8976A to akmd-free (a free rewrite of akmd, the daemon that deals with the accelerometer/magnetometer data for a few chips, including AKM ones). |
||
4 | This page is to coordinate the work around this goal. |
||
5 | |||
6 | == Current status == |
||
7 | |||
8 | 2 | Paul Kocialkowski | === Global tasks achievement === |
9 | 1 | Paul Kocialkowski | |
10 | 2 | Paul Kocialkowski | || Task || Achievement || |
11 | || Modifying the kernel driver to print the requests akmd makes (ioctl, etc) || [[span(Done , style=background: green; color: white; display: inline-block; width: 100%;)]] || |
||
12 | || Get an idea of how it works (what akmd does after what) || [[span(Done , style=background: green; color: white; display: inline-block; width: 100%;)]] || |
||
13 | || Define the exact steps that akmd follows || [[span(Done , style=background: green; color: white; display: inline-block; width: 100%;)]] || |
||
14 | || Implement AKM8976A in akmd-free without any data treatment yet || [[span(Done , style=background: green; color: white; display: inline-block; width: 100%;)]] || |
||
15 | || Understand how the data is treated (algorithms, etc) || [[span(Work in progress , style=background: orange; color: white; display: inline-block; width: 100%;)]] || |
||
16 | || Reproduce the data treatment with standard C code || [[span(Work in progress , style=background: orange; color: white; display: inline-block; width: 100%;)]] || |
||
17 | 5 | Paul Kocialkowski | || Include the data treatment code in akmd-free || [[span(ToDo , style=background: red; color: white; display: inline-block; width: 100%;)]] || |
18 | || Check that everything is OK on different devices || [[span(ToDo , style=background: red; color: white; display: inline-block; width: 100%;)]] || |
||
19 | 1 | Paul Kocialkowski | |
20 | 3 | Paul Kocialkowski | === Specific tasks achievement === |
21 | |||
22 | 5 | Paul Kocialkowski | ==== Initialization/calibration sequence ==== |
23 | 3 | Paul Kocialkowski | |
24 | || Task || Global achievement || Understood || Reproduced || Implemented || |
||
25 | 5 | Paul Kocialkowski | || Before the first ECS_IOCTL_GETDATA || [[span(Mostly done , style=background: orange; color: white; display: inline-block; width: 100%;)]] || [[span(Done , style=background: green; color: white; display: inline-block; width: 100%;)]] || [[span(Done , style=background: green; color: white; display: inline-block; width: 100%;)]] || [[span(ToDo , style=background: red; color: white; display: inline-block; width: 100%;)]] |
26 | 1 | Paul Kocialkowski | |
27 | == Getting started == |
||
28 | |||
29 | 5 | Paul Kocialkowski | Note that before everything, coming on our IRC channel [https://www.jappix.com/?r=replicant%25irc.freenode.net@irc.jappix.com #replicant on irc.freenode.net] and introducing yourself is essential: you'll be able to get help there and, of course, if you want to join the effort, communication is fundamental. |
30 | |||
31 | If you plan to join the effort to achieve this goal, here are the steps: |
||
32 | |||
33 | 6 | Paul Kocialkowski | * Downloading and setting up the akm8976a-dev branch for kernel-msm (which contains a modified version of ''drivers/misc/akm8976.c'') |
34 | * Downloading some scripts that are useful to debug fast |
||
35 | * Download and build the re_set_data tool (to inject some data to the kernel) |
||
36 | 5 | Paul Kocialkowski | |
37 | == Using the scripts/tools == |
||
38 | 1 | Paul Kocialkowski | |
39 | First of all, you need to know that the kernel-side driver that is used for AKM8976A is located at ''drivers/misc/akm8976.c''. |
||
40 | This file has been modified in order to: |
||
41 | 6 | Paul Kocialkowski | * make it trace (print) all the ioctl |
42 | * make it possible to inject data |
||
43 | |||
44 | Note that before you run any of the scripts, you need to start adb server as root: |
||
45 | {{{ # adb start-server }}} |
||
46 | |||
47 | Here is a list of the scripts, what they do and how to use them: |
||
48 | * '''replicant_kern_debug.sh''': this one is to get the debug messages from the kernel. It requires no special parameter, nor any specific location to be lunched in. |