1*c8001490SAndriy Gapon /*- 2*c8001490SAndriy Gapon * SPDX-License-Identifier: BSD-2-Clause 3*c8001490SAndriy Gapon * 40aee3bdcSAndriy Gapon * Copyright (c) 2019 Andriy Gapon 50aee3bdcSAndriy Gapon * 60aee3bdcSAndriy Gapon * Redistribution and use in source and binary forms, with or without 70aee3bdcSAndriy Gapon * modification, are permitted provided that the following conditions 80aee3bdcSAndriy Gapon * are met: 90aee3bdcSAndriy Gapon * 1. Redistributions of source code must retain the above copyright 100aee3bdcSAndriy Gapon * notice, this list of conditions and the following disclaimer. 110aee3bdcSAndriy Gapon * 2. Redistributions in binary form must reproduce the above copyright 120aee3bdcSAndriy Gapon * notice, this list of conditions and the following disclaimer in the 130aee3bdcSAndriy Gapon * documentation and/or other materials provided with the distribution. 140aee3bdcSAndriy Gapon * 15*c8001490SAndriy Gapon * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 160aee3bdcSAndriy Gapon * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 170aee3bdcSAndriy Gapon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 180aee3bdcSAndriy Gapon * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 190aee3bdcSAndriy Gapon * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 200aee3bdcSAndriy Gapon * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 210aee3bdcSAndriy Gapon * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 220aee3bdcSAndriy Gapon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 230aee3bdcSAndriy Gapon * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 240aee3bdcSAndriy Gapon * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 250aee3bdcSAndriy Gapon * SUCH DAMAGE. 260aee3bdcSAndriy Gapon */ 270aee3bdcSAndriy Gapon 280aee3bdcSAndriy Gapon #ifndef SUPERIO_IO_H 290aee3bdcSAndriy Gapon #define SUPERIO_IO_H 300aee3bdcSAndriy Gapon 310aee3bdcSAndriy Gapon #include <sys/types.h> 320aee3bdcSAndriy Gapon 330aee3bdcSAndriy Gapon struct superiocmd { 340aee3bdcSAndriy Gapon uint8_t ldn; 350aee3bdcSAndriy Gapon uint8_t cr; 360aee3bdcSAndriy Gapon uint8_t val; 370aee3bdcSAndriy Gapon }; 380aee3bdcSAndriy Gapon 390aee3bdcSAndriy Gapon #define SUPERIO_CR_READ _IOWR('s', 0, struct superiocmd) 400aee3bdcSAndriy Gapon #define SUPERIO_CR_WRITE _IOW('s', 1, struct superiocmd) 410aee3bdcSAndriy Gapon 420aee3bdcSAndriy Gapon #endif /*SUPERIO_IO_H*/ 43