131a62963SBryan Wu /* 231a62963SBryan Wu * include/linux/input/ad714x.h 331a62963SBryan Wu * 431a62963SBryan Wu * AD714x is very flexible, it can be used as buttons, scrollwheel, 531a62963SBryan Wu * slider, touchpad at the same time. That depends on the boards. 631a62963SBryan Wu * The platform_data for the device's "struct device" holds this 731a62963SBryan Wu * information. 831a62963SBryan Wu * 931a62963SBryan Wu * Copyright 2009 Analog Devices Inc. 1031a62963SBryan Wu * 1131a62963SBryan Wu * Licensed under the GPL-2 or later. 1231a62963SBryan Wu */ 1331a62963SBryan Wu 1431a62963SBryan Wu #ifndef __LINUX_INPUT_AD714X_H__ 1531a62963SBryan Wu #define __LINUX_INPUT_AD714X_H__ 1631a62963SBryan Wu 1731a62963SBryan Wu #define STAGE_NUM 12 1831a62963SBryan Wu #define STAGE_CFGREG_NUM 8 1931a62963SBryan Wu #define SYS_CFGREG_NUM 8 2031a62963SBryan Wu 2131a62963SBryan Wu /* board information which need be initialized in arch/mach... */ 2231a62963SBryan Wu struct ad714x_slider_plat { 2331a62963SBryan Wu int start_stage; 2431a62963SBryan Wu int end_stage; 2531a62963SBryan Wu int max_coord; 2631a62963SBryan Wu }; 2731a62963SBryan Wu 2831a62963SBryan Wu struct ad714x_wheel_plat { 2931a62963SBryan Wu int start_stage; 3031a62963SBryan Wu int end_stage; 3131a62963SBryan Wu int max_coord; 3231a62963SBryan Wu }; 3331a62963SBryan Wu 3431a62963SBryan Wu struct ad714x_touchpad_plat { 3531a62963SBryan Wu int x_start_stage; 3631a62963SBryan Wu int x_end_stage; 3731a62963SBryan Wu int x_max_coord; 3831a62963SBryan Wu 3931a62963SBryan Wu int y_start_stage; 4031a62963SBryan Wu int y_end_stage; 4131a62963SBryan Wu int y_max_coord; 4231a62963SBryan Wu }; 4331a62963SBryan Wu 4431a62963SBryan Wu struct ad714x_button_plat { 4531a62963SBryan Wu int keycode; 4631a62963SBryan Wu unsigned short l_mask; 4731a62963SBryan Wu unsigned short h_mask; 4831a62963SBryan Wu }; 4931a62963SBryan Wu 5031a62963SBryan Wu struct ad714x_platform_data { 5131a62963SBryan Wu int slider_num; 5231a62963SBryan Wu int wheel_num; 5331a62963SBryan Wu int touchpad_num; 5431a62963SBryan Wu int button_num; 5531a62963SBryan Wu struct ad714x_slider_plat *slider; 5631a62963SBryan Wu struct ad714x_wheel_plat *wheel; 5731a62963SBryan Wu struct ad714x_touchpad_plat *touchpad; 5831a62963SBryan Wu struct ad714x_button_plat *button; 5931a62963SBryan Wu unsigned short stage_cfg_reg[STAGE_NUM][STAGE_CFGREG_NUM]; 6031a62963SBryan Wu unsigned short sys_cfg_reg[SYS_CFGREG_NUM]; 6131a62963SBryan Wu }; 6231a62963SBryan Wu 6331a62963SBryan Wu #endif 64