1d70424edSNicolas Souchu /*- 2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 3718cf2ccSPedro F. Giffuni * 4d70424edSNicolas Souchu * Copyright (c) 1998 Nicolas Souchu 5d70424edSNicolas Souchu * All rights reserved. 6d70424edSNicolas Souchu * 7d70424edSNicolas Souchu * Redistribution and use in source and binary forms, with or without 8d70424edSNicolas Souchu * modification, are permitted provided that the following conditions 9d70424edSNicolas Souchu * are met: 10d70424edSNicolas Souchu * 1. Redistributions of source code must retain the above copyright 11d70424edSNicolas Souchu * notice, this list of conditions and the following disclaimer. 12d70424edSNicolas Souchu * 2. Redistributions in binary form must reproduce the above copyright 13d70424edSNicolas Souchu * notice, this list of conditions and the following disclaimer in the 14d70424edSNicolas Souchu * documentation and/or other materials provided with the distribution. 15d70424edSNicolas Souchu * 16d70424edSNicolas Souchu * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17d70424edSNicolas Souchu * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18d70424edSNicolas Souchu * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19d70424edSNicolas Souchu * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20d70424edSNicolas Souchu * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21d70424edSNicolas Souchu * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22d70424edSNicolas Souchu * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23d70424edSNicolas Souchu * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24d70424edSNicolas Souchu * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25d70424edSNicolas Souchu * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26d70424edSNicolas Souchu * SUCH DAMAGE. 27d70424edSNicolas Souchu * 28d70424edSNicolas Souchu */ 29d70424edSNicolas Souchu #ifndef __SMBUS_H 30d70424edSNicolas Souchu #define __SMBUS_H 31d70424edSNicolas Souchu 32202379afSMichael Gmelin #define SMBUS_ADDR_MIN 0x10 33202379afSMichael Gmelin #define SMBUS_ADDR_MAX 0x70 34202379afSMichael Gmelin 35d70424edSNicolas Souchu struct smbus_softc { 36d70424edSNicolas Souchu device_t owner; /* smbus owner device structure */ 377048a99cSJohn Baldwin struct mtx lock; 38202379afSMichael Gmelin unsigned char addrs[SMBUS_ADDR_MAX]; 39d70424edSNicolas Souchu }; 40d70424edSNicolas Souchu 41b29df1b2SWarner Losh void smbus_generic_intr(device_t dev, u_char devaddr, char low, char high, int err); 42d70424edSNicolas Souchu 43d70424edSNicolas Souchu #endif 44