imx_i2c.c (323440) | imx_i2c.c (323931) |
---|---|
1/*- 2 * Copyright (C) 2008-2009 Semihalf, Michal Hajduk 3 * Copyright (c) 2012, 2013 The FreeBSD Foundation 4 * Copyright (c) 2015 Ian Lepore <ian@FreeBSD.org> 5 * All rights reserved. 6 * 7 * Portions of this software were developed by Oleksandr Rybalko 8 * under sponsorship from the FreeBSD Foundation. --- 29 unchanged lines hidden (view full) --- 38 * This driver supports multi-master i2c busses, by detecting bus arbitration 39 * loss and returning IIC_EBUSBSY status. Notably, it does not do any kind of 40 * retries if some other master jumps onto the bus and interrupts one of our 41 * transfer cycles resulting in arbitration loss in mid-transfer. The caller 42 * must handle retries in a way that makes sense for the slave being addressed. 43 */ 44 45#include <sys/cdefs.h> | 1/*- 2 * Copyright (C) 2008-2009 Semihalf, Michal Hajduk 3 * Copyright (c) 2012, 2013 The FreeBSD Foundation 4 * Copyright (c) 2015 Ian Lepore <ian@FreeBSD.org> 5 * All rights reserved. 6 * 7 * Portions of this software were developed by Oleksandr Rybalko 8 * under sponsorship from the FreeBSD Foundation. --- 29 unchanged lines hidden (view full) --- 38 * This driver supports multi-master i2c busses, by detecting bus arbitration 39 * loss and returning IIC_EBUSBSY status. Notably, it does not do any kind of 40 * retries if some other master jumps onto the bus and interrupts one of our 41 * transfer cycles resulting in arbitration loss in mid-transfer. The caller 42 * must handle retries in a way that makes sense for the slave being addressed. 43 */ 44 45#include <sys/cdefs.h> |
46__FBSDID("$FreeBSD: stable/11/sys/arm/freescale/imx/imx_i2c.c 323440 2017-09-11 15:31:29Z ian $"); | 46__FBSDID("$FreeBSD: stable/11/sys/arm/freescale/imx/imx_i2c.c 323931 2017-09-22 15:53:22Z ian $"); |
47 48#include <sys/param.h> 49#include <sys/systm.h> 50#include <sys/bus.h> 51#include <sys/gpio.h> 52#include <sys/kernel.h> 53#include <sys/limits.h> 54#include <sys/module.h> --- 384 unchanged lines hidden (view full) --- 439 if (OF_hasprop(node, "pinctrl-0") && OF_hasprop(node, wrkstr)) 440 sc->rb_pinctl_idx = cfgidx; 441 } 442 443no_recovery: 444 445 /* We don't do a hardware reset here because iicbus_attach() does it. */ 446 | 47 48#include <sys/param.h> 49#include <sys/systm.h> 50#include <sys/bus.h> 51#include <sys/gpio.h> 52#include <sys/kernel.h> 53#include <sys/limits.h> 54#include <sys/module.h> --- 384 unchanged lines hidden (view full) --- 439 if (OF_hasprop(node, "pinctrl-0") && OF_hasprop(node, wrkstr)) 440 sc->rb_pinctl_idx = cfgidx; 441 } 442 443no_recovery: 444 445 /* We don't do a hardware reset here because iicbus_attach() does it. */ 446 |
447 bus_generic_attach(dev); | 447 /* Probe and attach the iicbus when interrupts are available. */ 448 config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); |
448 return (0); 449} 450 451static int 452i2c_repeated_start(device_t dev, u_char slave, int timeout) 453{ 454 struct i2c_softc *sc; 455 int error; --- 202 unchanged lines hidden --- | 449 return (0); 450} 451 452static int 453i2c_repeated_start(device_t dev, u_char slave, int timeout) 454{ 455 struct i2c_softc *sc; 456 int error; --- 202 unchanged lines hidden --- |