Lines Matching +full:lpc +full:- +full:io +full:- +full:reg
1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (c) 2006-2007 Jorge Boncompte - DTI2 <jorge@dti2.net>
11 * IT8712F EC-LPC I/O Preliminary Specification 0.8.2
12 * IT8712F EC-LPC I/O Preliminary Specification 0.9.3
16 * software is provided AS-IS with no warranties.
31 #include <linux/io.h>
36 MODULE_AUTHOR("Jorge Boncompte - DTI2 <jorge@dti2.net>");
53 /* Dog Food address - We use the game port address */
56 #define REG 0x2e /* The register to read/write */ macro
92 static int superio_inb(int reg) in superio_inb() argument
94 outb(reg, REG); in superio_inb()
98 static void superio_outb(int val, int reg) in superio_outb() argument
100 outb(reg, REG); in superio_outb()
104 static int superio_inw(int reg) in superio_inw() argument
107 outb(reg++, REG); in superio_inw()
109 outb(reg, REG); in superio_inw()
116 outb(LDN, REG); in superio_select()
123 * Try to reserve REG and REG + 1 for exclusive access. in superio_enter()
125 if (!request_muxed_region(REG, 2, NAME)) in superio_enter()
126 return -EBUSY; in superio_enter()
128 outb(0x87, REG); in superio_enter()
129 outb(0x01, REG); in superio_enter()
130 outb(0x55, REG); in superio_enter()
131 outb(0x55, REG); in superio_enter()
137 outb(0x02, REG); in superio_exit()
139 release_region(REG, 2); in superio_exit()
244 return -EFAULT; in it8712f_wdt_write()
270 return -EFAULT; in it8712f_wdt_ioctl()
290 return -EFAULT; in it8712f_wdt_ioctl()
292 return -EINVAL; in it8712f_wdt_ioctl()
294 return -EINVAL; in it8712f_wdt_ioctl()
308 return -EFAULT; in it8712f_wdt_ioctl()
311 return -ENOTTY; in it8712f_wdt_ioctl()
320 return -EBUSY; in it8712f_wdt_open()
360 int err = -ENODEV; in it8712f_wdt_find()
386 /* Later revisions have 16-bit values per datasheet 0.9.1 */ in it8712f_wdt_find()
393 pr_info("Found IT%04xF chip revision %d - using DogFood address 0x%x\n", in it8712f_wdt_find()
406 return -ENODEV; in it8712f_wdt_init()
410 return -EBUSY; in it8712f_wdt_init()