This one was not nice at all. When /proc/bus/i2c-* is read, information is
put into a kernel buffer, which was declared to be the same size as the
final user-space buffer into which it should be copied. Information was
copied into the kernel buffer line by line (using sprintf). If the
buffer is smaller than the whole /proc/bus/i2c-*, only part of the file
was copied. But if the buffer did not break on a line-break, the sprintf
wrote beyond the kernel buffer. With devastating results. Solution: make
the kernel buffer a little longer, so that a single additional line would
fit into it.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@431 7894878c-1315-0410-8ee3-d5d059ff63e0
It compiles now cleanly against kernel 2.0.36; I checked, double-checked and
cross-checked.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@247 7894878c-1315-0410-8ee3-d5d059ff63e0
Everything is in, except the IOCTL hook (which will be pretty simple to add).
It compiles cleanly. It is not tested at all.
Also a very small fix for i2c-proc, and Makefile.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@158 7894878c-1315-0410-8ee3-d5d059ff63e0
* Somehow, i2c-proc did not yet use the i2c_adapter_id call. This must have
slipped through.
* isa.o and smbus.o changes I made to make them less noisy had a small
error (no return value), which caused strange device detections.
* Added /proc/bus/i2c module-count monitoring - somehow, this slipped
through, too.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@68 7894878c-1315-0410-8ee3-d5d059ff63e0
access unimplementable functionality. And removed a #if which could never
become true anyway from i2c-proc.c.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@67 7894878c-1315-0410-8ee3-d5d059ff63e0
This fix will only work for kernels >= 2.1.58.
* lm75, lm78: {INC,DEC}_MOD_USE_COUNT called for {inc,dec}_mod_use hooks
* sensors: For new kernels, fill_inode is called, which in turn calls
{inc,dec}_mod_use for a certain client
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@46 7894878c-1315-0410-8ee3-d5d059ff63e0
Not tested, as I do not own such an adapter...
Block reading not implemented, as it seems impossible to do with the
currently available I2C primitives.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@43 7894878c-1315-0410-8ee3-d5d059ff63e0
* /proc/bus/i2c printed garbage if more than one adapter was registered
* There was a double line in piix4.c in the delay function
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@38 7894878c-1315-0410-8ee3-d5d059ff63e0
The inode list that is used to determine which i2c-? file is accessed,
was not initialized for 2.1 kernels due to a #endif statement that
was one line too low :-(
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@32 7894878c-1315-0410-8ee3-d5d059ff63e0
Everything now compiles cleanly (except for warnings in kernel header files)
against 2.1.122. As I do not run 2.1 kernels, loading them could not be
tested.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@22 7894878c-1315-0410-8ee3-d5d059ff63e0
When you insert i2c-proc.o, you will find some files in /proc/bus (which
is first created for 2.0 kernels). Currently, the following files are
implemented:
* /proc/bus/i2c
A list of i2c/smbus adapters. If DEBUG was true when you compiled this
module, you will also see the ISA pseudo-adapter (if isa.o is loaded).
* /proc/bus/i2c-?
For each adapter in /proc/bus/i2c, a list of registered clients.
If DEBUG was true when you compiled this module, you will also see
the i2c-proc pseudo client.
Of course, these entries are modified when adapters are added/removed.
Kernel 2.1.x users are encouraged to test this module, as /proc entries
are somewhat different beginning with kernel 2.1.29.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@18 7894878c-1315-0410-8ee3-d5d059ff63e0
* i2c-bus is renamed to i2c-proc
* small patch in i2c-core.c (see correspondence with Simon Vogl)
* sensors.h contains i2c constants
* It seems lm78.[ch] was not yet committed?!?
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@16 7894878c-1315-0410-8ee3-d5d059ff63e0