Deleted Added
full compact
pcf.c (93165) pcf.c (108533)
1/*-
2 * Copyright (c) 1998 Nicolas Souchu, Marc Bouget
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1998 Nicolas Souchu, Marc Bouget
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/dev/pcf/pcf.c 93165 2002-03-25 21:22:35Z nsouch $
26 * $FreeBSD: head/sys/dev/pcf/pcf.c 108533 2003-01-01 18:49:04Z schweikh $
27 *
28 */
29#include <sys/param.h>
30#include <sys/systm.h>
31#include <sys/kernel.h>
32#include <sys/module.h>
33#include <sys/bus.h>
34

--- 245 unchanged lines hidden (view full) ---

280}
281
282static int pcf_stop(device_t pcfdev)
283{
284 struct pcf_softc *pcf = DEVTOSOFTC(pcfdev);
285
286 /*
287 * Send STOP condition iff the START condition was previously sent.
27 *
28 */
29#include <sys/param.h>
30#include <sys/systm.h>
31#include <sys/kernel.h>
32#include <sys/module.h>
33#include <sys/bus.h>
34

--- 245 unchanged lines hidden (view full) ---

280}
281
282static int pcf_stop(device_t pcfdev)
283{
284 struct pcf_softc *pcf = DEVTOSOFTC(pcfdev);
285
286 /*
287 * Send STOP condition iff the START condition was previously sent.
288 * STOP is sent only once even if a iicbus_stop() is called after
288 * STOP is sent only once even if an iicbus_stop() is called after
289 * an iicbus_read()... see pcf_read(): the pcf needs to send the stop
290 * before the last char is read.
291 */
292 if (pcf->pcf_started) {
293 /* set stop condition and enable IT */
294 PCF_SET_S1(pcf, PIN|ES0|ENI|STO|ACK);
295
296 pcf->pcf_started = 0;

--- 336 unchanged lines hidden ---
289 * an iicbus_read()... see pcf_read(): the pcf needs to send the stop
290 * before the last char is read.
291 */
292 if (pcf->pcf_started) {
293 /* set stop condition and enable IT */
294 PCF_SET_S1(pcf, PIN|ES0|ENI|STO|ACK);
295
296 pcf->pcf_started = 0;

--- 336 unchanged lines hidden ---