View Single Post
Old 12-25-2012, 10:08 PM   #10
sysKin
Connoisseur
sysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the end
 
sysKin's Avatar
 
Posts: 56
Karma: 31830
Join Date: Oct 2012
Location: Australia
Device: Aura HD, after a train ate my Glo
So has anyone managed to control the glow by directly interacting with hardware?
Looking at /sys/devices/platform/ -- which should have all Freescale hardware accessible - there exists /sys/devices/platform/pmic_light.1/, which has a virtual file "lit". It *looks* like writing to that file should control the light, just like writing to platform/pmic_leds.98/leds/pmic_ledsb/brightness makes the LED go blue.

Looking at constants from libnickel.so, it seems to do that in a few places:
echo ch %1 > /sys/devices/platform/pmic_light.1/lit
echo cur 1 > /sys/devices/platform/pmic_light.1/lit
echo dc %1 > /sys/devices/platform/pmic_light.1/lit
echo bp %1 > /sys/devices/platform/pmic_light.1/lit

However, it's anyone's guess what %1 should be at those points, and is there some sequence of "ch" and "dc" and "bp" and "cur" commands that need to be run together. My attempts to write numbers or letters there failed, and my attempts to read Freescale documentation on this device were unsuccessful. It seems to be designed for LCD backlight in mind.

It's also perfectly possible that the light is actually not controlled by pmic_light, but instead by one of the mxc-i2c devices or even mxc-pwm.1 device or even something else.

Ideas?

Maybe some linux guru knows a way to capture writes to that "lit" file, somehow, and dump them to a real file instead?
For example overriding "echo" command with our own?

Last edited by sysKin; 12-25-2012 at 10:24 PM.
sysKin is offline   Reply With Quote