1 /*-
   2  * Copyright 2007-2013 Solarflare Communications Inc.  All rights reserved.
   3  *
   4  * Redistribution and use in source and binary forms, with or without
   5  * modification, are permitted provided that the following conditions
   6  * are met:
   7  * 1. Redistributions of source code must retain the above copyright
   8  *    notice, this list of conditions and the following disclaimer.
   9  * 2. Redistributions in binary form must reproduce the above copyright
  10  *    notice, this list of conditions and the following disclaimer in the
  11  *    documentation and/or other materials provided with the distribution.
  12  *
  13  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS AND
  14  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  16  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  17  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  18  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  19  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  20  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  21  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  22  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23  * SUCH DAMAGE.
  24  */
  25 
  26 #ifndef _SYS_LM87_IMPL_H
  27 #define _SYS_LM87_IMPL_H
  28 
  29 #ifdef  __cplusplus
  30 extern "C" {
  31 #endif
  32 
  33 #if EFSYS_OPT_MON_LM87
  34 
  35 #define TEST_REG 0x15
  36 #define SHUTDOWN_LBN 0
  37 #define SHUTDOWN_WIDTH 1
  38 
  39 #define CHANNEL_MODE_REG 0x16
  40 #define FAN1_AIN1_LBN 0
  41 #define FAN1_AIN1_WIDTH 1
  42 #define FAN2_AIN2_LBN 1
  43 #define FAN2_AIN2_WIDTH 1
  44 
  45 #define CONFIG1_REG 0x40
  46 #define START_LBN 0
  47 #define START_WIDTH 1
  48 #define INT_EN_LBN 1
  49 #define INT_EN_WIDTH 1
  50 #define INIT_LBN 7
  51 #define INIT_WIDTH 1
  52 
  53 #define INTERRUPT_MASK1_REG 0x43
  54 #define INTERRUPT_MASK2_REG 0x44
  55 
  56 #define VALUE_2_5V_REG 0x20
  57 #define VALUE_VCCP1_REG 0x21
  58 #define VALUE_VCC_REG 0x22
  59 #define VALUE_5V_REG 0x23
  60 #define VALUE_12V_REG 0x24
  61 #define VALUE_VCCP2_REG 0x25
  62 #define VALUE_EXT_TEMP_REG 0x26
  63 #define VALUE_INT_TEMP_REG 0x27
  64 #define VALUE_AIN1_REG 0x28
  65 #define VALUE_AIN2_REG 0x29
  66 
  67 #define ID_REG 0x3e
  68 #define ID_DECODE 0x02
  69 
  70 #define REV_REG 0x3f
  71 #define REV_DECODE 0x06
  72 
  73 #endif  /* EFSYS_OPT_MON_LM87 */
  74 
  75 #ifdef  __cplusplus
  76 }
  77 #endif
  78 
  79 #endif  /* _SYS_LM87_IMPL_H */