Changeset 3235


Ignore:
Timestamp:
Aug 29, 2012, 2:12:35 AM (2 years ago)
Author:
wmb
Message:

OLPC ARM - Set reg and compatible properties in the /image-sensor node dynamically, by probing for the specific chip that is present. This requires the assistance of the camera driver, because the image sensor won't respond to its I2C bus unless it has a clock from the CCIC camera unit.

Location:
dev/olpc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • dev/olpc/imagesensor.fth

    r2880 r3235  
    1313   false 
    1414; 
     15: set-sensor-properties  ( name$ i2c-addr -- ) 
     16   my-self >r  0 to my-self 
     17   " /image-sensor" find-device  ( name$ i2c-addr ) 
     18      " reg" get-property  if    ( name$ i2c-addr ) 
     19         1 reg                   ( name$ ) 
     20         +compatible             ( ) 
     21      else                       ( name$ i2c-addr regval$ ) 
     22         2drop 3drop             ( ) 
     23      then 
     24   device-end 
     25   r> to my-self 
     26; 
     27 
     28also forth definitions 
     29: probe-image-sensor  ( -- ) 
     30   " /camera" open-dev close-dev 
     31; 
     32previous definitions 
  • dev/olpc/mmp2camera/loadpkg.fth

    r3233 r3235  
    1010      cam-rst-gpio# 0 encode-gpio 
    1111   " gpios" property 
     12 
     13   " /image-sensor" encode-phandle  " image-sensor" property 
    1214 
    13150 [if] 
  • dev/olpc/ov7670.fth

    r3197 r3235  
    167167 
    168168   " OV7670" " sensor" string-property 
     169   " omnivision,ov7670" camera-smb-slave set-sensor-properties 
    169170 
    170171   ['] ov7670-set-mirrored to set-mirrored 
  • dev/olpc/seti.fth

    r3229 r3235  
    307307 
    308308   " SETi,SIV120D" " sensor" string-property 
     309   " seti,siv120d" camera-smb-slave set-sensor-properties 
    309310 
    310311   ['] seti-set-mirrored to set-mirrored 
Note: See TracChangeset for help on using the changeset viewer.