19 Jul, 2010

1 commit


21 Sep, 2009

3 commits

  • Allows users who use an IDE driver for their disk to use hpfall without
    having to modify the source. By default /dev/sda is used.
    Suggested by Christian Thaeter in http://lkml.org/lkml/2009/3/25/505.

    While we're add it, improve error message if opening /dev/freefall fails.

    Signed-off-by: Frans Pop
    Cc: Christian Thaeter
    Acked-by: Pavel Machek
    Signed-off-by: Jiri Kosina

    Frans Pop
     
  • Improve the example code to be at least useable, as in not causing
    harm (as shown below). Code can still be improved further, but this
    adds some basic safeguards.

    1. hpfall *MUST* mlockall(MCL_CURRENT|MCL_FUTURE); itself!
    Since the Program sits and waits most of the time it becomes very likely
    swapped out. If it gets woken up when the laptop drops from the table
    while it is swapped out it actually triggers harddrive activity!

    2. Daemonize hpfall using 'daemon(0,0)' (quick and dirty).

    3. Give hpfall realtime priority.
    Should give a chance that it has less latency when woken up.

    Signed-off-by: Christian Thaeter
    Signed-off-by: Frans Pop
    Acked-by: Pavel Machek
    Signed-off-by: Jiri Kosina

    Christian Thaeter
     
  • This patch makes hpfall.c conform to kernel coding style.

    I have not fixed the C99 // comments on two lines as they
    help indicate that those are not actually comments but
    incomplete code.

    Before:
    total: 10 errors, 6 warnings, 101 lines checked
    After:
    total: 2 errors, 0 warnings, 99 lines checked

    Signed-off-by: Frans Pop
    Acked-by: Pavel Machek
    Signed-off-by: Jiri Kosina

    Frans Pop
     

19 Feb, 2009

1 commit

  • This adds freefall handling to hp_accel driver. According to HP, it
    should just work, without us having to set the chip up by hand.

    hpfall.c is example .c program that parks the disk when accelerometer
    detects free fall. It should work; for now, it uses fixed 20seconds
    protection period.

    Signed-off-by: Pavel Machek
    Cc: Thomas Renninger
    Cc: Éric Piel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Machek