File: oct612x.h

package info (click to toggle)
dahdi-linux 1%3A2.11.1.0.20170917~dfsg-7.4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 10,336 kB
  • sloc: ansic: 125,072; perl: 2,395; sh: 1,140; makefile: 427; xml: 24
file content (49 lines) | stat: -rw-r--r-- 1,369 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * Octasic OCT6100 Interface
 *
 * Copyright (C) 2013 Digium, Inc.
 *
 * All rights reserved.
 *
 */

/*
 * See http://www.asterisk.org for more information about
 * the Asterisk project. Please do not directly contact
 * any of the maintainers of this project for assistance;
 * the project provides a web site, mailing lists and IRC
 * channels for your use.
 *
 * This program is free software, distributed under the terms of
 * the GNU General Public License Version 2 as published by the
 * Free Software Foundation. See the LICENSE file included with
 * this program for more details.
 */
#ifndef __OCT612X_H__
#define __OCT612X_H__

#include <oct6100api/oct6100_api.h>

struct oct612x_context;

/**
 * struct oct612x_ops - Callbacks used by oct612x library to talk to part.
 *
 */
struct oct612x_ops {
	int (*write)(struct oct612x_context *context, u32 address, u16 value);
	int (*read)(struct oct612x_context *context, u32 address, u16 *value);
	int (*write_smear)(struct oct612x_context *context, u32 address,
			   u16 value, size_t count);
	int (*write_burst)(struct oct612x_context *context, u32 address,
			   const u16 *value, size_t count);
	int (*read_burst)(struct oct612x_context *context, u32 address,
			  u16 *value, size_t count);
};

struct oct612x_context {
	const struct oct612x_ops *ops;
	struct device *dev;
};

#endif /* __OCT612X_H__ */