Let kernel config override I2C_MAX_ADDR
This commit is contained in:
parent
d12dcb884c
commit
a40ed2df9c
@ -1,4 +1,4 @@
|
||||
# $NetBSD: files.i2c,v 1.58 2014/10/15 05:11:36 uebayasi Exp $
|
||||
# $NetBSD: files.i2c,v 1.59 2014/12/07 00:32:35 jmcneill Exp $
|
||||
|
||||
obsolete defflag opt_i2cbus.h I2C_SCAN
|
||||
define i2cbus { }
|
||||
@ -9,6 +9,7 @@ attach iic at i2cbus
|
||||
file dev/i2c/i2c.c iic
|
||||
file dev/i2c/i2c_exec.c iic | i2cbus | i2cexec
|
||||
file dev/i2c/i2c_subr.c iic | i2cbus
|
||||
defparam opt_i2c.h I2C_MAX_ADDR
|
||||
|
||||
# Common module for bit-bang'ing an I2C bus
|
||||
define i2c_bitbang
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: i2c.c,v 1.44 2014/07/25 08:10:37 dholland Exp $ */
|
||||
/* $NetBSD: i2c.c,v 1.45 2014/12/07 00:32:35 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Wasabi Systems, Inc.
|
||||
@ -35,8 +35,12 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_i2c.h"
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.44 2014/07/25 08:10:37 dholland Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.45 2014/12/07 00:32:35 jmcneill Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -55,7 +59,9 @@ __KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.44 2014/07/25 08:10:37 dholland Exp $");
|
||||
|
||||
#include "locators.h"
|
||||
|
||||
#ifndef I2C_MAX_ADDR
|
||||
#define I2C_MAX_ADDR 0x3ff /* 10-bit address, max */
|
||||
#endif
|
||||
|
||||
struct iic_softc {
|
||||
i2c_tag_t sc_tag;
|
||||
|
Loading…
Reference in New Issue
Block a user