summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-07-19 23:48:43 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-05 09:14:09 -0700
commit400c455eaa0d0819d18cd42a74070e0e238a73dc (patch)
treed8cbad347ec31ded7cac38ae18be71c9218cfcd6 /include/linux
parentefde723fdac02111872bff606ef362074fc1efa8 (diff)
[PATCH] I2C: Separate non-i2c hwmon drivers from i2c-core (2/9)
Convert i2c-isa from a dumb i2c_adapter into a pseudo i2c-core for ISA hardware monitoring drivers. The isa i2c_adapter is no more registered with i2c-core, drivers have to explicitely connect to it using the new i2c_isa_{add,del}_driver interface. At this point, all ISA chip drivers are useless, because they still register with i2c-core in the hope i2c-isa is registered there as well, but it isn't anymore. The fake bus will be named i2c-9191 in sysfs. This is the number it already had internally in various places, so it's not exactly new, except that now the number is seen in userspace as well. This shouldn't be a problem until someone really has 9192 I2C busses in a given system ;) The fake bus will no more show in "i2cdetect -l", as it won't be seen by i2c-dev anymore (not being registered with i2c-core), which is a good thing, as i2cdetect/i2cdump/i2cset cannot operate on this fake bus anyway. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/i2c-isa.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/i2c-isa.h b/include/linux/i2c-isa.h
new file mode 100644
index 000000000000..b5727d7702e1
--- /dev/null
+++ b/include/linux/i2c-isa.h
@@ -0,0 +1,29 @@
+/*
+ * i2c-isa.h - definitions for the i2c-isa pseudo-i2c-adapter interface
+ *
+ * Copyright (C) 2005 Jean Delvare <khali@linux-fr.org>
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _LINUX_I2C_ISA_H
+#define _LINUX_I2C_ISA_H
+
+#include <linux/i2c.h>
+
+extern int i2c_isa_add_driver(struct i2c_driver *driver);
+extern int i2c_isa_del_driver(struct i2c_driver *driver);
+
+#endif /* _LINUX_I2C_ISA_H */