Copy sysctl enums to chip drivers from sensors.h for now,
as seen in drivers included in 2.5 tree. File no longer included
from kernel side.
Apply i2c-proc change in CVS tagged -km2.
Partial clean and sort of includes everywhere.
Add i2c-dev.h, as a partial copy from i2c.
Add to sensors.h from i2c-proc.h to compile things.
Remove i2c-isa.h.
Reflect header file changes to lib/ and prog/.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1705 7894878c-1315-0410-8ee3-d5d059ff63e0
Module refcounting using .owner, removing of inc/dec_use.
These require (yet unreleased) i2c 2.8.0+.
Named initializers everywhere. Unified namespace.
Cleanup for 2.5, remove EXPORT_NO_SYMBOLS, declare everything
static. Apply initcalls.
PCI device registration changes for busses started, replicating
from i2c-amd*. While everything does compile, nothing really
works. Well, maybe i2c-amd* ported back from 2.5 tree.
After updating your work directory, run
> cvs diff -u -r LAST-PRE-2-8-I2C > lm-2.8-patches-1
BEWARE: I have not even insmoded any of these yet.
To compile, you need i2c from cvs too.
For 2.4 kernel :
> cvs co -r lk2-4 i2c
For 2.5 kernel :
> cvs co i2c
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1698 7894878c-1315-0410-8ee3-d5d059ff63e0
which is shorter, simpler, easier to use in scripts,
and the best reason is that it's alphabetical so that
"cat *" output is in the correct order.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1321 7894878c-1315-0410-8ee3-d5d059ff63e0
_sysctl_real
_register_entry
_proc_real
_detect
_deregister_entry
_chips_data
which were the global symbols renamed in i2c-proc.[ch] in the
i2c package.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1101 7894878c-1315-0410-8ee3-d5d059ff63e0
Leave the files there for now.
Remove old installed sensors.o in kernel/Module.mk.
sensors.c was moved to i2c-proc.c in the i2c package.
i2c-isa.h was appended to i2c.h in the i2c package.
Delete all but the SYSCTL and ALARMS definitions in sensors.h,
as the rest of the file was moved to i2c-proc.h in the i2c package.
Remove #include "i2c-isa.h" lines in all chip drivers and
in bus driver i2c-isa.c.
This all probably breaks mkpatch.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1015 7894878c-1315-0410-8ee3-d5d059ff63e0
the horrible
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,2,18)) || \
(LINUX_VERSION_CODE == KERNEL_VERSION(2,3,0))
They should now both work with 2.3 kernels (including 2.4 prepatches)
and very new 2.2 kernels (ie. 2.2.18 prepatches)
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@933 7894878c-1315-0410-8ee3-d5d059ff63e0
Changes in sensors.c:
sensors_detect now skips addresses which are already taken. Even a
force parameter can not override this, as it could lead to major
problems.
For ISA addresses, the same is done; but the client drivers still need
a check if they claim more than one ISA address (as all of the current
ISA clients do).
Changes in chip drivers:
Removed the comment about needing address registration
Changes in i2cdetect.c:
Marks addresses which are already claimed
Changes in sensors-detect:
Warns when an address is already claimed, and skips it.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@667 7894878c-1315-0410-8ee3-d5d059ff63e0
* Improved monitoring of /proc directories
Instead of doing:
proc_bus_i2c->fill_inode = &monitor_bus_i2c;
void monitor_bus_i2c(struct inode *inode, int fill)
{
if (fill)
MOD_INC_USE_COUNT;
else
MOD_DEC_USE_COUNT;
}
you can now simply set:
proc_bus_i2c->owner = THIS_MODULE;
and this is just as good!
* An old 2.3 problem seemingly never was resolved yet: instead of using
a *wait_queue directly, you have to use a wait_queue_head_t and
initialize it properly:
#if (LINUX_VERSION_CODE < 0x020301)
static struct wait_queue *pcf_wait = NULL;
#else
static wait_queue_head_t pcf_wait;
#endif
#if (LINUX_VERSION_CODE >= 0x020301)
init_waitqueue_head(&pcf_wait);
#endif
except for this, semantics remain the same (but using a plain
wait_queue_head_t instead of a pointer to a wait_queue)
* I had to change the semantics of sensors_register_entry slightly,
to make the monitoring of /proc/sys/dev/* files possible for kernels
2.3.27 and newer. It now takes an additional parameter, which you
can specify as THIS_MODULE.
* THIS_MODULE is only defined in kernels 2.3.13 and later; added
it to compat.h and the compatibility section of mkpatch.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@640 7894878c-1315-0410-8ee3-d5d059ff63e0
* Removed several superfluous (struct i2c_client *) casts (they were left
from the time we had separate structs for smbus and isa)
* Removed the internal lists of registered clients
They have not been used for quite some time now, took memory space,
and limited the maximum number of clients that could be registered.
Also removed two small Makefile errors - I am happy I caught them before
the next release!
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@582 7894878c-1315-0410-8ee3-d5d059ff63e0
the kernel.
* <kernel/init.h> is now included for all modules
* Initialization-time only functions and variables are marked with __init
* EXPORT_SYMBOL or EXPORT_NO_SYMBOLS declarations added
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@513 7894878c-1315-0410-8ee3-d5d059ff63e0
* The i2c package can no longer be compiled as part of the lm_sensors tree
* The archive of the i2c package is removed
* smbus, i2c-dev and i2c-proc modules and headers have been removed; they
are now completely integrated into the i2c package
* The fake i2c.h header has been removed; this also allowed us to remove
the ugly LM_SENSORS and TBD defines.
* A new variable I2C_HEADERS is introduced in the Makefile. This allows
us to install the i2c headers in, for example, /usr/local/include/linux.
* All files now include <linux/i2c.h> instead of "i2c.h" and "smbus.h"
Status: 'make dep' works, all the right include files are found. 'make all'
does not yet work.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@496 7894878c-1315-0410-8ee3-d5d059ff63e0
gl518sm module
Besides the usual parameters, eeprom.o understands insmod parameter 'checksum'.
Set it to one (ie. 'modprobe eeprom checksum=1') to make it ignore any
chips which do not come through the checksum.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@371 7894878c-1315-0410-8ee3-d5d059ff63e0
device drivers. Specifically, I added these lines:
(in includes list)
#include "i2c-isa.h"
(Near beginning of *-attach-adapter function)
/* Make sure we aren't probing the ISA bus!! */
if (i2c_is_isa_adapter(adapter)) return 0;
This may be redundant is a couple of the files, but it shouldn't hurt.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@283 7894878c-1315-0410-8ee3-d5d059ff63e0
All our own code (ie. anything not in the i2c directory) compiles now without
warnings, even with WARN=1 (which sets -Wall -Wstrict-prototypes -Wshadow
-Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs
-Winline). There is one exception: the lex code (conf-lex.l) complains about
unused functions. That's flex' fault, not ours!
The i2c code still emits many warnings with the above flags; that's Simon's
problem.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@233 7894878c-1315-0410-8ee3-d5d059ff63e0
* Only first 64 bytes are read (enough for SDRAM EEPROM data) in 16 byte
blocks (separate proc files).
* No writing to EEPROMs. It's actually quite easy to add support for
writing, but I was being very paranoid about killing my DIMMs. I may add
write support, but make it only available when a #define is specified.
Now for a user app to decode the values...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@71 7894878c-1315-0410-8ee3-d5d059ff63e0
driver (used as a template). It is completely non-functional at this
point, but it's a start. There is a lot of code still specific to the
lm75 in it, so don't try to use it yet. ;') Also note that there needs
to be some concern with using it because a 'write' and a 'read' to an
EEPROM on the SMBus are very similar. So, we need to be carefull not
to start crippling SDRAM DIMMs due to unfinished/buggy code.
This should (when working) be able to read EEPROMs:
* In SDRAM DIMMs which specify the type, clocking, etc. of the DIMM.
* the EEPROMs in the new Intel Xeon processors.
* Any other EEPROM connected to the SMBus conforming to the standard
SMBus comminucation methods for SMBus EEPROMs.
Since only eight possible addresses are available for EEPROMs (at
least from the spec I'm looking at from Atmel), the code will
only probe for eight. Notice that this can lead to some problems
for machines for which this is true: # of SDRAM DIMMs + # of Xeons > 8
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@45 7894878c-1315-0410-8ee3-d5d059ff63e0