Re: New I2C and machine probing method
Hello Matthias,
Matthias Grimm <matthiasgrimm@users.sourceforge.net> wrote:
>
> Hi,
> I want to use some OF and kernel 2.6 features to improve device probing
> in pbbuttonsd. Unfortunately I have only an ancient PowerBook so I need
> your help to test the new routines on as many different machines as
> possible.
>
> I attached the source code of a short program. You could compile it as
> follows:
> $> gcc -o of_probing of_probing.c
#v+
% gcc-4.2 -O2 -Wall -Wformat=2 -Wunused -Wundef -Wextra of_prob.c -o of_prob
of_prob.c: In function ?probeLMU?:
of_prob.c:20: warning: implicit declaration of function ?read?
of_prob.c:23: warning: implicit declaration of function ?close?
of_prob.c: In function ?addPath?:
of_prob.c:36: warning: suggest parentheses around assignment used as truth value
of_prob.c: In function ?getLMUAddress?:
of_prob.c:67: warning: ordered comparison of pointer with integer zero
of_prob.c: In function ?findI2CDevice?:
of_prob.c:86: warning: suggest parentheses around assignment used as truth value
of_prob.c:89: warning: ordered comparison of pointer with integer zero
of_prob.c:91: warning: comparison between signed and unsigned
of_prob.c: In function ?getMachineID?:
of_prob.c:121: warning: implicit declaration of function ?atoi?
of_prob.c: In function ?main?:
of_prob.c:133: warning: unused parameter ?argc?
of_prob.c:133: warning: unused parameter ?argv?
of_prob.c: In function ?findI2CDevice?:
of_prob.c:106: warning: control reaches end of non-void function
% ./of_prob
Probing machine...
Machine: ID = 63
OF: '/proc/device-tree/uni-n@f8000000/i2c@f8001000/reg'
Path incomplete! One or more elements not found.
LMU: No LMU found!
#v-
Jörg.
--
Ein Narr, er sieht die Weisheit nicht selbst wenn sie närrisch
zu Ihm spricht!
Reply to: