diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-22 21:42:54 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-22 21:42:54 +0400 |
commit | 4e93d3e8859c834ee18dfd33051d24df8669d0c0 (patch) | |
tree | 13f5b39730857257b5040471618e9bcce30ed9cc /include/linux/i2c-vid.h | |
parent | a0cd30fd26a398c0c6e50c6760610d4529f17a84 (diff) | |
parent | 0087e5ef577d0d6e664be7ab4be513b6a482e7ec (diff) | |
download | linux-4e93d3e8859c834ee18dfd33051d24df8669d0c0.tar.xz |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
Diffstat (limited to 'include/linux/i2c-vid.h')
-rw-r--r-- | include/linux/i2c-vid.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/i2c-vid.h b/include/linux/i2c-vid.h index 974835e3530f..41d0635e0ba9 100644 --- a/include/linux/i2c-vid.h +++ b/include/linux/i2c-vid.h @@ -97,3 +97,15 @@ static inline int vid_from_reg(int val, int vrm) 2050 - (val) * 50); } } + +static inline int vid_to_reg(int val, int vrm) +{ + switch (vrm) { + case 91: /* VRM 9.1 */ + case 90: /* VRM 9.0 */ + return ((val >= 1100) && (val <= 1850) ? + ((18499 - val * 10) / 25 + 5) / 10 : -1); + default: + return -1; + } +} |