Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
max197.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/mutex.h>
#include <linux/device.h>
#include <linux/sysfs.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/platform_device.h>
#include <linux/platform_data/max197.h>

Go to the source code of this file.

Data Structures

struct  max197_data
 

Macros

#define MAX199_LIMIT   4000 /* 4V */
 
#define MAX197_LIMIT   10000 /* 10V */
 
#define MAX197_NUM_CH   8 /* 8 Analog Input Channels */
 
#define MAX197_BIP   (1 << 3) /* Bipolarity */
 
#define MAX197_RNG   (1 << 4) /* Full range */
 
#define MAX197_SCALE   12207 /* Scale coefficient for raw data */
 
#define MAX197_SENSOR_DEVICE_ATTR_CH(chan)
 
#define MAX197_SENSOR_DEV_ATTR_IN(chan)
 

Enumerations

enum  max197_chips { max197, max199 }
 

Functions

 MAX197_SENSOR_DEVICE_ATTR_CH (0)
 
 MAX197_SENSOR_DEVICE_ATTR_CH (1)
 
 MAX197_SENSOR_DEVICE_ATTR_CH (2)
 
 MAX197_SENSOR_DEVICE_ATTR_CH (3)
 
 MAX197_SENSOR_DEVICE_ATTR_CH (4)
 
 MAX197_SENSOR_DEVICE_ATTR_CH (5)
 
 MAX197_SENSOR_DEVICE_ATTR_CH (6)
 
 MAX197_SENSOR_DEVICE_ATTR_CH (7)
 
 MODULE_DEVICE_TABLE (platform, max197_device_ids)
 
 module_platform_driver (max197_driver)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Savoir-faire Linux Inc. <[email protected]>")
 
 MODULE_DESCRIPTION ("Maxim MAX197 A/D Converter driver")
 

Macro Definition Documentation

#define MAX197_BIP   (1 << 3) /* Bipolarity */

Definition at line 33 of file max197.c.

#define MAX197_LIMIT   10000 /* 10V */

Definition at line 28 of file max197.c.

#define MAX197_NUM_CH   8 /* 8 Analog Input Channels */

Definition at line 30 of file max197.c.

#define MAX197_RNG   (1 << 4) /* Full range */

Definition at line 34 of file max197.c.

#define MAX197_SCALE   12207 /* Scale coefficient for raw data */

Definition at line 36 of file max197.c.

#define MAX197_SENSOR_DEV_ATTR_IN (   chan)
Value:
&sensor_dev_attr_in##chan##_input.dev_attr.attr, \
&sensor_dev_attr_in##chan##_max.dev_attr.attr, \
&sensor_dev_attr_in##chan##_min.dev_attr.attr

Definition at line 229 of file max197.c.

#define MAX197_SENSOR_DEVICE_ATTR_CH (   chan)
Value:
static SENSOR_DEVICE_ATTR(in##chan##_input, S_IRUGO, \
max197_show_input, NULL, chan); \
max197_show_range, \
max197_store_range, \
true, chan); \
max197_show_range, \
max197_store_range, \
false, chan)

Definition at line 217 of file max197.c.

#define MAX199_LIMIT   4000 /* 4V */

Definition at line 27 of file max197.c.

Enumeration Type Documentation

Enumerator:
max197 
max199 

Definition at line 39 of file max197.c.

Function Documentation

MAX197_SENSOR_DEVICE_ATTR_CH ( )
MAX197_SENSOR_DEVICE_ATTR_CH ( )
MAX197_SENSOR_DEVICE_ATTR_CH ( )
MAX197_SENSOR_DEVICE_ATTR_CH ( )
MAX197_SENSOR_DEVICE_ATTR_CH ( )
MAX197_SENSOR_DEVICE_ATTR_CH ( )
MAX197_SENSOR_DEVICE_ATTR_CH ( )
MAX197_SENSOR_DEVICE_ATTR_CH ( )
MODULE_AUTHOR ( "Savoir-faire Linux Inc. <[email protected]>"  )
MODULE_DESCRIPTION ( "Maxim MAX197 A/D Converter driver )
MODULE_DEVICE_TABLE ( platform  ,
max197_device_ids   
)
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( max197_driver  )