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

vaiostat.c File Reference

Detailed Description

Author: Paul McAvoy <paulmcav@queda.net>

vaiostat.c,v 1.4 2002/11/09 08:28:31 paulmcav Exp

Vaio status / control kernel module Copyright (C) 2002 Paul McAvoy <paulmcav@queda.net>

'vaiostat' is a simple kernel module used to examine and control some information about a Sony Vaio laptop. This version includes support for: LCD brightness information. Battery / Power status information.

The majority of the code used to get / set the information for the above parameters was found in various sources including:

linux/drivers/char/sonypi.h Stelian Pop <stelian.pop@fr.alcove.com> picturebook/vaiobat.c Andrew Tridgell <tridge@linuxcare.com>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

2002/10/15 22:30:00 Markus Ammer <IB-Ammer@t-online.de> Support for battery 2 added.

Definition in file vaiostat.c.

#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/proc_fs.h>
#include <linux/delay.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include "vaiostat.h"

Go to the source code of this file.


#define B0_FULTK1   0xb2
#define B0_FULTK2   0xba
#define B0_LFTTK1   0xa2
#define B0_LFTTK2   0xaa
#define B0_MAXRT1   0xa4
#define B0_MAXRT2   0xac
#define B0_MAXTK   0xb0
#define B0_PCTRM   0xa0
#define BUFF_LEN   256
#define LCD_LEVEL   0x96
#define LCD_NUM_STEPS   8
#define PWR_SRCS   0x81


int atoi (char *buff)
static u16 ecr_get16 (u8 addr)
static u8 ecr_get8 (u8 addr)
static void ecr_set (u16 addr, u16 value)
 MODULE_AUTHOR ("Paul McAvoy <paulmcav@queda.net>")
 MODULE_DESCRIPTION ("Support selected Sony Vaio features.")
 module_exit (vaio_exit_module)
 module_init (vaio_init_module)
 MODULE_PARM (verbose,"i")
 MODULE_PARM_DESC (verbose,"be verbose, default is 0 (no)")
static void __exit vaio_exit_module (void)
static int __init vaio_init_module (void)
static int vaio_lcd_ctrl (struct file *file, const char *buffer, unsigned long count, void *data)
static int write_status_info (char *page, char **start, off_t off, int count, int *eof, void *data)


static char ctrl_msg [BUFF_LEN]
static int verbose = 0

Generated by  Doxygen 1.6.0   Back to index