File: thinkpadpm.h

package info (click to toggle)
thinkpad 5.8-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 604 kB
  • ctags: 1,459
  • sloc: ansic: 5,985; makefile: 226; sh: 179; asm: 44; sed: 22
file content (73 lines) | stat: -rw-r--r-- 2,206 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73

/*********************************************************************
 *                
 * Filename:      thinkpadpm.h
 * Description:   header file for the thinkpadpm driver
 * Author:        Thomas Hood
 * Created:       27 January 2001
 *
 * Please report bugs to the author ASAP.
 * 
 *     Copyright (c) 2001 J.D. Thomas Hood, All rights reserved
 *     
 *     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.
 * 
 *     To receive a copy of the GNU General Public License, please write
 *     to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 *     Boston, MA 02111-1307 USA
 *     
 ********************************************************************/

#ifndef __THINKPADPM_H__
#define __THINKPADPM_H__

#include <linux/apm_bios.h>

/****** defines ******/

#define THINKPADPM_FUNC_STATE_GET  ((word)0x100)
#define THINKPADPM_FUNC_STATE_SET  ((word)0x101)

#define THINKPADPM_DEVICE_SERIAL_1   (APM_DEVICE_SERIAL)
#define THINKPADPM_DEVICE_SERIAL_2   (APM_DEVICE_SERIAL | 0x0001)
#define THINKPADPM_DEVICE_PARALLEL   (APM_DEVICE_PARALLEL)

#define THINKPADPM_STATE_READY     (APM_STATE_READY)
#define THINKPADPM_STATE_OFF       (APM_STATE_OFF)


/*** thinpadpm module input parameters ***/
typedef struct _thinkpadpm_inparm {
	word	wFunc;
	word	wParm0;
	dword	dwParm1;
} thinkpadpm_inparm_t;

/*** thinkpadpm module output parameters ***/
typedef struct _thinkpadpm_outparm {
	word	wRc;
	word	wParm0;
	dword	dwParm1;
} thinkpadpm_outparm_t;

typedef union _thinkpadpm_ioparm_t {
	thinkpadpm_inparm_t in;
	thinkpadpm_outparm_t out;
} thinkpadpm_ioparm_t;

/****** declarations ******/

int thinkpadpm_do(
	unsigned long ulongIoctlArg,
	flag_t fCallerHasWritePerm
);

#endif /* __THINKPADPM_H__ */