aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-isa.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/i2c/busses/i2c-isa.c
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
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);