Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/i2c AXP209 isn't an SMBus device, so don't use iic_s...
details: https://anonhg.NetBSD.org/src/rev/7d257f29a7e5
branches: trunk
changeset: 827257:7d257f29a7e5
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sun Oct 22 11:00:28 2017 +0000
description:
AXP209 isn't an SMBus device, so don't use iic_smbus_* APIs.
diffstat:
sys/dev/i2c/axp20x.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (40 lines):
diff -r 9796341e4189 -r 7d257f29a7e5 sys/dev/i2c/axp20x.c
--- a/sys/dev/i2c/axp20x.c Sun Oct 22 10:31:57 2017 +0000
+++ b/sys/dev/i2c/axp20x.c Sun Oct 22 11:00:28 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: axp20x.c,v 1.9 2017/10/09 14:52:43 jmcneill Exp $ */
+/* $NetBSD: axp20x.c,v 1.10 2017/10/22 11:00:28 jmcneill Exp $ */
/*-
* Copyright (c) 2014-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
#include "opt_fdt.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: axp20x.c,v 1.9 2017/10/09 14:52:43 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: axp20x.c,v 1.10 2017/10/22 11:00:28 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -563,8 +563,8 @@
{
int ret;
iic_acquire_bus(sc->sc_i2c, flags);
- ret = iic_smbus_block_read(sc->sc_i2c, sc->sc_addr,
- reg, val, len, flags);
+ ret = iic_exec(sc->sc_i2c, I2C_OP_READ_WITH_STOP, sc->sc_addr,
+ ®, 1, val, len, flags);
iic_release_bus(sc->sc_i2c, flags);
return ret;
@@ -576,8 +576,8 @@
{
int ret;
iic_acquire_bus(sc->sc_i2c, flags);
- ret = iic_smbus_block_write(sc->sc_i2c, sc->sc_addr,
- reg, val, len, flags);
+ ret = iic_exec(sc->sc_i2c, I2C_OP_WRITE_WITH_STOP, sc->sc_addr,
+ ®, 1, val, len, flags);
iic_release_bus(sc->sc_i2c, flags);
return ret;
}
Home |
Main Index |
Thread Index |
Old Index