Changeset 3318 for i2c/trunk/kernel/i2c-philips-par.c
- Timestamp:
- 07/18/99 16:01:33 (14 years ago)
- Files:
-
- 1 modified
-
i2c/trunk/kernel/i2c-philips-par.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
i2c/trunk/kernel/i2c-philips-par.c
r3317 r3318 1 1 /* ------------------------------------------------------------------------- */ 2 /* bit-lp.c i2c-hw access for philips style parallel port adapters*/2 /* i2c-philips-par.c i2c-hw access for philips style parallel port adapters */ 3 3 /* ------------------------------------------------------------------------- */ 4 /* Copyright (C) 1995-9 7Simon G. Vogl4 /* Copyright (C) 1995-99 Simon G. Vogl 5 5 6 6 This program is free software; you can redistribute it and/or modify … … 20 20 static char rcsid[] = "$Id$"; 21 21 ------------------------------------------------------------------------- */ 22 23 /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even 24 Frodo Looijaard <frodol@dds.nl> */ 22 25 23 26 #include <linux/kernel.h> … … 74 77 /* ----- local functions ---------------------------------------------- */ 75 78 76 void bit_lp_setscl(void *data, int state)79 static void bit_lp_setscl(void *data, int state) 77 80 { 78 81 /*be cautious about state of the control register - … … 85 88 } 86 89 87 void bit_lp_setsda(void *data, int state)90 static void bit_lp_setsda(void *data, int state) 88 91 { 89 92 if (state) { … … 94 97 } 95 98 96 int bit_lp_getscl(void *data)99 static int bit_lp_getscl(void *data) 97 100 { 98 101 return ( 0 != ( (inb(STAT)) & I2C_SCLIN ) ); 99 102 } 100 103 101 int bit_lp_getsda(void *data)104 static int bit_lp_getsda(void *data) 102 105 { 103 106 return ( 0 != ( (inb(STAT)) & I2C_SDAIN ) ); 104 107 } 105 108 106 int bit_lp_init(void)109 static int bit_lp_init(void) 107 110 { 108 111 if (check_region(base,(base == 0x3bc)? 3 : 8) < 0 ) { … … 118 121 } 119 122 120 void bit_lp_exit(void)123 static void bit_lp_exit(void) 121 124 { 122 125 release_region( base , (base == 0x3bc)? 3 : 8 ); 123 126 } 124 127 125 int bit_lp_reg(struct i2c_client *client)126 { 127 return 0; 128 } 129 130 int bit_lp_unreg(struct i2c_client *client)131 { 132 return 0; 133 } 134 135 static void bit_lp_inc_use(struct bit_adapter *adap)128 static int bit_lp_reg(struct i2c_client *client) 129 { 130 return 0; 131 } 132 133 static int bit_lp_unreg(struct i2c_client *client) 134 { 135 return 0; 136 } 137 138 static void bit_lp_inc_use(struct i2c_bit_adapter *adap) 136 139 { 137 140 MOD_INC_USE_COUNT; 138 141 } 139 142 140 static void bit_lp_dec_use(struct bit_adapter *adap)143 static void bit_lp_dec_use(struct i2c_bit_adapter *adap) 141 144 { 142 145 MOD_DEC_USE_COUNT; … … 147 150 * This is only done when more than one hardware adapter is supported. 148 151 */ 149 st ructbit_adapter bit_lp_ops = {152 static struct i2c_bit_adapter bit_lp_ops = { 150 153 "Philips Parallel port adapter", 151 HW_B_LP,154 I2C_HW_B_LP, 152 155 NULL, 153 156 bit_lp_setsda, … … 163 166 164 167 165 int __init bitlp_init(void)168 int __init i2c_bitlp_init(void) 166 169 { 167 170 if (base==0) { … … 196 199 int init_module(void) 197 200 { 198 return bitlp_init();201 return i2c_bitlp_init(); 199 202 } 200 203
