[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>
2005-07-19 15:48:43 -06:00
|
|
|
/*
|
|
|
|
* 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);
|
|
|
|
|
2005-07-19 16:09:03 -06:00
|
|
|
/* Detect whether we are on the isa bus. This is only useful to hybrid
|
|
|
|
(i2c+isa) drivers. */
|
|
|
|
#define i2c_is_isa_adapter(adapptr) \
|
2005-08-11 15:41:56 -06:00
|
|
|
((adapptr)->id == I2C_HW_ISA)
|
2005-08-11 15:36:49 -06:00
|
|
|
#define i2c_is_isa_client(clientptr) \
|
|
|
|
i2c_is_isa_adapter((clientptr)->adapter)
|
2005-07-19 16:09:03 -06:00
|
|
|
|
[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>
2005-07-19 15:48:43 -06:00
|
|
|
#endif /* _LINUX_I2C_ISA_H */
|