# Vibrator configuration
dev=/sys/devices/platform/msm_pmic_vibrator
echo 2400 > $dev/voltage_mv

# Proximity sensor configuration
dev=/sys/devices/platform/proximity-sensor/semc/proximity-sensor
echo  15 > $dev/led_on_ms         # sensor LED on time in ms
echo  35 > $dev/led_off_ms       # sensor LED off time in ms

# Flash LED configuration
dev=/sys/devices/platform/msm_pmic_flash_led
echo 80 > $dev/spotlight::current_ma # spotlight current
echo 4700 > $dev/spotlight::boost_mv # spotlight boost voltage
echo 480 > $dev/cmaflash::current_ma # camera flash current
echo 5000 > $dev/cmaflash::boost_mv # camera flash  voltage

# Needed by radio
mkdir /data/radio
chmod 0777 /data/radio

chmod 0777 /dev/msm*
chmod 0777 /dev/pmem_adsp
chmod 0777 /dev/msm_camera/*
chmod 0777 /dev/graphics/*
chmod 0777 /dev/oncrpc/*
chmod 0777 /sys/class/semc/rgb_led/*
chmod 0666 /sys/devices/platform/i2c-adapter/i2c-0/0-0036/mode
chmod 0666 /sys/devices/platform/i2c-adapter/i2c-0/0-0036/br::intensity
chown -R system system /sys/devices/system/cpu/cpu0/cpufreq/

#Drain battery fix
mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system
chmod u+s /system/bin/charger
mount -o ro,remount -t yaffs2 /dev/block/mtdblock0 /system