Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
[deliverable/linux.git] / drivers / net / wireless / iwlwifi / iwl-5000-hw.h
index 15cac70e36e2d202d17419e36bc86414f8ace6e0..4ef6804a455af2e31259db3a048fe4360f20dfe1 100644 (file)
 #define IWL50_NUM_AMPDU_QUEUES           10
 #define IWL50_FIRST_AMPDU_QUEUE                  10
 
+/* 5150 only */
+#define IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF  (-5)
+
+static inline s32 iwl_temp_calib_to_offset(struct iwl_priv *priv)
+{
+       u16 *temp_calib = (u16 *)iwl_eeprom_query_addr(priv,
+                                                      EEPROM_5000_TEMPERATURE);
+       /* offset =  temperature -  voltage / coef */
+       s32 offset = (s32)(temp_calib[0] - temp_calib[1] / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF);
+       return offset;
+}
+
 /* Fixed (non-configurable) rx data from phy */
 
 /**
This page took 0.057836 seconds and 5 git commands to generate.