Lines Matching refs:sio_data
104 void (*sio_outb)(struct nct6775_sio_data *sio_data, int reg, int val);
105 int (*sio_inb)(struct nct6775_sio_data *sio_data, int reg);
106 void (*sio_select)(struct nct6775_sio_data *sio_data, int ld);
107 int (*sio_enter)(struct nct6775_sio_data *sio_data);
108 void (*sio_exit)(struct nct6775_sio_data *sio_data);
178 static int superio_wmi_inb(struct nct6775_sio_data *sio_data, int reg) in superio_wmi_inb() argument
182 nct6775_asuswmi_evaluate_method(ASUSWMI_METHODID_RSIO, sio_data->ld, in superio_wmi_inb()
187 static void superio_wmi_outb(struct nct6775_sio_data *sio_data, int reg, int val) in superio_wmi_outb() argument
189 nct6775_asuswmi_evaluate_method(ASUSWMI_METHODID_WSIO, sio_data->ld, in superio_wmi_outb()
193 static void superio_wmi_select(struct nct6775_sio_data *sio_data, int ld) in superio_wmi_select() argument
195 sio_data->ld = ld; in superio_wmi_select()
198 static int superio_wmi_enter(struct nct6775_sio_data *sio_data) in superio_wmi_enter() argument
203 static void superio_wmi_exit(struct nct6775_sio_data *sio_data) in superio_wmi_exit() argument
207 static void superio_outb(struct nct6775_sio_data *sio_data, int reg, int val) in superio_outb() argument
209 int ioreg = sio_data->sioreg; in superio_outb()
215 static int superio_inb(struct nct6775_sio_data *sio_data, int reg) in superio_inb() argument
217 int ioreg = sio_data->sioreg; in superio_inb()
223 static void superio_select(struct nct6775_sio_data *sio_data, int ld) in superio_select() argument
225 int ioreg = sio_data->sioreg; in superio_select()
231 static int superio_enter(struct nct6775_sio_data *sio_data) in superio_enter() argument
233 int ioreg = sio_data->sioreg; in superio_enter()
247 static void superio_exit(struct nct6775_sio_data *sio_data) in superio_exit() argument
249 int ioreg = sio_data->sioreg; in superio_exit()
358 static void nct6791_enable_io_mapping(struct nct6775_sio_data *sio_data) in nct6791_enable_io_mapping() argument
362 val = sio_data->sio_inb(sio_data, NCT6791_REG_HM_IO_SPACE_LOCK_ENABLE); in nct6791_enable_io_mapping()
365 sio_data->sio_outb(sio_data, NCT6791_REG_HM_IO_SPACE_LOCK_ENABLE, in nct6791_enable_io_mapping()
404 struct nct6775_sio_data *sio_data = dev_get_platdata(dev); in nct6775_resume() local
411 err = sio_data->sio_enter(sio_data); in nct6775_resume()
415 sio_data->sio_select(sio_data, NCT6775_LD_HWM); in nct6775_resume()
416 reg = sio_data->sio_inb(sio_data, SIO_REG_ENABLE); in nct6775_resume()
418 sio_data->sio_outb(sio_data, SIO_REG_ENABLE, data->sio_reg_enable); in nct6775_resume()
424 nct6791_enable_io_mapping(sio_data); in nct6775_resume()
426 sio_data->sio_exit(sio_data); in nct6775_resume()
485 nct6775_check_fan_inputs(struct nct6775_data *data, struct nct6775_sio_data *sio_data) in nct6775_check_fan_inputs() argument
493 sio_data->sio_select(sio_data, NCT6775_LD_HWM); in nct6775_check_fan_inputs()
494 data->sio_reg_enable = sio_data->sio_inb(sio_data, SIO_REG_ENABLE); in nct6775_check_fan_inputs()
498 int cr2c = sio_data->sio_inb(sio_data, 0x2c); in nct6775_check_fan_inputs()
504 fan4pin = !(sio_data->sio_inb(sio_data, 0x2A) & 0x80); in nct6775_check_fan_inputs()
506 bool gpok = sio_data->sio_inb(sio_data, 0x27) & 0x80; in nct6775_check_fan_inputs()
522 sio_data->sio_outb(sio_data, SIO_REG_ENABLE, in nct6775_check_fan_inputs()
531 fan3pin = !(sio_data->sio_inb(sio_data, 0x24) & 0x40); in nct6775_check_fan_inputs()
536 fan4pin = sio_data->sio_inb(sio_data, 0x1C) & 0x01; in nct6775_check_fan_inputs()
541 fan5pin = sio_data->sio_inb(sio_data, 0x1C) & 0x02; in nct6775_check_fan_inputs()
546 int cr24 = sio_data->sio_inb(sio_data, 0x24); in nct6775_check_fan_inputs()
551 int cr1a = sio_data->sio_inb(sio_data, 0x1a); in nct6775_check_fan_inputs()
552 int cr1b = sio_data->sio_inb(sio_data, 0x1b); in nct6775_check_fan_inputs()
553 int cr24 = sio_data->sio_inb(sio_data, 0x24); in nct6775_check_fan_inputs()
554 int cr2a = sio_data->sio_inb(sio_data, 0x2a); in nct6775_check_fan_inputs()
555 int cr2b = sio_data->sio_inb(sio_data, 0x2b); in nct6775_check_fan_inputs()
556 int cr2f = sio_data->sio_inb(sio_data, 0x2f); in nct6775_check_fan_inputs()
572 int cr1a = sio_data->sio_inb(sio_data, 0x1a); in nct6775_check_fan_inputs()
573 int cr1b = sio_data->sio_inb(sio_data, 0x1b); in nct6775_check_fan_inputs()
574 int cr1c = sio_data->sio_inb(sio_data, 0x1c); in nct6775_check_fan_inputs()
575 int cr1d = sio_data->sio_inb(sio_data, 0x1d); in nct6775_check_fan_inputs()
576 int cr2a = sio_data->sio_inb(sio_data, 0x2a); in nct6775_check_fan_inputs()
577 int cr2b = sio_data->sio_inb(sio_data, 0x2b); in nct6775_check_fan_inputs()
578 int cr2d = sio_data->sio_inb(sio_data, 0x2d); in nct6775_check_fan_inputs()
579 int cr2f = sio_data->sio_inb(sio_data, 0x2f); in nct6775_check_fan_inputs()
589 cre6 = sio_data->sio_inb(sio_data, 0xe6); in nct6775_check_fan_inputs()
591 sio_data->sio_select(sio_data, NCT6775_LD_12); in nct6775_check_fan_inputs()
592 cre0 = sio_data->sio_inb(sio_data, 0xe0); in nct6775_check_fan_inputs()
593 creb = sio_data->sio_inb(sio_data, 0xeb); in nct6775_check_fan_inputs()
594 cred = sio_data->sio_inb(sio_data, 0xed); in nct6775_check_fan_inputs()
753 struct nct6775_sio_data *sio_data = data->driver_data; in clear_caseopen() local
769 ret = sio_data->sio_enter(sio_data); in clear_caseopen()
775 sio_data->sio_select(sio_data, NCT6775_LD_ACPI); in clear_caseopen()
776 reg = sio_data->sio_inb(sio_data, NCT6775_REG_CR_CASEOPEN_CLR[nr]); in clear_caseopen()
778 sio_data->sio_outb(sio_data, NCT6775_REG_CR_CASEOPEN_CLR[nr], reg); in clear_caseopen()
780 sio_data->sio_outb(sio_data, NCT6775_REG_CR_CASEOPEN_CLR[nr], reg); in clear_caseopen()
781 sio_data->sio_exit(sio_data); in clear_caseopen()
847 struct nct6775_sio_data *sio_data = data->driver_data; in nct6775_platform_probe_init() local
849 err = sio_data->sio_enter(sio_data); in nct6775_platform_probe_init()
853 cr2a = sio_data->sio_inb(sio_data, 0x2a); in nct6775_platform_probe_init()
880 sio_data->sio_select(sio_data, NCT6775_LD_VID); in nct6775_platform_probe_init()
881 data->vid = sio_data->sio_inb(sio_data, 0xe3); in nct6775_platform_probe_init()
888 sio_data->sio_select(sio_data, NCT6775_LD_HWM); in nct6775_platform_probe_init()
889 tmp = sio_data->sio_inb(sio_data, in nct6775_platform_probe_init()
914 sio_data->sio_outb(sio_data, NCT6775_REG_CR_FAN_DEBOUNCE, in nct6775_platform_probe_init()
919 nct6775_check_fan_inputs(data, sio_data); in nct6775_platform_probe_init()
921 sio_data->sio_exit(sio_data); in nct6775_platform_probe_init()
943 struct nct6775_sio_data *sio_data = dev_get_platdata(dev); in nct6775_platform_probe() local
948 if (sio_data->access == access_direct) { in nct6775_platform_probe()
958 data->kind = sio_data->kind; in nct6775_platform_probe()
959 data->sioreg = sio_data->sioreg; in nct6775_platform_probe()
961 if (sio_data->access == access_direct) { in nct6775_platform_probe()
970 data->driver_data = sio_data; in nct6775_platform_probe()
985 static int __init nct6775_find(int sioaddr, struct nct6775_sio_data *sio_data) in nct6775_find() argument
991 sio_data->access = access_direct; in nct6775_find()
992 sio_data->sioreg = sioaddr; in nct6775_find()
994 err = sio_data->sio_enter(sio_data); in nct6775_find()
998 val = (sio_data->sio_inb(sio_data, SIO_REG_DEVID) << 8) | in nct6775_find()
999 sio_data->sio_inb(sio_data, SIO_REG_DEVID + 1); in nct6775_find()
1005 sio_data->kind = nct6106; in nct6775_find()
1008 sio_data->kind = nct6116; in nct6775_find()
1011 sio_data->kind = nct6775; in nct6775_find()
1014 sio_data->kind = nct6776; in nct6775_find()
1017 sio_data->kind = nct6779; in nct6775_find()
1020 sio_data->kind = nct6791; in nct6775_find()
1023 sio_data->kind = nct6792; in nct6775_find()
1026 sio_data->kind = nct6793; in nct6775_find()
1029 sio_data->kind = nct6795; in nct6775_find()
1032 sio_data->kind = nct6796; in nct6775_find()
1035 sio_data->kind = nct6797; in nct6775_find()
1038 sio_data->kind = nct6798; in nct6775_find()
1041 sio_data->kind = nct6799; in nct6775_find()
1046 sio_data->sio_exit(sio_data); in nct6775_find()
1051 sio_data->sio_select(sio_data, NCT6775_LD_HWM); in nct6775_find()
1052 val = (sio_data->sio_inb(sio_data, SIO_REG_ADDR) << 8) in nct6775_find()
1053 | sio_data->sio_inb(sio_data, SIO_REG_ADDR + 1); in nct6775_find()
1057 sio_data->sio_exit(sio_data); in nct6775_find()
1062 val = sio_data->sio_inb(sio_data, SIO_REG_ENABLE); in nct6775_find()
1065 sio_data->sio_outb(sio_data, SIO_REG_ENABLE, val | 0x01); in nct6775_find()
1068 if (sio_data->kind == nct6791 || sio_data->kind == nct6792 || in nct6775_find()
1069 sio_data->kind == nct6793 || sio_data->kind == nct6795 || in nct6775_find()
1070 sio_data->kind == nct6796 || sio_data->kind == nct6797 || in nct6775_find()
1071 sio_data->kind == nct6798 || sio_data->kind == nct6799) in nct6775_find()
1072 nct6791_enable_io_mapping(sio_data); in nct6775_find()
1074 sio_data->sio_exit(sio_data); in nct6775_find()
1076 nct6775_sio_names[sio_data->kind], sioaddr, addr); in nct6775_find()
1506 struct nct6775_sio_data sio_data; in sensors_nct6775_platform_init() local
1539 sio_data.sio_outb = superio_outb; in sensors_nct6775_platform_init()
1540 sio_data.sio_inb = superio_inb; in sensors_nct6775_platform_init()
1541 sio_data.sio_select = superio_select; in sensors_nct6775_platform_init()
1542 sio_data.sio_enter = superio_enter; in sensors_nct6775_platform_init()
1543 sio_data.sio_exit = superio_exit; in sensors_nct6775_platform_init()
1545 address = nct6775_find(sioaddr[i], &sio_data); in sensors_nct6775_platform_init()
1551 sio_data.access = access; in sensors_nct6775_platform_init()
1554 sio_data.sio_outb = superio_wmi_outb; in sensors_nct6775_platform_init()
1555 sio_data.sio_inb = superio_wmi_inb; in sensors_nct6775_platform_init()
1556 sio_data.sio_select = superio_wmi_select; in sensors_nct6775_platform_init()
1557 sio_data.sio_enter = superio_wmi_enter; in sensors_nct6775_platform_init()
1558 sio_data.sio_exit = superio_wmi_exit; in sensors_nct6775_platform_init()
1567 err = platform_device_add_data(pdev[i], &sio_data, in sensors_nct6775_platform_init()
1572 if (sio_data.access == access_direct) { in sensors_nct6775_platform_init()