| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
#ifndef __OCT612X_H__ |
| 23 |
#define __OCT612X_H__ |
| 24 |
|
| 25 |
#include <oct6100api/oct6100_api.h> |
| 26 |
|
| 27 |
struct oct612x_context; |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
struct oct612x_ops { |
| 34 |
int (*write)(struct oct612x_context *context, u32 address, u16 value); |
| 35 |
int (*read)(struct oct612x_context *context, u32 address, u16 *value); |
| 36 |
int (*write_smear)(struct oct612x_context *context, u32 address, |
| 37 |
u16 value, size_t count); |
| 38 |
int (*write_burst)(struct oct612x_context *context, u32 address, |
| 39 |
const u16 *value, size_t count); |
| 40 |
int (*read_burst)(struct oct612x_context *context, u32 address, |
| 41 |
u16 *value, size_t count); |
| 42 |
}; |
| 43 |
|
| 44 |
struct oct612x_context { |
| 45 |
const struct oct612x_ops *ops; |
| 46 |
struct device *dev; |
| 47 |
}; |
| 48 |
|
| 49 |
#endif |