blob: caae98cc8e7a455913b181419ed8a500a6cf89a4 [file] [log] [blame]
Flemmarde2ce3b72013-04-25 21:59:45 -07001/* include/linux/lightsensor.h
2 *
3 * Copyright (C) 2009 Google, Inc.
4 * Author: Iliyan Malchev <malchev@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#ifndef __LINUX_LIGHTSENSOR_H
18#define __LINUX_LIGHTSENSOR_H
19
20#include <linux/types.h>
21#include <linux/ioctl.h>
22
23#define LIGHTSENSOR_IOCTL_MAGIC 'l'
24
25#define LIGHTSENSOR_IOCTL_GET_ENABLED _IOR(LIGHTSENSOR_IOCTL_MAGIC, 1, int *)
26#define LIGHTSENSOR_IOCTL_ENABLE _IOW(LIGHTSENSOR_IOCTL_MAGIC, 2, int *)
27
28struct lightsensor_mpp_config_data {
29 uint32_t lightsensor_mpp;
30 uint32_t lightsensor_amux;
31};
32
33struct lightsensor_smd_platform_data {
34 const char *name;
35 uint16_t levels[10];
36 uint16_t golden_adc;
37 uint16_t m_voltage;
38 int (*ls_power)(int, uint8_t);
39 struct lightsensor_mpp_config_data mpp_data;
40};
41
42#endif