Lines 8772-8783
static const struct attribute_group fan_driver_attr_group = {
Link Here
|
8772 |
|
8772 |
|
8773 |
#define TPACPI_FAN_Q1 0x0001 /* Uninitialized HFSP */ |
8773 |
#define TPACPI_FAN_Q1 0x0001 /* Uninitialized HFSP */ |
8774 |
#define TPACPI_FAN_2FAN 0x0002 /* EC 0x31 bit 0 selects fan2 */ |
8774 |
#define TPACPI_FAN_2FAN 0x0002 /* EC 0x31 bit 0 selects fan2 */ |
8775 |
#define TPACPI_FAN_2CTL 0x0004 /* selects fan2 control */ |
8775 |
#define TPACPI_FAN_2CTL 0x0004 /* selects fan2 control */ |
8776 |
#define TPACPI_FAN_NOFAN 0x0008 /* no fan available */ |
8776 |
#define TPACPI_FAN_NOFAN 0x0008 /* no fan available */ |
8777 |
#define TPACPI_FAN_NS 0x0010 /* For EC with non-Standard register addresses */ |
8777 |
#define TPACPI_FAN_NS 0x0010 /* For EC with non-Standard register addresses */ |
|
|
8778 |
#define TPACPI_FAN_NACPI 0x0020 /* Don't use ACPI methods even if detected */ |
8778 |
|
8779 |
|
8779 |
static const struct tpacpi_quirk fan_quirk_table[] __initconst = { |
8780 |
static const struct tpacpi_quirk fan_quirk_table[] __initconst = { |
8780 |
TPACPI_QEC_IBM('1', 'Y', TPACPI_FAN_Q1), |
8781 |
TPACPI_QEC_IBM('1', 'Y', TPACPI_FAN_Q1), |
8781 |
TPACPI_QEC_IBM('7', '8', TPACPI_FAN_Q1), |
8782 |
TPACPI_QEC_IBM('7', '8', TPACPI_FAN_Q1), |
8782 |
TPACPI_QEC_IBM('7', '6', TPACPI_FAN_Q1), |
8783 |
TPACPI_QEC_IBM('7', '6', TPACPI_FAN_Q1), |
8783 |
TPACPI_QEC_IBM('7', '0', TPACPI_FAN_Q1), |
8784 |
TPACPI_QEC_IBM('7', '0', TPACPI_FAN_Q1), |
Lines 8800-8811
static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
Link Here
|
8800 |
TPACPI_Q_LNV3('R', '1', '0', TPACPI_FAN_NS), /* L390 */ |
8801 |
TPACPI_Q_LNV3('R', '1', '0', TPACPI_FAN_NS), /* L390 */ |
8801 |
TPACPI_Q_LNV3('N', '2', 'L', TPACPI_FAN_NS), /* X13 Yoga Gen 1 */ |
8802 |
TPACPI_Q_LNV3('N', '2', 'L', TPACPI_FAN_NS), /* X13 Yoga Gen 1 */ |
8802 |
TPACPI_Q_LNV3('R', '0', 'T', TPACPI_FAN_NS), /* 11e Gen5 GL */ |
8803 |
TPACPI_Q_LNV3('R', '0', 'T', TPACPI_FAN_NS), /* 11e Gen5 GL */ |
8803 |
TPACPI_Q_LNV3('R', '1', 'D', TPACPI_FAN_NS), /* 11e Gen5 GL-R */ |
8804 |
TPACPI_Q_LNV3('R', '1', 'D', TPACPI_FAN_NS), /* 11e Gen5 GL-R */ |
8804 |
TPACPI_Q_LNV3('R', '0', 'V', TPACPI_FAN_NS), /* 11e Gen5 KL-Y */ |
8805 |
TPACPI_Q_LNV3('R', '0', 'V', TPACPI_FAN_NS), /* 11e Gen5 KL-Y */ |
8805 |
TPACPI_Q_LNV3('N', '1', 'O', TPACPI_FAN_NOFAN), /* X1 Tablet (2nd gen) */ |
8806 |
TPACPI_Q_LNV3('N', '1', 'O', TPACPI_FAN_NOFAN), /* X1 Tablet (2nd gen) */ |
|
|
8807 |
TPACPI_Q_LNV3('R', '1', '2', TPACPI_FAN_NACPI), /* T495 */ |
8808 |
TPACPI_Q_LNV3('R', '1', '3', TPACPI_FAN_NACPI), /* T495s */ |
8806 |
}; |
8809 |
}; |
8807 |
|
8810 |
|
8808 |
static int __init fan_init(struct ibm_init_struct *iibm) |
8811 |
static int __init fan_init(struct ibm_init_struct *iibm) |
8809 |
{ |
8812 |
{ |
8810 |
unsigned long quirks; |
8813 |
unsigned long quirks; |
8811 |
|
8814 |
|
Lines 8843-8854
static int __init fan_init(struct ibm_init_struct *iibm)
Link Here
|
8843 |
if (quirks & TPACPI_FAN_NS) { |
8846 |
if (quirks & TPACPI_FAN_NS) { |
8844 |
pr_info("ECFW with non-standard fan reg control found\n"); |
8847 |
pr_info("ECFW with non-standard fan reg control found\n"); |
8845 |
fan_with_ns_addr = 1; |
8848 |
fan_with_ns_addr = 1; |
8846 |
/* Fan ctrl support from host is undefined for now */ |
8849 |
/* Fan ctrl support from host is undefined for now */ |
8847 |
tp_features.fan_ctrl_status_undef = 1; |
8850 |
tp_features.fan_ctrl_status_undef = 1; |
8848 |
} |
8851 |
} |
|
|
8852 |
if (quirks & TPACPI_FAN_NACPI) { |
8853 |
pr_info("Ignoring buggy ACPI fan access method\n"); |
8854 |
gfan_handle = NULL; |
8855 |
sfan_handle = NULL; |
8856 |
fang_handle = NULL; |
8857 |
fanw_handle = NULL; |
8858 |
} |
8849 |
|
8859 |
|
8850 |
if (gfan_handle) { |
8860 |
if (gfan_handle) { |
8851 |
/* 570, 600e/x, 770e, 770x */ |
8861 |
/* 570, 600e/x, 770e, 770x */ |
8852 |
fan_status_access_mode = TPACPI_FAN_RD_ACPI_GFAN; |
8862 |
fan_status_access_mode = TPACPI_FAN_RD_ACPI_GFAN; |
8853 |
} else if (fang_handle) { |
8863 |
} else if (fang_handle) { |
8854 |
/* E531 */ |
8864 |
/* E531 */ |