1 /* 2 * 3 * $Id: stk3x1x.h 4 * 5 * Copyright (C) 2012~2013 Lex Hsieh <lex_hsieh@sensortek.com.tw> 6 * 7 * This file is subject to the terms and conditions of the GNU General Public 8 * License. See the file COPYING in the main directory of this archive for 9 * more details. 10 * 11 */ 12 #ifndef __STK3X1X_H__ 13 #define __STK3X1X_H__ 14 15 #define STK_GPIO_PULL_DEFAULT ((u32)-1) 16 #define STK_GPIO_DRVLVL_DEFAULT ((u32)-1) 17 #define STK_GPIO_DATA_DEFAULT ((u32)-1) 18 19 #include <linux/pinctrl/pinconf-generic.h> 20 /* 21 * PIN_CONFIG_PARAM_MAX - max available value of 'enum pin_config_param'. 22 * see include/linux/pinctrl/pinconf-generic.h 23 */ 24 #define PIN_CONFIG_PARAM_MAX PIN_CONFIG_PERSIST_STATE 25 enum stk_pin_config_param { 26 STK_PINCFG_TYPE_FUNC = PIN_CONFIG_PARAM_MAX + 1, 27 STK_PINCFG_TYPE_DAT, 28 STK_PINCFG_TYPE_PUD, 29 STK_PINCFG_TYPE_DRV, 30 }; 31 32 33 /* platform data */ 34 35 struct stk3x1x_platform_data { 36 uint8_t state_reg; 37 uint8_t psctrl_reg; 38 uint8_t alsctrl_reg; 39 uint8_t ledctrl_reg; 40 uint8_t wait_reg; 41 uint16_t ps_thd_h; 42 uint16_t ps_thd_l; 43 int int_pin; 44 uint32_t transmittance; 45 }; 46 47 #endif /*__STK3X1X_H__*/ 48