iicbus_if.m (efce3748f32e713bcb1fba45b021e843760e6fac) iicbus_if.m (844aff82a6599a8d96545dfb89663809e71719fc)
1#-
2# Copyright (c) 1998 Nicolas Souchu
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

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

26# $FreeBSD$
27#
28
29#include <sys/bus.h>
30#include <dev/iicbus/iic.h>
31
32INTERFACE iicbus;
33
1#-
2# Copyright (c) 1998 Nicolas Souchu
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

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

26# $FreeBSD$
27#
28
29#include <sys/bus.h>
30#include <dev/iicbus/iic.h>
31
32INTERFACE iicbus;
33
34CODE {
35 static u_int
36 iicbus_default_frequency(device_t bus, u_char speed)
37 {
38
39 return (100000);
40 }
41};
42
34#
35# Interpret interrupt
36#
37METHOD int intr {
38 device_t dev;
39 int event;
40 char *buf;
41};

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

110#
111# Generalized Read/Write interface
112#
113METHOD int transfer {
114 device_t dev;
115 struct iic_msg *msgs;
116 uint32_t nmsgs;
117};
43#
44# Interpret interrupt
45#
46METHOD int intr {
47 device_t dev;
48 int event;
49 char *buf;
50};

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

119#
120# Generalized Read/Write interface
121#
122METHOD int transfer {
123 device_t dev;
124 struct iic_msg *msgs;
125 uint32_t nmsgs;
126};
127
128#
129# Return the frequency in Hz for the bus running at the given
130# symbolic speed. Only the IIC_SLOW speed has meaning, it is always
131# 100KHz. The UNKNOWN, FAST, and FASTEST rates all map to the
132# configured bus frequency, or 100KHz when not otherwise configured.
133#
134METHOD u_int get_frequency {
135 device_t dev;
136 u_char speed;
137} DEFAULT iicbus_default_frequency;