Code Monkey home page Code Monkey logo

kernel_msm's Issues

SysFS interface for the accelerometer

Can you patch the kernel (possibly in the mr1 branch) so that you can access the accelerometer data through sysfs? I need that for the autorotate python script.

This already happens in my laptop: the accelerometer is both usable as a joystick (it's /dev/input/js0) and through sysfs:

lis3lv02d/:
input  modalias  position  power  rate  selftest  subsystem  uevent

lis3lv02d/input:
input13

lis3lv02d/input/input13:
capabilities  device  event6  id  js0  max  min  modalias  name  phys  poll  power  properties  subsystem  uevent  uniq

lis3lv02d/input/input13/capabilities:
abs  ev  ff  key  led  msc  rel  snd  sw

lis3lv02d/input/input13/event6:
dev  device  power  subsystem  uevent

lis3lv02d/input/input13/event6/power:
async                 control              runtime_active_time  runtime_status          runtime_usage
autosuspend_delay_ms  runtime_active_kids  runtime_enabled      runtime_suspended_time

lis3lv02d/input/input13/id:
bustype  product  vendor  version

lis3lv02d/input/input13/js0:
dev  device  power  subsystem  uevent

lis3lv02d/input/input13/js0/power:
async                 control              runtime_active_time  runtime_status          runtime_usage
autosuspend_delay_ms  runtime_active_kids  runtime_enabled      runtime_suspended_time

lis3lv02d/input/input13/power:
async                 control              runtime_active_time  runtime_status          runtime_usage
autosuspend_delay_ms  runtime_active_kids  runtime_enabled      runtime_suspended_time

lis3lv02d/power:
async                 control              runtime_active_time  runtime_status          runtime_usage
autosuspend_delay_ms  runtime_active_kids  runtime_enabled      runtime_suspended_time

"position" output this: (18,-162,990) โ†’ (x,y,z)
I read those values in the script and decide the screen orientation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.