Revised Build/Install Procedures for lm_sensors package:

Requirements
============
1. Remove all lm_sensors packages that may have been installed from rpms during
   during base installation of the rhas vs2.1 distribution

2. Linux 2.4.9-e.24 kernel config file has i2c adapter support enabled as MODULES
   >> see config-2.4.9-e.24-p4-smp-i2c config file supplied in the
      ESB-RHASv21-xxxxx.tgz driver package

3. Linux 2.4.9-e.24 kernel has actually been built and installed
   >> using config-2.4.9-e.24-p4-smp-i2c config file supplied in the
      ESB-RHASv21-xxxxx.tgz driver package
      >> /lib/modules/2.4.9-e.24-xyz holds output of kernel build's make
	  modules_install step

Update Linux 2.4.9-e.24 kernels i2c-core driver modules with i2c-2.7.0.tar.gz
============
1. untar i2c-2.7.0.tar.gz
2. cd into i2c-2.7.0 sub dir
3. fixup the Makefile
	patch -p0 < <path_to>/i2c-2.7.0-Makefile.patch
	vi Makefile
		Change
		KERNELVERSION := 2.4.20-hrich5 line to point to YOUR 2.4.9-e.24-xyz
4. make all
5. make install

	make install overwrites all the i2c-core modules in 
	/lib/modules/2.4.20-xyz/kernel/drivers/i2c dir

Install lm_sensors adapter drivers, sensor drivers, and smbus utilities
==============
1. untar lm_sensors-2.7.0.tar.gz
2. cd into lm_sensors-2.7.0 sub dir
3a. fixup the Makefile
        patch -p0 < <path_to>/lm_sensors-2.7.0-Makefile.patch
        vi Makefile
                Change
                KERNELVERSION := 2.4.20-hrich5 line to point to YOUR 2.4.9-e.24-xyz
3b. fixup the lm_sensors-2.7.0/kernel/busses/Module.mk file
        patch -p0 < <path_to>/lm_sensors-2.7.0-Mmodule.mk-patch    

4. apply patches to enable HR & ICH5 smbus controller support in i2c-i801
driver module

	patch kernel/busses/i2c-i801.c /<path-to>/i2c-hr.patch
	patch kernel/busses/i2c-i801.c /<path-to>/i2c-hr-ich5.patch

5. make all		builds everything in lm_sensors-2.7.0 sub dirs
   make install		installs stuff as shown below

 /lib/modules/2.4.9-e.24-xyz/kernel/drivers/i2c	adapter & sensor drivers
 /usr/local/lib					libsensors.so
 /usr/local/include/linux			sensors.h
 /usr/local/include/sensors			chips.h, error.h, sensors.h..
 /usr/local/bin					sensors
 /usr/local/sbin	i2c-detect, i2cdump, i2cset, & all the other utilites


Loading i2c drivers
==================

modprobe	i2c-core
modprobe	i2c-i801
modprobe	i2c-dev

Useful utilities:
==================

i2cdetect 0
 scans i2c bus 0 and lists addresses of devices found on bus 0

i2cdump 0 dev_addr b	
 reads/displays all registers in device at dev_adr... ex:
	i2cdump 0 0x2c b

i2cset bus dev_addr reg value
 writes <value> to <reg> in device @ <dev_addr>...ex:
	i2cset 0 0x2c 0x3D 00
	      write 00 to reg=0x3D in device @ addr=0x2c on i2c bus 0
	      > this will produce an error since reg 0x3D is read-only
	i2cset 0 0x2c 0x47 0x55
	      write 0x55 to reg=0x3D in device @ addr=0x2c on i2c bus 0
	      > this will work since reg 0x47 is a read/write register

Useful documents:
=================
Heceta 6 system monitor chip used on Petoski CRB is a ANALOG DEVICES part.
See datasheet for ADM1027 (available from www.analog.com) for register details.

