Felix Held | 3f3eca9 | 2020-01-23 17:12:32 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 2 | |
| 3 | #include <device/device.h> |
| 4 | #include <device/pnp.h> |
Ted Kuo | 4e8f23b | 2015-03-18 10:42:22 +0800 | [diff] [blame] | 5 | #include <console/console.h> |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 6 | #include <pc80/keyboard.h> |
| 7 | #include <arch/io.h> |
Ryan Lin | bd97885 | 2014-09-22 23:29:16 -0700 | [diff] [blame] | 8 | #include <delay.h> |
Edward O'Callaghan | 0f7ec31 | 2014-11-01 12:11:58 +1100 | [diff] [blame] | 9 | #include <superio/conf_mode.h> |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 10 | #include <superio/hwm5_conf.h> |
Edward O'Callaghan | 0f7ec31 | 2014-11-01 12:11:58 +1100 | [diff] [blame] | 11 | |
Edward O'Callaghan | def00be | 2014-04-30 05:01:52 +1000 | [diff] [blame] | 12 | #include "chip.h" /* FIXME */ |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 13 | #include "it8772f.h" |
| 14 | |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 15 | /* FIXME: see if the common ITE environment controller code can be used here */ |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 16 | |
Ryan Lin | bd97885 | 2014-09-22 23:29:16 -0700 | [diff] [blame] | 17 | static void it8772f_extemp_force_idle_status(struct resource *res) |
| 18 | { |
| 19 | u8 reg; |
| 20 | int retries = 10; |
| 21 | |
| 22 | /* Wait up to 10ms for non-busy state. */ |
| 23 | while (retries > 0) { |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 24 | reg = pnp_read_hwm5_index(res->base, IT8772F_EXTEMP_STATUS); |
Ryan Lin | bd97885 | 2014-09-22 23:29:16 -0700 | [diff] [blame] | 25 | |
| 26 | if ((reg & IT8772F_EXTEMP_STATUS_HOST_BUSY) == 0x0) |
| 27 | break; |
| 28 | |
| 29 | retries--; |
| 30 | |
| 31 | mdelay(1); |
| 32 | } |
| 33 | |
| 34 | if (retries == 0 && (reg & IT8772F_EXTEMP_STATUS_HOST_BUSY) == 0x1) { |
| 35 | /* |
| 36 | * SIO is busy due to unfinished peci transaction. |
| 37 | * Re-configure Register 0x8E to terminate processes. |
| 38 | */ |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 39 | pnp_write_hwm5_index(res->base, IT8772F_EXTEMP_CONTROL, |
Ryan Lin | bd97885 | 2014-09-22 23:29:16 -0700 | [diff] [blame] | 40 | IT8772F_EXTEMP_CONTROL_AUTO_4HZ | |
| 41 | IT8772F_EXTEMP_CONTROL_AUTO_START); |
| 42 | } |
| 43 | } |
| 44 | |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 45 | /* |
| 46 | * Setup External Temperature to read via PECI into TMPINx register |
| 47 | */ |
| 48 | static void it8772f_enable_peci(struct resource *res, int tmpin) |
| 49 | { |
| 50 | if (tmpin < 1 || tmpin > 3) |
| 51 | return; |
| 52 | |
| 53 | /* Enable PECI interface */ |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 54 | pnp_write_hwm5_index(res->base, IT8772F_INTERFACE_SELECT, |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 55 | IT8772F_INTERFACE_SEL_PECI | |
| 56 | IT8772F_INTERFACE_SPEED_TOLERANCE); |
| 57 | |
| 58 | /* Setup External Temperature using PECI GetTemp */ |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 59 | pnp_write_hwm5_index(res->base, IT8772F_EXTEMP_ADDRESS, |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 60 | PECI_CLIENT_ADDRESS); |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 61 | pnp_write_hwm5_index(res->base, IT8772F_EXTEMP_COMMAND, |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 62 | PECI_GETTEMP_COMMAND); |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 63 | pnp_write_hwm5_index(res->base, IT8772F_EXTEMP_WRITE_LENGTH, |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 64 | PECI_GETTEMP_WRITE_LENGTH); |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 65 | pnp_write_hwm5_index(res->base, IT8772F_EXTEMP_READ_LENGTH, |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 66 | PECI_GETTEMP_READ_LENGTH); |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 67 | pnp_write_hwm5_index(res->base, IT8772F_EXTEMP_CONTROL, |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 68 | IT8772F_EXTEMP_CONTROL_AUTO_4HZ | |
| 69 | IT8772F_EXTEMP_CONTROL_AUTO_START); |
| 70 | |
| 71 | /* External Temperature reported in TMPINx register */ |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 72 | pnp_write_hwm5_index(res->base, IT8772F_ADC_TEMP_CHANNEL_ENABLE, |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 73 | (tmpin & 3) << 6); |
| 74 | } |
| 75 | |
| 76 | /* |
Ted Kuo | 4e8f23b | 2015-03-18 10:42:22 +0800 | [diff] [blame] | 77 | * Set up External Temperature to read via thermal diode/resistor |
| 78 | * into TMPINx register |
| 79 | */ |
| 80 | static void it8772f_enable_tmpin(struct resource *res, int tmpin, |
| 81 | enum thermal_mode mode) |
| 82 | { |
| 83 | u8 reg; |
| 84 | |
| 85 | if (tmpin != 1 && tmpin != 2) |
| 86 | return; |
| 87 | |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 88 | reg = pnp_read_hwm5_index(res->base, IT8772F_ADC_TEMP_CHANNEL_ENABLE); |
Ted Kuo | 4e8f23b | 2015-03-18 10:42:22 +0800 | [diff] [blame] | 89 | |
| 90 | switch (mode) { |
| 91 | case THERMAL_DIODE: |
| 92 | /* Thermal Diode Mode */ |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 93 | pnp_write_hwm5_index(res->base, IT8772F_ADC_TEMP_CHANNEL_ENABLE, |
Ted Kuo | 4e8f23b | 2015-03-18 10:42:22 +0800 | [diff] [blame] | 94 | reg | tmpin); |
| 95 | break; |
| 96 | case THERMAL_RESISTOR: |
| 97 | /* Thermal Resistor Mode */ |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 98 | pnp_write_hwm5_index(res->base, IT8772F_ADC_TEMP_CHANNEL_ENABLE, |
Ted Kuo | 4e8f23b | 2015-03-18 10:42:22 +0800 | [diff] [blame] | 99 | reg | (tmpin << 3)); |
| 100 | break; |
| 101 | default: |
| 102 | printk(BIOS_ERR, "Unsupported thermal mode 0x%x on TMPIN%d\n", |
| 103 | mode, tmpin); |
| 104 | return; |
| 105 | } |
| 106 | |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 107 | reg = pnp_read_hwm5_index(res->base, IT8772F_CONFIGURATION); |
Ted Kuo | 4e8f23b | 2015-03-18 10:42:22 +0800 | [diff] [blame] | 108 | |
| 109 | /* Enable the startup of monitoring operation */ |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 110 | pnp_write_hwm5_index(res->base, IT8772F_CONFIGURATION, reg | 0x01); |
Ted Kuo | 4e8f23b | 2015-03-18 10:42:22 +0800 | [diff] [blame] | 111 | } |
| 112 | |
| 113 | /* |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 114 | * Setup a FAN PWM interface for software control |
| 115 | */ |
Ted Kuo | 08debac | 2015-03-27 18:59:07 +0800 | [diff] [blame] | 116 | static void it8772f_enable_fan(struct resource *res, int fan, u8 fan_speed) |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 117 | { |
| 118 | u8 reg; |
| 119 | |
| 120 | if (fan < 1 || fan > 3) |
| 121 | return; |
| 122 | |
| 123 | /* Enable 6MHz (23.43kHz PWM) active high output */ |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 124 | reg = pnp_read_hwm5_index(res->base, IT8772F_FAN_CTL_MODE); |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 125 | reg |= IT8772F_FAN_CTL_ON(fan) | |
| 126 | IT8772F_FAN_PWM_CLOCK_6MHZ | |
| 127 | IT8772F_FAN_CTL_POLARITY_HIGH; |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 128 | pnp_write_hwm5_index(res->base, IT8772F_FAN_CTL_MODE, reg); |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 129 | |
| 130 | /* Enable output in smart mode */ |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 131 | reg = pnp_read_hwm5_index(res->base, IT8772F_FAN_MAIN_CTL); |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 132 | reg |= IT8772F_FAN_MAIN_CTL_TAC_SMART(fan); |
| 133 | reg |= IT8772F_FAN_MAIN_CTL_TAC_EN(fan); |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 134 | pnp_write_hwm5_index(res->base, IT8772F_FAN_MAIN_CTL, reg); |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 135 | |
| 136 | switch (fan) { |
| 137 | case 2: |
| 138 | /* Enable software operation */ |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 139 | pnp_write_hwm5_index(res->base, IT8772F_FAN_CTL2_PWM_MODE, |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 140 | IT8772F_FAN_CTL_PWM_MODE_SOFTWARE); |
| 141 | /* Disable Smoothing */ |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 142 | pnp_write_hwm5_index(res->base, IT8772F_FAN_CTL2_AUTO_MODE, |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 143 | IT8772F_FAN_CTL_AUTO_SMOOTHING_DIS); |
Ted Kuo | 08debac | 2015-03-27 18:59:07 +0800 | [diff] [blame] | 144 | /* Set a default fan speed */ |
| 145 | if (fan_speed) |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 146 | pnp_write_hwm5_index(res->base, IT8772F_FAN_CTL2_PWM_START, |
Ted Kuo | 08debac | 2015-03-27 18:59:07 +0800 | [diff] [blame] | 147 | fan_speed); |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 148 | break; |
| 149 | case 3: |
| 150 | /* Enable software operation */ |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 151 | pnp_write_hwm5_index(res->base, IT8772F_FAN_CTL3_PWM_MODE, |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 152 | IT8772F_FAN_CTL_PWM_MODE_SOFTWARE); |
| 153 | /* Disable Smoothing */ |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 154 | pnp_write_hwm5_index(res->base, IT8772F_FAN_CTL3_AUTO_MODE, |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 155 | IT8772F_FAN_CTL_AUTO_SMOOTHING_DIS); |
Ted Kuo | 08debac | 2015-03-27 18:59:07 +0800 | [diff] [blame] | 156 | /* Set a default fan speed */ |
| 157 | if (fan_speed) |
Felix Held | fa120eb | 2019-10-07 18:45:10 +0200 | [diff] [blame] | 158 | pnp_write_hwm5_index(res->base, IT8772F_FAN_CTL3_PWM_START, |
Ted Kuo | 08debac | 2015-03-27 18:59:07 +0800 | [diff] [blame] | 159 | fan_speed); |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 160 | break; |
| 161 | } |
| 162 | } |
| 163 | |
Edward O'Callaghan | f21bdc3 | 2014-10-21 07:43:41 +1100 | [diff] [blame] | 164 | static void it8772f_init(struct device *dev) |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 165 | { |
| 166 | struct superio_ite_it8772f_config *conf = dev->chip_info; |
| 167 | struct resource *res; |
| 168 | |
| 169 | if (!dev->enabled) |
| 170 | return; |
| 171 | |
| 172 | switch (dev->path.pnp.device) { |
| 173 | case IT8772F_EC: |
Angel Pons | c167b74 | 2021-11-03 13:25:02 +0100 | [diff] [blame^] | 174 | res = probe_resource(dev, PNP_IDX_IO0); |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 175 | if (!res) |
| 176 | break; |
| 177 | |
| 178 | /* Enable PECI if configured */ |
| 179 | it8772f_enable_peci(res, conf->peci_tmpin); |
| 180 | |
Ted Kuo | 4e8f23b | 2015-03-18 10:42:22 +0800 | [diff] [blame] | 181 | /* Enable HWM if configured */ |
| 182 | if (conf->tmpin1_mode != THERMAL_MODE_DISABLED) |
| 183 | it8772f_enable_tmpin(res, 1, conf->tmpin1_mode); |
| 184 | if (conf->tmpin2_mode != THERMAL_MODE_DISABLED) |
| 185 | it8772f_enable_tmpin(res, 2, conf->tmpin2_mode); |
| 186 | |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 187 | /* Enable FANx if configured */ |
| 188 | if (conf->fan1_enable) |
Ted Kuo | 08debac | 2015-03-27 18:59:07 +0800 | [diff] [blame] | 189 | it8772f_enable_fan(res, 1, 0); |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 190 | if (conf->fan2_enable) |
Ted Kuo | 08debac | 2015-03-27 18:59:07 +0800 | [diff] [blame] | 191 | it8772f_enable_fan(res, 2, |
| 192 | conf->fan2_speed ? conf->fan2_speed : 0x80); |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 193 | if (conf->fan3_enable) |
Ted Kuo | 08debac | 2015-03-27 18:59:07 +0800 | [diff] [blame] | 194 | it8772f_enable_fan(res, 3, |
| 195 | conf->fan3_speed ? conf->fan3_speed : 0x80); |
Ryan Lin | bd97885 | 2014-09-22 23:29:16 -0700 | [diff] [blame] | 196 | |
| 197 | /* |
| 198 | * System may get wrong temperature data when SIO is in |
| 199 | * busy state. Therefore, check the status and terminate |
| 200 | * processes if needed. |
| 201 | */ |
| 202 | it8772f_extemp_force_idle_status(res); |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 203 | break; |
| 204 | case IT8772F_GPIO: |
| 205 | /* Set GPIO output levels */ |
Angel Pons | c167b74 | 2021-11-03 13:25:02 +0100 | [diff] [blame^] | 206 | res = probe_resource(dev, PNP_IDX_IO1); |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 207 | if (res) { |
| 208 | if (conf->gpio_set1) |
| 209 | outb(conf->gpio_set1, res->base + 0); |
| 210 | if (conf->gpio_set2) |
| 211 | outb(conf->gpio_set2, res->base + 1); |
| 212 | if (conf->gpio_set3) |
| 213 | outb(conf->gpio_set3, res->base + 2); |
| 214 | if (conf->gpio_set4) |
| 215 | outb(conf->gpio_set4, res->base + 3); |
| 216 | if (conf->gpio_set5) |
| 217 | outb(conf->gpio_set5, res->base + 4); |
| 218 | if (conf->gpio_set6) |
| 219 | outb(conf->gpio_set6, res->base + 5); |
| 220 | } |
| 221 | break; |
| 222 | case IT8772F_KBCK: |
| 223 | if (!conf->skip_keyboard) { |
| 224 | set_kbc_ps2_mode(); |
Timothy Pearson | 448e386 | 2015-11-24 14:12:01 -0600 | [diff] [blame] | 225 | pc_keyboard_init(NO_AUX_DEVICE); |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 226 | } |
| 227 | break; |
| 228 | case IT8772F_KBCM: |
| 229 | break; |
| 230 | case IT8772F_IR: |
| 231 | break; |
| 232 | } |
| 233 | } |
| 234 | |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 235 | static struct device_operations ops = { |
Nico Huber | 9cb0941 | 2013-06-15 15:30:19 +0200 | [diff] [blame] | 236 | .read_resources = pnp_read_resources, |
Nico Huber | 0b2ee93 | 2013-06-15 19:58:35 +0200 | [diff] [blame] | 237 | .set_resources = pnp_set_resources, |
| 238 | .enable_resources = pnp_enable_resources, |
| 239 | .enable = pnp_alt_enable, |
Nico Huber | 9cb0941 | 2013-06-15 15:30:19 +0200 | [diff] [blame] | 240 | .init = it8772f_init, |
Edward O'Callaghan | 0f7ec31 | 2014-11-01 12:11:58 +1100 | [diff] [blame] | 241 | .ops_pnp_mode = &pnp_conf_mode_870155_aa, |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 242 | }; |
| 243 | |
| 244 | static struct pnp_info pnp_dev_info[] = { |
| 245 | /* Floppy Disk Controller */ |
Felix Held | c40275b | 2017-12-27 22:11:30 +0100 | [diff] [blame] | 246 | { NULL, IT8772F_FDC, PNP_IO0 | PNP_IRQ0, 0x0ff8, }, |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 247 | /* Serial Port 1 */ |
Felix Held | c40275b | 2017-12-27 22:11:30 +0100 | [diff] [blame] | 248 | { NULL, IT8772F_SP1, PNP_IO0 | PNP_IRQ0, 0x0ff8, }, |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 249 | /* Environmental Controller */ |
Felix Held | c40275b | 2017-12-27 22:11:30 +0100 | [diff] [blame] | 250 | { NULL, IT8772F_EC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | |
Damien Zammit | 62c0276 | 2015-12-28 23:04:47 +1100 | [diff] [blame] | 251 | PNP_MSC4 | PNP_MSCA, |
Samuel Holland | 7daac91 | 2017-06-06 22:55:01 -0500 | [diff] [blame] | 252 | 0x0ff8, 0x0ffc, }, |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 253 | /* KBC Keyboard */ |
Felix Held | c40275b | 2017-12-27 22:11:30 +0100 | [diff] [blame] | 254 | { NULL, IT8772F_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, |
Samuel Holland | 7daac91 | 2017-06-06 22:55:01 -0500 | [diff] [blame] | 255 | 0x0fff, 0x0fff, }, |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 256 | /* KBC Mouse */ |
Felix Held | c40275b | 2017-12-27 22:11:30 +0100 | [diff] [blame] | 257 | { NULL, IT8772F_KBCM, PNP_IRQ0, }, |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 258 | /* 27 GPIOs */ |
Felix Held | c40275b | 2017-12-27 22:11:30 +0100 | [diff] [blame] | 259 | { NULL, IT8772F_GPIO, PNP_IO0 | PNP_IO1, |
Samuel Holland | 7daac91 | 2017-06-06 22:55:01 -0500 | [diff] [blame] | 260 | 0x0fff, 0x0ff8, }, |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 261 | /* Infrared */ |
Felix Held | c40275b | 2017-12-27 22:11:30 +0100 | [diff] [blame] | 262 | { NULL, IT8772F_IR, PNP_IO0 | PNP_IRQ0, 0x0ff8, }, |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 263 | }; |
| 264 | |
| 265 | static void enable_dev(struct device *dev) |
| 266 | { |
Felix Held | c40275b | 2017-12-27 22:11:30 +0100 | [diff] [blame] | 267 | pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info); |
Stefan Reinauer | b0dd1d9 | 2012-03-30 15:04:07 -0700 | [diff] [blame] | 268 | } |
| 269 | |
| 270 | struct chip_operations superio_ite_it8772f_ops = { |
| 271 | CHIP_NAME("ITE IT8772F Super I/O") |
| 272 | .enable_dev = enable_dev, |
| 273 | }; |