Make i2c_acquire_bus() / i2c_release_bus() real symbols.
This commit is contained in:
parent
d4dd955a40
commit
98ec1b8df8
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: i2c_exec.c,v 1.10 2015/03/07 14:16:51 jmcneill Exp $ */
|
||||
/* $NetBSD: i2c_exec.c,v 1.11 2018/12/10 00:31:45 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Wasabi Systems, Inc.
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: i2c_exec.c,v 1.10 2015/03/07 14:16:51 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: i2c_exec.c,v 1.11 2018/12/10 00:31:45 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -53,6 +53,30 @@ static uint8_t iic_smbus_pec(int, uint8_t *, uint8_t *);
|
||||
|
||||
static int i2cexec_modcmd(modcmd_t, void *);
|
||||
|
||||
/*
|
||||
* iic_acquire_bus:
|
||||
*
|
||||
* Acquire the I2C bus for use by a client.
|
||||
*/
|
||||
int
|
||||
iic_acquire_bus(i2c_tag_t tag, int flags)
|
||||
{
|
||||
|
||||
return (*tag->ic_acquire_bus)(tag->ic_cookie, flags);
|
||||
}
|
||||
|
||||
/*
|
||||
* iic_release_bus:
|
||||
*
|
||||
* Relese the I2C bus, allowing another client to use it.
|
||||
*/
|
||||
void
|
||||
iic_release_bus(i2c_tag_t tag, int flags)
|
||||
{
|
||||
|
||||
(*tag->ic_release_bus)(tag->ic_cookie, flags);
|
||||
}
|
||||
|
||||
/*
|
||||
* iic_exec:
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: i2cvar.h,v 1.17 2018/06/26 06:34:55 thorpej Exp $ */
|
||||
/* $NetBSD: i2cvar.h,v 1.18 2018/12/10 00:31:45 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Wasabi Systems, Inc.
|
||||
@ -208,11 +208,8 @@ bool iic_use_direct_match(const struct i2c_attach_args *, const cfdata_t,
|
||||
* Simplified API for clients of the i2c framework. Definitions
|
||||
* in <dev/i2c/i2c_io.h>.
|
||||
*/
|
||||
#define iic_acquire_bus(ic, flags) \
|
||||
(*(ic)->ic_acquire_bus)((ic)->ic_cookie, (flags))
|
||||
#define iic_release_bus(ic, flags) \
|
||||
(*(ic)->ic_release_bus)((ic)->ic_cookie, (flags))
|
||||
|
||||
int iic_acquire_bus(i2c_tag_t, int);
|
||||
void iic_release_bus(i2c_tag_t, int);
|
||||
int iic_exec(i2c_tag_t, i2c_op_t, i2c_addr_t, const void *,
|
||||
size_t, void *, size_t, int);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user