18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Include file for NEC VR4100 series General-purpose I/O Unit. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2005-2009 Yoichi Yuasa <yuasa@linux-mips.org> 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci#ifndef __NEC_VR41XX_GIU_H 88c2ecf20Sopenharmony_ci#define __NEC_VR41XX_GIU_H 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci/* 118c2ecf20Sopenharmony_ci * NEC VR4100 series GIU platform device IDs. 128c2ecf20Sopenharmony_ci */ 138c2ecf20Sopenharmony_cienum { 148c2ecf20Sopenharmony_ci GPIO_50PINS_PULLUPDOWN, 158c2ecf20Sopenharmony_ci GPIO_36PINS, 168c2ecf20Sopenharmony_ci GPIO_48PINS_EDGE_SELECT, 178c2ecf20Sopenharmony_ci}; 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_citypedef enum { 208c2ecf20Sopenharmony_ci IRQ_TRIGGER_LEVEL, 218c2ecf20Sopenharmony_ci IRQ_TRIGGER_EDGE, 228c2ecf20Sopenharmony_ci IRQ_TRIGGER_EDGE_FALLING, 238c2ecf20Sopenharmony_ci IRQ_TRIGGER_EDGE_RISING, 248c2ecf20Sopenharmony_ci} irq_trigger_t; 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_citypedef enum { 278c2ecf20Sopenharmony_ci IRQ_SIGNAL_THROUGH, 288c2ecf20Sopenharmony_ci IRQ_SIGNAL_HOLD, 298c2ecf20Sopenharmony_ci} irq_signal_t; 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ciextern void vr41xx_set_irq_trigger(unsigned int pin, irq_trigger_t trigger, 328c2ecf20Sopenharmony_ci irq_signal_t signal); 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_citypedef enum { 358c2ecf20Sopenharmony_ci IRQ_LEVEL_LOW, 368c2ecf20Sopenharmony_ci IRQ_LEVEL_HIGH, 378c2ecf20Sopenharmony_ci} irq_level_t; 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ciextern void vr41xx_set_irq_level(unsigned int pin, irq_level_t level); 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci#endif /* __NEC_VR41XX_GIU_H */ 42