Flemmard | 6b1be1e | 2014-02-21 19:34:00 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. |
| 3 | */ |
| 4 | |
| 5 | /* |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | |
| 16 | * You should have received a copy of the GNU General Public License along |
| 17 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 19 | */ |
| 20 | |
| 21 | #ifndef __ISL29023_H__ |
| 22 | #define __ISL29023_H__ |
| 23 | |
| 24 | #include <linux/types.h> |
| 25 | |
| 26 | #define ISL29023_PD_MODE 0x0 |
| 27 | #define ISL29023_ALS_ONCE_MODE 0x1 |
| 28 | #define ISL29023_IR_ONCE_MODE 0x2 |
| 29 | #define ISL29023_ALS_CONT_MODE 0x5 |
| 30 | #define ISL29023_IR_CONT_MODE 0x6 |
| 31 | |
| 32 | #define ISL29023_INT_PERSISTS_1 0x0 |
| 33 | #define ISL29023_INT_PERSISTS_4 0x1 |
| 34 | #define ISL29023_INT_PERSISTS_8 0x2 |
| 35 | #define ISL29023_INT_PERSISTS_16 0x3 |
| 36 | |
| 37 | #define ISL29023_RES_16 0x0 |
| 38 | #define ISL29023_RES_12 0x1 |
| 39 | #define ISL29023_RES_8 0x2 |
| 40 | #define ISL29023_RES_4 0x3 |
| 41 | |
| 42 | #define ISL29023_RANGE_1K 0x0 |
| 43 | #define ISL29023_RANGE_4K 0x1 |
| 44 | #define ISL29023_RANGE_16K 0x2 |
| 45 | #define ISL29023_RANGE_64K 0x3 |
| 46 | |
| 47 | struct isl29023_platform_data { |
| 48 | char *vdd_reg; |
| 49 | int rext; |
| 50 | int polled; |
| 51 | int poll_interval; |
| 52 | }; |
| 53 | |
| 54 | #endif |