aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-isa.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-isa.c')
-rw-r--r--drivers/i2c/busses/i2c-isa.c72
1 files changed, 72 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-isa.c b/drivers/i2c/busses/i2c-isa.c
new file mode 100644
index 000000000000..0f54a2a0afa5
--- /dev/null
+++ b/drivers/i2c/busses/i2c-isa.c
@@ -0,0 +1,72 @@
1/*
2 i2c-isa.c - Part of lm_sensors, Linux kernel modules for hardware
3 monitoring
4 Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>
5
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.
10
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.
15
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.
19*/
20
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
25 of this. */
26
27#include <linux/config.h>
28#include <linux/init.h>
29#include <linux/module.h>
30#include <linux/kernel.h>
31#include <linux/errno.h>
32#include <linux/i2c.h>
33
34static u32 isa_func(struct i2c_adapter *adapter);
35
36/* This is the actual algorithm we define */
37static struct i2c_algorithm isa_algorithm = {
38 .name = "ISA bus algorithm",
39 .id = I2C_ALGO_ISA,
40 .functionality = isa_func,
41};
42
43/* There can only be one... */
44static struct i2c_adapter isa_adapter = {
45 .owner = THIS_MODULE,
46 .class = I2C_CLASS_HWMON,
47 .algo = &isa_algorithm,
48 .name = "ISA main adapter",
49};
50
51/* We can't do a thing... */
52static u32 isa_func(struct i2c_adapter *adapter)
53{
54 return 0;
55}
56
57static int __init i2c_isa_init(void)
58{
59 return i2c_add_adapter(&isa_adapter);
60}
61
62static void __exit i2c_isa_exit(void)
63{
64 i2c_del_adapter(&isa_adapter);
65}
66
67MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>");
68MODULE_DESCRIPTION("ISA bus access through i2c");
69MODULE_LICENSE("GPL");
70
71module_init(i2c_isa_init);
72module_exit(i2c_isa_exit);