beaglebone-capes: add support for weatherstation cape
authorKoen Kooi <koen@dominion.thruhere.net>
Thu, 7 Jun 2012 15:40:44 +0000 (17:40 +0200)
committerDenys Dmytriyenko <denys@ti.com>
Mon, 11 Jun 2012 20:59:08 +0000 (16:59 -0400)
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
recipes-ti/beagleboard/beaglebone-capes.bb
recipes-ti/beagleboard/beaglebone-capes/cape.sh

index 2a9f1fb2fded9f92278904256d9f03e511a466b0..b463a893640ac86813fa8c69046de0ca1f04fac6 100644 (file)
@@ -3,7 +3,7 @@ DESCRIPTION = "Userspace setup for beaglebone capes"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
 
-PR = "r2"
+PR = "r3"
 
 inherit allarch
 
index 61240a5fb7acadfa5da9f2edaa2ac8de99dcf205..566cdf5f1b8e5f100c2d3cf4b892083dd0e7f758 100755 (executable)
@@ -10,6 +10,12 @@ for eeprom in /sys/bus/i2c/devices/3-005*/eeprom ; do
                                echo "Turning on backlight for LCD4 cape"
                                i2cset -f -y 1 0x24 0x07 0x09
                                i2cset -f -y 1 0x24 0x08 0x60;;
+               "BB-BONE-WTHR-01.")
+                               echo "Initializing I2C devices"
+                               echo sht21 0x40 > /sys/class/i2c-adapter/i2c-3/new_device
+                               echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-3/new_device
+                               echo tsl2550 0x39 > /sys/class/i2c-adapter/i2c-3/new_device
+                               echo 1 > /sys/bus/i2c/devices/3-0039/operating_mode;;
                *)
                                echo "unknown cape: $PARTNUMBER";;
        esac