gpio-it87.c (245f0db0de926601353776085e6f6a4c974c5615) gpio-it87.c (8fccdb580ebec0f5b081d824797911a4c5d91891)
1/*
2 * GPIO interface for IT87xx Super I/O chips
3 *
4 * Author: Diego Elio Pettenò <flameeyes@flameeyes.eu>
5 *
6 * Based on it87_wdt.c by Oliver Schuster
7 * gpio-it8761e.c by Denis Turischev
8 * gpio-stmpe.c by Rabin Vincent

--- 20 unchanged lines hidden (view full) ---

29#include <linux/io.h>
30#include <linux/errno.h>
31#include <linux/ioport.h>
32#include <linux/slab.h>
33#include <linux/gpio.h>
34
35/* Chip Id numbers */
36#define NO_DEV_ID 0xffff
1/*
2 * GPIO interface for IT87xx Super I/O chips
3 *
4 * Author: Diego Elio Pettenò <flameeyes@flameeyes.eu>
5 *
6 * Based on it87_wdt.c by Oliver Schuster
7 * gpio-it8761e.c by Denis Turischev
8 * gpio-stmpe.c by Rabin Vincent

--- 20 unchanged lines hidden (view full) ---

29#include <linux/io.h>
30#include <linux/errno.h>
31#include <linux/ioport.h>
32#include <linux/slab.h>
33#include <linux/gpio.h>
34
35/* Chip Id numbers */
36#define NO_DEV_ID 0xffff
37#define IT8620_ID 0x8620
38#define IT8628_ID 0x8628
37#define IT8728_ID 0x8728
38#define IT8732_ID 0x8732
39#define IT8761_ID 0x8761
40
41/* IO Ports */
42#define REG 0x2e
43#define VAL 0x2f
44

--- 252 unchanged lines hidden (view full) ---

297
298 chip_type = superio_inw(CHIPID);
299 chip_rev = superio_inb(CHIPREV) & 0x0f;
300 superio_exit();
301
302 it87_gpio->chip = it87_template_chip;
303
304 switch (chip_type) {
39#define IT8728_ID 0x8728
40#define IT8732_ID 0x8732
41#define IT8761_ID 0x8761
42
43/* IO Ports */
44#define REG 0x2e
45#define VAL 0x2f
46

--- 252 unchanged lines hidden (view full) ---

299
300 chip_type = superio_inw(CHIPID);
301 chip_rev = superio_inb(CHIPREV) & 0x0f;
302 superio_exit();
303
304 it87_gpio->chip = it87_template_chip;
305
306 switch (chip_type) {
307 case IT8620_ID:
308 case IT8628_ID:
309 gpio_ba_reg = 0x62;
310 it87_gpio->io_size = 11;
311 it87_gpio->output_base = 0xc8;
312 it87_gpio->simple_size = 0;
313 it87_gpio->chip.ngpio = 64;
314 break;
305 case IT8728_ID:
306 case IT8732_ID:
307 gpio_ba_reg = 0x62;
308 it87_gpio->io_size = 8;
309 it87_gpio->output_base = 0xc8;
310 it87_gpio->simple_base = 0xc0;
311 it87_gpio->simple_size = 5;
312 it87_gpio->chip.ngpio = 64;

--- 94 unchanged lines hidden ---
315 case IT8728_ID:
316 case IT8732_ID:
317 gpio_ba_reg = 0x62;
318 it87_gpio->io_size = 8;
319 it87_gpio->output_base = 0xc8;
320 it87_gpio->simple_base = 0xc0;
321 it87_gpio->simple_size = 5;
322 it87_gpio->chip.ngpio = 64;

--- 94 unchanged lines hidden ---