• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6/drivers/input/misc/

Lines Matching refs:pdata

194 	struct adxl34x_platform_data pdata;
258 struct adxl34x_platform_data *pdata = &ac->pdata;
263 input_event(ac->input, pdata->ev_type, pdata->ev_code_x,
265 input_event(ac->input, pdata->ev_type, pdata->ev_code_y,
267 input_event(ac->input, pdata->ev_type, pdata->ev_code_z,
279 struct adxl34x_platform_data *pdata, int status, int press)
286 pdata->ev_code_tap[i], press);
291 struct adxl34x_platform_data *pdata, int status)
293 adxl34x_send_key_events(ac, pdata, status, true);
295 adxl34x_send_key_events(ac, pdata, status, false);
301 struct adxl34x_platform_data *pdata = &ac->pdata;
309 if (pdata->tap_axis_control & (TAP_X_EN | TAP_Y_EN | TAP_Z_EN))
317 adxl34x_report_key_single(ac->input, pdata->ev_code_ff);
323 adxl34x_do_tap(ac, pdata, tap_stat);
326 adxl34x_do_tap(ac, pdata, tap_stat);
329 if (pdata->ev_code_act_inactivity) {
332 pdata->ev_code_act_inactivity, 1);
335 pdata->ev_code_act_inactivity, 0);
341 if (pdata->orientation_enable) {
343 if ((pdata->orientation_enable & ADXL_EN_ORIENTATION_2D) &&
351 pdata->ev_codes_orient_2d[orient_code]);
355 if ((pdata->orientation_enable & ADXL_EN_ORIENTATION_3D) &&
363 pdata->ev_codes_orient_3d[orient_code]);
370 if (pdata->fifo_mode)
412 AC_WRITE(ac, POWER_CTL, ac->pdata.power_mode | PCTL_MEASURE);
535 return sprintf(buf, "%u\n", RATE(ac->pdata.data_rate));
552 ac->pdata.data_rate = RATE(val);
554 ac->pdata.data_rate |
555 (ac->pdata.low_power_mode ? LOW_POWER : 0));
570 ac->pdata.power_mode & (PCTL_AUTO_SLEEP | PCTL_LINK) ? 1 : 0);
588 ac->pdata.power_mode |= (PCTL_AUTO_SLEEP | PCTL_LINK);
590 ac->pdata.power_mode &= ~(PCTL_AUTO_SLEEP | PCTL_LINK);
593 AC_WRITE(ac, POWER_CTL, ac->pdata.power_mode | PCTL_MEASURE);
697 const struct adxl34x_platform_data *pdata;
716 pdata = dev->platform_data;
717 if (!pdata) {
720 pdata = &adxl34x_default_init;
723 ac->pdata = *pdata;
724 pdata = &ac->pdata;
760 __set_bit(ac->pdata.ev_type, input_dev->evbit);
762 if (ac->pdata.ev_type == EV_REL) {
772 if (pdata->data_range & FULL_RES)
783 __set_bit(pdata->ev_code_tap[ADXL_X_AXIS], input_dev->keybit);
784 __set_bit(pdata->ev_code_tap[ADXL_Y_AXIS], input_dev->keybit);
785 __set_bit(pdata->ev_code_tap[ADXL_Z_AXIS], input_dev->keybit);
787 if (pdata->ev_code_ff) {
789 __set_bit(pdata->ev_code_ff, input_dev->keybit);
792 if (pdata->ev_code_act_inactivity)
793 __set_bit(pdata->ev_code_act_inactivity, input_dev->keybit);
797 if (pdata->watermark) {
799 if (!FIFO_MODE(pdata->fifo_mode))
800 ac->pdata.fifo_mode |= FIFO_STREAM;
805 if (pdata->tap_axis_control & (TAP_X_EN | TAP_Y_EN | TAP_Z_EN))
808 if (FIFO_MODE(pdata->fifo_mode) == FIFO_BYPASS)
829 AC_WRITE(ac, THRESH_TAP, pdata->tap_threshold);
830 AC_WRITE(ac, OFSX, pdata->x_axis_offset);
831 ac->hwcal.x = pdata->x_axis_offset;
832 AC_WRITE(ac, OFSY, pdata->y_axis_offset);
833 ac->hwcal.y = pdata->y_axis_offset;
834 AC_WRITE(ac, OFSZ, pdata->z_axis_offset);
835 ac->hwcal.z = pdata->z_axis_offset;
836 AC_WRITE(ac, THRESH_TAP, pdata->tap_threshold);
837 AC_WRITE(ac, DUR, pdata->tap_duration);
838 AC_WRITE(ac, LATENT, pdata->tap_latency);
839 AC_WRITE(ac, WINDOW, pdata->tap_window);
840 AC_WRITE(ac, THRESH_ACT, pdata->activity_threshold);
841 AC_WRITE(ac, THRESH_INACT, pdata->inactivity_threshold);
842 AC_WRITE(ac, TIME_INACT, pdata->inactivity_time);
843 AC_WRITE(ac, THRESH_FF, pdata->free_fall_threshold);
844 AC_WRITE(ac, TIME_FF, pdata->free_fall_time);
845 AC_WRITE(ac, TAP_AXES, pdata->tap_axis_control);
846 AC_WRITE(ac, ACT_INACT_CTL, pdata->act_axis_control);
847 AC_WRITE(ac, BW_RATE, RATE(ac->pdata.data_rate) |
848 (pdata->low_power_mode ? LOW_POWER : 0));
849 AC_WRITE(ac, DATA_FORMAT, pdata->data_range);
850 AC_WRITE(ac, FIFO_CTL, FIFO_MODE(pdata->fifo_mode) |
851 SAMPLES(pdata->watermark));
853 if (pdata->use_int2) {
861 if (ac->model == 346 && ac->pdata.orientation_enable) {
863 ORIENT_DEADZONE(ac->pdata.deadzone_angle) |
864 ORIENT_DIVISOR(ac->pdata.divisor_length));
869 if (pdata->orientation_enable & ADXL_EN_ORIENTATION_3D)
870 for (i = 0; i < ARRAY_SIZE(pdata->ev_codes_orient_3d); i++)
871 __set_bit(pdata->ev_codes_orient_3d[i],
874 if (pdata->orientation_enable & ADXL_EN_ORIENTATION_2D)
875 for (i = 0; i < ARRAY_SIZE(pdata->ev_codes_orient_2d); i++)
876 __set_bit(pdata->ev_codes_orient_2d[i],
879 ac->pdata.orientation_enable = 0;
884 ac->pdata.power_mode &= (PCTL_AUTO_SLEEP | PCTL_LINK);