xref: /netbsd-src/sys/dev/ic/cdnsiicvar.h (revision 500d9e354b86dde34cf571e589358512d97c67b8)
1*500d9e35Sjmcneill /* $NetBSD: cdnsiicvar.h,v 1.1 2022/11/05 17:31:37 jmcneill Exp $ */
2*500d9e35Sjmcneill 
3*500d9e35Sjmcneill /*-
4*500d9e35Sjmcneill  * Copyright (c) 2022 Jared McNeill <jmcneill@invisible.ca>
5*500d9e35Sjmcneill  * All rights reserved.
6*500d9e35Sjmcneill  *
7*500d9e35Sjmcneill  * Redistribution and use in source and binary forms, with or without
8*500d9e35Sjmcneill  * modification, are permitted provided that the following conditions
9*500d9e35Sjmcneill  * are met:
10*500d9e35Sjmcneill  * 1. Redistributions of source code must retain the above copyright
11*500d9e35Sjmcneill  *    notice, this list of conditions and the following disclaimer.
12*500d9e35Sjmcneill  * 2. Redistributions in binary form must reproduce the above copyright
13*500d9e35Sjmcneill  *    notice, this list of conditions and the following disclaimer in the
14*500d9e35Sjmcneill  *    documentation and/or other materials provided with the distribution.
15*500d9e35Sjmcneill  *
16*500d9e35Sjmcneill  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17*500d9e35Sjmcneill  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18*500d9e35Sjmcneill  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19*500d9e35Sjmcneill  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20*500d9e35Sjmcneill  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21*500d9e35Sjmcneill  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22*500d9e35Sjmcneill  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23*500d9e35Sjmcneill  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24*500d9e35Sjmcneill  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25*500d9e35Sjmcneill  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26*500d9e35Sjmcneill  * SUCH DAMAGE.
27*500d9e35Sjmcneill  */
28*500d9e35Sjmcneill 
29*500d9e35Sjmcneill /*
30*500d9e35Sjmcneill  * Cadence I2C
31*500d9e35Sjmcneill  */
32*500d9e35Sjmcneill 
33*500d9e35Sjmcneill #ifndef _CDNSIICVAR_H
34*500d9e35Sjmcneill #define _CDNSIICVAR_H
35*500d9e35Sjmcneill 
36*500d9e35Sjmcneill #include <dev/i2c/i2cvar.h>
37*500d9e35Sjmcneill 
38*500d9e35Sjmcneill struct cdnsiic_softc {
39*500d9e35Sjmcneill 	device_t		sc_dev;
40*500d9e35Sjmcneill 	bus_space_tag_t		sc_bst;
41*500d9e35Sjmcneill 	bus_space_handle_t	sc_bsh;
42*500d9e35Sjmcneill 	struct clk		*sc_pclk;
43*500d9e35Sjmcneill 	u_int			sc_bus_freq;
44*500d9e35Sjmcneill 
45*500d9e35Sjmcneill 	struct i2c_controller	sc_ic;
46*500d9e35Sjmcneill };
47*500d9e35Sjmcneill 
48*500d9e35Sjmcneill int	cdnsiic_attach(struct cdnsiic_softc *);
49*500d9e35Sjmcneill 
50*500d9e35Sjmcneill #endif /* !_CDNSIICVAR_H */
51