blob: 87915f760e016c0721b29bf35a4fbb57ad0d5c06 (
plain)
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
|
/*
* Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
#ifndef __IIO_LS_SYSFS_H__
#define __IIO_LS_SYSFS_H__
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#define MAX_CHAN 2
enum prop {
VENDOR,
NUM_PROP,
};
enum channel_prop {
MAX_RANGE,
INTEGRATION_TIME,
RESOLUTION,
POWER_CONSUMED,
MAX_CHAN_PROP,
};
struct lightsensor_spec {
const char *prop[NUM_PROP];
const char *chan_prop[MAX_CHAN][MAX_CHAN_PROP];
};
#ifdef CONFIG_LS_SYSFS
extern void fill_ls_attrs(struct lightsensor_spec *, struct attribute **);
#else
static inline void fill_ls_attrs(
struct lightsensor_spec *meta, struct attribute **attrs)
{
}
#endif
#endif /* __IIO_LS_SYSFS_H__ */
|