- * IDs in Darwin for the sensors & fans
- *
- * CPU A AD7417_TEMP 10 (CPU A ambient temperature)
- * CPU A AD7417_AD1 11 (CPU A diode temperature)
- * CPU A AD7417_AD2 12 (CPU A 12V current)
- * CPU A AD7417_AD3 13 (CPU A voltage)
- * CPU A AD7417_AD4 14 (CPU A current)
- *
- * CPU A FAKE POWER 48 (I_V_inputs: 13, 14)
- *
- * CPU B AD7417_TEMP 15 (CPU B ambient temperature)
- * CPU B AD7417_AD1 16 (CPU B diode temperature)
- * CPU B AD7417_AD2 17 (CPU B 12V current)
- * CPU B AD7417_AD3 18 (CPU B voltage)
- * CPU B AD7417_AD4 19 (CPU B current)
- *
- * CPU B FAKE POWER 49 (I_V_inputs: 18, 19)
+ * PID factors for the Xserve DIMM control loop
+ */
+#define DIMM_PID_G_d 0
+#define DIMM_PID_G_p 0
+#define DIMM_PID_G_r 0x06553600
+#define DIMM_PID_INPUT_TARGET 3276800
+#define DIMM_PID_INTERVAL 1
+#define DIMM_PID_OUTPUT_MAX 14000
+#define DIMM_PID_OUTPUT_MIN 4000
+#define DIMM_PID_HISTORY_SIZE 20
+
+struct dimm_pid_state
+{
+ int ticks;
+ struct i2c_client * monitor;
+ s32 sample_history[DIMM_PID_HISTORY_SIZE];
+ s32 error_history[DIMM_PID_HISTORY_SIZE];
+ int cur_sample;
+ s32 last_temp;
+ int first;
+ int output;
+};
+
+
+/*
+ * PID factors for the Xserve Slots control loop