shutting down the LCD on the 5400

From: Jason Waterman <jwaterman_at_csail.mit.edu>
Date: Thu, 10 Feb 2005 14:42:14 -0500

Hi All,

I'd like to shutdown the LCD on the 5400 to save power, but keep the
rest of the ipaq going. I've found the following code shown below and
the blank program (which I think is based on this code) but neither worked.

I poked around the driver code and I found mq1100_h5400_lcd_enable and
mq1100_h5400_power.

I'm assuming lcd_enable turns on the lcd_controller and power turns on
the lcd? Is one of these a superset of the other? Do I need to turn
them both off? And how would I get access to these functions in userspace?

Ultimately, I'd be happy with any solution that shut off the screen on
the 5400 for power savings but allowed me to still use the ipaq.

Thanks,
Jason

/*
  * ipaq-blank
  * turns on/off iPaq LCD display
  *
  * (c) 2000, 2001, 2002 by Nils Faerber <nils_at_kernelconcepts.de>
  *
  * public domain, but without any warranty !
  */

#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <linux/fb.h>

/* VESA Blanking Levels */
#define VESA_NO_BLANKING 0
#define VESA_VSYNC_SUSPEND 1
#define VESA_HSYNC_SUSPEND 2
#define VESA_POWERDOWN 3

int main(int argc, char **argv)
{
int fd;

     fd=open("/dev/fb0",O_RDWR);
     if (fd==-1) {
         fprintf(stderr,"Could not open fb0\n");
         exit(1);
     }
     if (argc<2 || argv[1][0]=='0') {
         if (ioctl(fd,FBIOBLANK,VESA_POWERDOWN)==-1) {
             fprintf(stderr,"ioctl() failed\n");
         }
     } else if (argv[1][0]=='1') {
         if (ioctl(fd,FBIOBLANK,VESA_NO_BLANKING)==-1) {
             fprintf(stderr,"ioctl() failed\n");
         }
     }
     close(fd);

return 0;
Received on Thu Feb 10 2005 - 14:43:57 EST

This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:20:11 EDT