[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-omap
Subject:    how to write/read HDQ bus device
From:       x0khasim () ti ! com (Syed Mohammed, Khasim)
Date:       2007-06-28 21:52:59
Message-ID: 9C23CDD79DA20A479D4615857B2E2C47013BF445 () dlee13 ! ent ! ti ! com
[Download RAW message or body]

> I am using 2.6.14 kernel , I found HDQ interface @ following path
> 
> =================================================================
> # cd /sys/devices/platform/omap_hdq.0/bus/devices/omap_hdq.0
> # ls
> bus     cmd     power   result
> =================================================================
> 
> i can open it as below message ,
> 
> =================================================================
> # echo open > cmd
> OMAP_HDQ:sysfs cmd: *open*, len=4, count=5
> OMAP_HDQ:process open cmd ...
> OMAP_HDQ:exiting cmd_set, 0
> #
> =================================================================
> 
> but I do not how to write 0x55 to DHQ device(bq27000) register address
> 0x00~0x7F
> or read data from it.
> 
> any body can help me ? thank you

First question which board are you using? SDP2430 version ?

Setup to read/write from bq27000: The battery pack must be plugged into SDP. \
2430SDP2.0 and later has HDQ pin disconnected, this pin should be connected on your \
board.

Sample test:
 
# echo "open" > /sys/devices/platform/omap_hdq.0/cmd
# echo "read 01" > /sys/devices/platform/omap_hdq.0/cmd
# cat /sys/devices/platform/omap_hdq.0/result
# echo "write 01 ab" > /sys/devices/platform/omap_hdq.0/cmd
# echo "read 01" > /sys/devices/platform/omap_hdq.0/cmd
# cat /sys/devices/platform/omap_hdq.0/result

The first cat command returns the old value of register 0x01. The second cat should \
return the new value 0xab.

Regards
Khasim


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic