Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249826
b: refs/heads/master
c: d22fd9c
h: refs/heads/master
v: v3
  • Loading branch information
Michael Hennerich authored and Greg Kroah-Hartman committed May 19, 2011
1 parent a3bbebe commit eb84dab
Show file tree
Hide file tree
Showing 4 changed files with 207 additions and 320 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f39e086adcbdb953922fb2856d2745642432fca9
refs/heads/master: d22fd9c5534b39edd48b792a018dcd9b46db276e
25 changes: 9 additions & 16 deletions trunk/drivers/staging/iio/adc/ad799x.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010 Michael Hennerich, Analog Devices Inc.
* Copyright (C) 2010-2011 Michael Hennerich, Analog Devices Inc.
* Copyright (C) 2008-2010 Jonathan Cameron
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -67,6 +67,8 @@

#define AD7997_8_READ_SINGLE 0x80
#define AD7997_8_READ_SEQUENCE 0x70
/* TODO: move this into a common header */
#define RES_MASK(bits) ((1 << (bits)) - 1)

enum {
ad7991,
Expand All @@ -83,30 +85,21 @@ struct ad799x_state;

/**
* struct ad799x_chip_info - chip specifc information
* @num_inputs: number of physical inputs on chip
* @bits: accuracy of the adc in bits
* @channel: channel specification
* @num_channels: number of channels
* @int_vref_mv: the internal reference voltage
* @monitor_mode: whether the chip supports monitor interrupts
* @default_config: device default configuration
* @dev_attrs: pointer to the device attribute group
* @scan_attrs: pointer to the scan element attribute group
* @event_attrs: pointer to the monitor event attribute group
* @ad799x_set_scan_mode: function pointer to the device specific mode function
*/

struct ad799x_chip_info {
u8 num_inputs;
u8 bits;
u8 storagebits;
char sign;
struct iio_chan_spec channel[9];
int num_channels;
u16 int_vref_mv;
bool monitor_mode;
u16 default_config;
struct attribute_group *dev_attrs;
struct attribute_group *scan_attrs;
struct attribute_group *event_attrs;
int (*ad799x_set_scan_mode) (struct ad799x_state *st,
unsigned mask);
};

struct ad799x_state {
Expand All @@ -130,7 +123,7 @@ struct ad799x_platform_data {
u16 vref_mv;
};

int ad799x_set_scan_mode(struct ad799x_state *st, unsigned mask);
int ad7997_8_set_scan_mode(struct ad799x_state *st, unsigned mask);

#ifdef CONFIG_AD799X_RING_BUFFER
int ad799x_single_channel_from_ring(struct ad799x_state *st, long mask);
Expand Down
Loading

0 comments on commit eb84dab

Please sign in to comment.