2 i2c-isa.c - Part of lm_sensors, Linux kernel modules for hardware
4 Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 /* This implements an i2c algorithm/adapter for ISA bus. Not that this is
22 on first sight very useful; almost no functionality is preserved.
23 Except that it makes writing drivers for chips which can be on both
24 the SMBus and the ISA bus very much easier. See lm78.c for an example
27 #include <linux/init.h>
28 #include <linux/module.h>
29 #include <linux/kernel.h>
30 #include <linux/errno.h>
31 #include <linux/i2c.h>
33 static u32 isa_func(struct i2c_adapter *adapter);
35 /* This is the actual algorithm we define */
36 static struct i2c_algorithm isa_algorithm = {
37 .name = "ISA bus algorithm",
39 .functionality = isa_func,
42 /* There can only be one... */
43 static struct i2c_adapter isa_adapter = {
45 .class = I2C_CLASS_HWMON,
46 .algo = &isa_algorithm,
47 .name = "ISA main adapter",
50 /* We can't do a thing... */
51 static u32 isa_func(struct i2c_adapter *adapter)
56 static int __init i2c_isa_init(void)
58 return i2c_add_adapter(&isa_adapter);
61 static void __exit i2c_isa_exit(void)
63 i2c_del_adapter(&isa_adapter);
66 MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>");
67 MODULE_DESCRIPTION("ISA bus access through i2c");
68 MODULE_LICENSE("GPL");
70 module_init(i2c_isa_init);
71 module_exit(i2c_isa_exit);