#include <linux/atomic.h>
#include <linux/fs.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/iio/events.h>
#include <linux/iio/iio.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/mfd/core.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/mfd/lm3533.h>
Go to the source code of this file.
|
#define | LM3533_ALS_RESISTOR_MIN 1 |
|
#define | LM3533_ALS_RESISTOR_MAX 127 |
|
#define | LM3533_ALS_CHANNEL_CURRENT_MAX 2 |
|
#define | LM3533_ALS_THRESH_MAX 3 |
|
#define | LM3533_ALS_ZONE_MAX 4 |
|
#define | LM3533_REG_ALS_RESISTOR_SELECT 0x30 |
|
#define | LM3533_REG_ALS_CONF 0x31 |
|
#define | LM3533_REG_ALS_ZONE_INFO 0x34 |
|
#define | LM3533_REG_ALS_READ_ADC_RAW 0x37 |
|
#define | LM3533_REG_ALS_READ_ADC_AVERAGE 0x38 |
|
#define | LM3533_REG_ALS_BOUNDARY_BASE 0x50 |
|
#define | LM3533_REG_ALS_TARGET_BASE 0x60 |
|
#define | LM3533_ALS_ENABLE_MASK 0x01 |
|
#define | LM3533_ALS_INPUT_MODE_MASK 0x02 |
|
#define | LM3533_ALS_INT_ENABLE_MASK 0x01 |
|
#define | LM3533_ALS_ZONE_SHIFT 2 |
|
#define | LM3533_ALS_ZONE_MASK 0x1c |
|
#define | LM3533_ALS_FLAG_INT_ENABLED 1 |
|
#define | CHANNEL_CURRENT(_channel) |
|
#define | ALS_ATTR(_name, _mode, _show, _store, _type, _val1, _val2) |
|
#define | LM3533_ALS_ATTR(_name, _mode, _show, _store, _type, _val1, _val2) |
|
#define | ALS_TARGET_ATTR_RW(_channel, _zone) |
|
#define | ALS_THRESH_FALLING_ATTR_RW(_nr) |
|
#define | ALS_THRESH_RAISING_ATTR_RW(_nr) |
|
#define | ALS_HYSTERESIS_ATTR_RO(_nr) |
|
#define | ILLUMINANCE_ATTR_RO(_name) DEVICE_ATTR(in_illuminance0_##_name, S_IRUGO, show_##_name, NULL) |
|
#define | ILLUMINANCE_ATTR_RW(_name) |
|
#define ALS_ATTR |
( |
|
_name, |
|
|
|
_mode, |
|
|
|
_show, |
|
|
|
_store, |
|
|
|
_type, |
|
|
|
_val1, |
|
|
|
_val2 |
|
) |
| |
Value:{ .dev_attr =
__ATTR(_name, _mode, _show, _store), \
.type = _type, \
.val1 = _val1, \
.val2 = _val2 }
Definition at line 575 of file lm3533-als.c.
#define ALS_HYSTERESIS_ATTR_RO |
( |
|
_nr | ) |
|
#define ALS_TARGET_ATTR_RW |
( |
|
_channel, |
|
|
|
_zone |
|
) |
| |
Value:
show_als_attr, store_als_attr, \
Definition at line 585 of file lm3533-als.c.
#define ALS_THRESH_FALLING_ATTR_RW |
( |
|
_nr | ) |
|
Value:
show_als_attr, store_als_attr, \
Definition at line 613 of file lm3533-als.c.
#define ALS_THRESH_RAISING_ATTR_RW |
( |
|
_nr | ) |
|
Value:
show_als_attr, store_als_attr, \
Definition at line 619 of file lm3533-als.c.
#define CHANNEL_CURRENT |
( |
|
_channel | ) |
|
Value:{ \
.channel = _channel, \
.indexed = true, \
.output = true, \
}
Definition at line 228 of file lm3533-als.c.
#define ILLUMINANCE_ATTR_RW |
( |
|
_name | ) |
|
Value:
show_##_name, store_##_name)
Definition at line 659 of file lm3533-als.c.
#define LM3533_ALS_ATTR |
( |
|
_name, |
|
|
|
_mode, |
|
|
|
_show, |
|
|
|
_store, |
|
|
|
_type, |
|
|
|
_val1, |
|
|
|
_val2 |
|
) |
| |
Value:
ALS_ATTR(_name, _mode, _show, _store, _type, _val1, _val2)
Definition at line 581 of file lm3533-als.c.
#define LM3533_ALS_CHANNEL_CURRENT_MAX 2 |
#define LM3533_ALS_ENABLE_MASK 0x01 |
#define LM3533_ALS_FLAG_INT_ENABLED 1 |
#define LM3533_ALS_INPUT_MODE_MASK 0x02 |
#define LM3533_ALS_INT_ENABLE_MASK 0x01 |
#define LM3533_ALS_RESISTOR_MAX 127 |
#define LM3533_ALS_RESISTOR_MIN 1 |
#define LM3533_ALS_THRESH_MAX 3 |
#define LM3533_ALS_ZONE_MASK 0x1c |
#define LM3533_ALS_ZONE_MAX 4 |
#define LM3533_ALS_ZONE_SHIFT 2 |
#define LM3533_REG_ALS_BOUNDARY_BASE 0x50 |
#define LM3533_REG_ALS_CONF 0x31 |
#define LM3533_REG_ALS_READ_ADC_AVERAGE 0x38 |
#define LM3533_REG_ALS_READ_ADC_RAW 0x37 |
#define LM3533_REG_ALS_RESISTOR_SELECT 0x30 |
#define LM3533_REG_ALS_TARGET_BASE 0x60 |
#define LM3533_REG_ALS_ZONE_INFO 0x34 |
- Enumerator:
LM3533_ATTR_TYPE_HYSTERESIS |
|
LM3533_ATTR_TYPE_TARGET |
|
LM3533_ATTR_TYPE_THRESH_FALLING |
|
LM3533_ATTR_TYPE_THRESH_RAISING |
|
Definition at line 484 of file lm3533-als.c.
MODULE_ALIAS |
( |
"platform:lm3533-als" |
| ) |
|
MODULE_DESCRIPTION |
( |
"LM3533 Ambient Light Sensor driver" |
| ) |
|
module_platform_driver |
( |
lm3533_als_driver |
| ) |
|