Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * include/linux/input/ad714x.h
0004  *
0005  * AD714x is very flexible, it can be used as buttons, scrollwheel,
0006  * slider, touchpad at the same time. That depends on the boards.
0007  * The platform_data for the device's "struct device" holds this
0008  * information.
0009  *
0010  * Copyright 2009-2011 Analog Devices Inc.
0011  */
0012 
0013 #ifndef __LINUX_INPUT_AD714X_H__
0014 #define __LINUX_INPUT_AD714X_H__
0015 
0016 #define STAGE_NUM              12
0017 #define STAGE_CFGREG_NUM       8
0018 #define SYS_CFGREG_NUM         8
0019 
0020 /* board information which need be initialized in arch/mach... */
0021 struct ad714x_slider_plat {
0022     int start_stage;
0023     int end_stage;
0024     int max_coord;
0025 };
0026 
0027 struct ad714x_wheel_plat {
0028     int start_stage;
0029     int end_stage;
0030     int max_coord;
0031 };
0032 
0033 struct ad714x_touchpad_plat {
0034     int x_start_stage;
0035     int x_end_stage;
0036     int x_max_coord;
0037 
0038     int y_start_stage;
0039     int y_end_stage;
0040     int y_max_coord;
0041 };
0042 
0043 struct ad714x_button_plat {
0044     int keycode;
0045     unsigned short l_mask;
0046     unsigned short h_mask;
0047 };
0048 
0049 struct ad714x_platform_data {
0050     int slider_num;
0051     int wheel_num;
0052     int touchpad_num;
0053     int button_num;
0054     struct ad714x_slider_plat *slider;
0055     struct ad714x_wheel_plat *wheel;
0056     struct ad714x_touchpad_plat *touchpad;
0057     struct ad714x_button_plat *button;
0058     unsigned short stage_cfg_reg[STAGE_NUM][STAGE_CFGREG_NUM];
0059     unsigned short sys_cfg_reg[SYS_CFGREG_NUM];
0060     unsigned long irqflags;
0061 };
0062 
0063 #endif