summaryrefslogtreecommitdiffstats
path: root/doc/driver-model/UDM-hwmon.txt
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-02-26 15:59:27 -0700
committerTom Rini <trini@ti.com>2014-03-04 12:15:30 -0500
commitf9aa6a1086f6b7da1814a2c95feefa91c9c4b593 (patch)
treeafc79b7da6aa52de764ed53bf6b4c3a63a03b0df /doc/driver-model/UDM-hwmon.txt
parent95a260a98c010321cdc5f2acd1f4272b9c0a19dc (diff)
downloadtalos-obmc-uboot-f9aa6a1086f6b7da1814a2c95feefa91c9c4b593.tar.gz
talos-obmc-uboot-f9aa6a1086f6b7da1814a2c95feefa91c9c4b593.zip
dm: Remove old driver model documentation
This documentation pertains to the planned implementation of driver model in U-Boot for each subsystem, but it has not been superseded. It is probably better to have this documentation in the source code for each subsystem where possible, so that docbook will pick it up. Where this does not make sense, new documentation can be placed in some suitable file in doc/driver-model. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'doc/driver-model/UDM-hwmon.txt')
-rw-r--r--doc/driver-model/UDM-hwmon.txt118
1 files changed, 0 insertions, 118 deletions
diff --git a/doc/driver-model/UDM-hwmon.txt b/doc/driver-model/UDM-hwmon.txt
deleted file mode 100644
index 03a96a057a..0000000000
--- a/doc/driver-model/UDM-hwmon.txt
+++ /dev/null
@@ -1,118 +0,0 @@
-The U-Boot Driver Model Project
-===============================
-Hwmon device subsystem analysis
-===============================
-
-Tomas Hlavacek <tmshlvck@gmail.com>
-2012-03-02
-
-I) Overview
------------
-
-U-Boot currently implements one API for HW monitoring devices. The
-interface is defined in include/dtt.h and comprises of functions:
-
- void dtt_init(void);
- int dtt_init_one(int);
- int dtt_read(int sensor, int reg);
- int dtt_write(int sensor, int reg, int val);
- int dtt_get_temp(int sensor);
-
-The functions are implemented by a proper device driver in drivers/hwmon
-directory and the driver to be compiled in is selected in a Makefile.
-Drivers are mutually exclusive.
-
-Drivers depends on I2O code and naturally on board specific data. There are
-few ad-hoc constants put in dtt.h file and driver headers and code. This
-has to be consolidated into board specific data or driver headers if those
-constants makes sense globally.
-
-
-II) Approach
-------------
-
- 1) New API
- ----------
- In the UDM each hwmon driver would register itself by a function
-
- int hwmon_device_register(struct instance *i,
- struct hwmon_device_ops *o);
-
- The structure being defined as follows:
-
- struct hwmon_device_ops {
- int (*read)(struct instance *i, int sensor, int reg);
- int (*write)(struct instance *i, int sensor, int reg,
- int val);
- int (*get_temp)(struct instance *i, int sensor);
- };
-
-
- 2) Conversion thougths
- ----------------------
- U-Boot hwmon drivers exports virtually the same functions (with exceptions)
- and we are considering low number of drivers and code anyway. The interface
- is already similar and unified by the interface defined in dtt.h.
- Current initialization functions dtt_init() and dtt_init_one() will be
- converted into probe() and hwmon_device_register(), so the funcionality will
- be kept in more proper places. Besides implementing core registration and
- initialization we need to do code cleanup, especially separate
- driver-specific and HW specific constants.
-
- 3) Special consideration due to early initialization
- ----------------------------------------------------
- The dtt_init() function call is used during early initialization in
- board/gdsys/405ex/io64.c for starting up fans. The dtt code is perfectly
- usable in the early stage because it uses only local variables and no heap
- memory is required at this level. However the underlying code of I2C has to
- keep the same properties with regard to possibility of running in early
- initialization stage.
-
-III) Analysis of in-tree drivers
---------------------------------
-
- drivers/hwmon/lm81.c
- --------------------
- The driver is standard dtt. Simple conversion is possible.
-
-
- drivers/hwmon/ds1722.c
- ----------------------
- The driver is not standard dtt, but interface is similar to dtt.
- The interface has to be changed in order to comply to above mentioned
- specification.
-
-
- drivers/hwmon/ds1775.c
- ----------------------
- The driver is standard dtt. Simple conversion is possible.
-
-
- drivers/hwmon/lm73.c
- --------------------
- The driver is standard dtt. Simple conversion is possible.
-
-
- drivers/hwmon/lm63.c
- --------------------
- The driver is standard dtt. Simple conversion is possible.
-
-
- drivers/hwmon/adt7460.c
- -----------------------
- The driver is standard dtt. Simple conversion is possible.
-
-
- drivers/hwmon/lm75.c
- --------------------
- The driver is standard dtt. Simple conversion is possible.
-
-
- drivers/hwmon/ds1621.c
- ----------------------
- The driver is standard dtt. Simple conversion is possible.
-
-
- drivers/hwmon/adm1021.c
- -----------------------
- The driver is standard dtt. Simple conversion is possible.
OpenPOWER on IntegriCloud