xref: /freebsd/sys/compat/linuxkpi/common/src/lkpi_iic_if.m (revision 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
11961a14aSEmmanuel Vadot#-
2*4d846d26SWarner Losh# SPDX-License-Identifier: BSD-2-Clause
31961a14aSEmmanuel Vadot#
41961a14aSEmmanuel Vadot# Copyright (c) 2021 Beckhoff Automation GmbH & Co. KG
51961a14aSEmmanuel Vadot#
61961a14aSEmmanuel Vadot# Redistribution and use in source and binary forms, with or without
71961a14aSEmmanuel Vadot# modification, are permitted provided that the following conditions
81961a14aSEmmanuel Vadot# are met:
91961a14aSEmmanuel Vadot# 1. Redistributions of source code must retain the above copyright
101961a14aSEmmanuel Vadot#    notice, this list of conditions and the following disclaimer.
111961a14aSEmmanuel Vadot# 2. Redistributions in binary form must reproduce the above copyright
121961a14aSEmmanuel Vadot#    notice, this list of conditions and the following disclaimer in the
131961a14aSEmmanuel Vadot#    documentation and/or other materials provided with the distribution.
141961a14aSEmmanuel Vadot#
151961a14aSEmmanuel Vadot# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
161961a14aSEmmanuel Vadot# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
171961a14aSEmmanuel Vadot# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
181961a14aSEmmanuel Vadot# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
191961a14aSEmmanuel Vadot# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
201961a14aSEmmanuel Vadot# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
211961a14aSEmmanuel Vadot# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
221961a14aSEmmanuel Vadot# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
231961a14aSEmmanuel Vadot# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
241961a14aSEmmanuel Vadot# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
251961a14aSEmmanuel Vadot# SUCH DAMAGE.
261961a14aSEmmanuel Vadot#
271961a14aSEmmanuel Vadot
281961a14aSEmmanuel VadotINTERFACE lkpi_iic;
291961a14aSEmmanuel Vadot
301961a14aSEmmanuel VadotHEADER {
311961a14aSEmmanuel Vadot	struct i2c_adapter;
321961a14aSEmmanuel Vadot}
331961a14aSEmmanuel Vadot
341961a14aSEmmanuel VadotMETHOD int add_adapter {
351961a14aSEmmanuel Vadot	device_t dev;
361961a14aSEmmanuel Vadot	struct i2c_adapter *adapter;
371961a14aSEmmanuel Vadot};
3825d21a84SEmmanuel Vadot
3925d21a84SEmmanuel VadotMETHOD struct i2c_adapter * get_adapter {
4025d21a84SEmmanuel Vadot	device_t dev;
4125d21a84SEmmanuel Vadot};
42