Home | History | Annotate | Download | only in linux
      1 /*
      2  * Copyright (C) 2010 Motorola, Inc.
      3  *
      4  * This program is free software; you can redistribute it and/or modify
      5  * it under the terms of the GNU General Public License version 2 as
      6  * published by the Free Software Foundation.
      7  *
      8  * This program is distributed in the hope that it will be useful,
      9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     11  * GNU General Public License for more details.
     12  *
     13  * You should have received a copy of the GNU General Public License
     14  * along with this program; if not, write to the Free Software
     15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
     16  * 02111-1307, USA
     17  */
     18 
     19 #ifndef _LINUX_MAX9635_H__
     20 #define _LINUX_MAX9635_H__
     21 
     22 #define MAX9635_NAME "MAX9635_als"
     23 #define FOPS_MAX9635_NAME "MAX9635"
     24 
     25 
     26 #ifdef __KERNEL__
     27 
     28 struct max9635_als_zone_data {
     29 	int  als_lower_threshold;
     30 	int  als_higher_threshold;
     31 };
     32 
     33 struct max9635_platform_data {
     34 	u8	configure;
     35 	u8	threshold_timer;
     36 	u8	def_low_threshold;
     37 	u8	def_high_threshold;
     38 	u32 lens_percent_t;
     39 	struct max9635_als_zone_data *als_lux_table;
     40 	u8  num_of_zones;
     41 	int (*power_on)(void);
     42 	int (*power_off)(void);
     43 };
     44 
     45 #endif	/* __KERNEL__ */
     46 
     47 #define MAX9635_IO			0xA3
     48 
     49 #define MAX9635_IOCTL_GET_ENABLE	_IOR(MAX9635_IO, 0x00, char)
     50 #define MAX9635_IOCTL_SET_ENABLE	_IOW(MAX9635_IO, 0x01, char)
     51 
     52 #endif	/* _LINUX_MAX9635_H__ */
     53