Logo Search packages:      
Sourcecode: vaiostat version File versions  Download package

static int vaio_lcd_ctrl ( struct file *  file,
const char *  buffer,
unsigned long  count,
void *  data 
) [static]

lcd proc input conversion routine

Parameters:
file proc file handle
buffer input buffer
count buffer length
data 
Returns:
number of bytes read

Definition at line 247 of file vaiostat.c.

References atoi(), and ecr_set().

Referenced by vaio_init_module().

{
      int i = 0;
      int val = 0;
      for (i=0; i<BUFF_LEN-1 && i<count; i++)
            get_user( ctrl_msg[i], buffer+i );

      ctrl_msg[i] = '\0';
       
      val = atoi(ctrl_msg);
      if ( val > LCD_NUM_STEPS ) val = LCD_NUM_STEPS;

      /* adjust lcd brightness */
      ecr_set( 0x96, val *= (255/LCD_NUM_STEPS) );

      if ( verbose ) printk( "vaiostat:lcd_bright = %d\n", val );

      return i;
}


Generated by  Doxygen 1.6.0   Back to index