From a9fd8912c8900615bc7a37b1e73e2a3e378c0a3b Mon Sep 17 00:00:00 2001
From: S K <sylvain_kerjean@hotmail.com>
Date: Sun, 21 Feb 2016 23:36:29 +0100
Subject: [PATCH] cleaning for ticket #12658
---
.../kernel/bus_managers/ps2/ps2_elantech.cpp | 26 ----------------------
1 file changed, 26 deletions(-)
diff --git a/src/add-ons/kernel/bus_managers/ps2/ps2_elantech.cpp b/src/add-ons/kernel/bus_managers/ps2/ps2_elantech.cpp
index e3a33df..f1cec03 100644
a
|
b
|
default_settings(touchpad_settings *set)
|
210 | 210 | static status_t |
211 | 211 | synaptics_dev_send_command(ps2_dev* dev, uint8 cmd, uint8 *in, int in_count) |
212 | 212 | { |
213 | | uint8 val; |
214 | 213 | if (ps2_dev_sliced_command(dev, cmd) != B_OK |
215 | 214 | || ps2_dev_command(dev, PS2_CMD_MOUSE_GET_INFO, NULL, 0, in, in_count) |
216 | 215 | != B_OK) { |
… |
… |
synaptics_dev_send_command(ps2_dev* dev, uint8 cmd, uint8 *in, int in_count)
|
224 | 223 | static status_t |
225 | 224 | elantech_dev_send_command(ps2_dev* dev, uint8 cmd, uint8 *in, int in_count) |
226 | 225 | { |
227 | | uint8 val; |
228 | 226 | if (ps2_dev_command(dev, ELANTECH_CMD_PS2_CUSTOM_CMD) != B_OK |
229 | 227 | || ps2_dev_command(dev, cmd) != B_OK |
230 | 228 | || ps2_dev_command(dev, PS2_CMD_MOUSE_GET_INFO, NULL, 0, in, in_count) |
… |
… |
elantech_dev_send_command(ps2_dev* dev, uint8 cmd, uint8 *in, int in_count)
|
239 | 237 | status_t |
240 | 238 | probe_elantech(ps2_dev* dev) |
241 | 239 | { |
242 | | int i; |
243 | 240 | uint8 val[3]; |
244 | 241 | TRACE("ELANTECH: probe\n"); |
245 | 242 | |
… |
… |
elantech_read_reg(elantech_cookie* cookie, uint8 reg, uint8 *value)
|
387 | 384 | return B_OK; |
388 | 385 | } |
389 | 386 | |
390 | | |
391 | | |
392 | | static status_t |
393 | | switch_hardware_tab(ps2_dev* dev, bool on) |
394 | | { |
395 | | uint8 val[3]; |
396 | | uint8 arg = 0x00; |
397 | | uint8 command = PS2_CMD_MOUSE_SET_RES; |
398 | | if (on) { |
399 | | arg = 0x0A; |
400 | | command = PS2_CMD_SET_SAMPLE_RATE; |
401 | | } |
402 | | if (ps2_dev_command(dev, PS2_CMD_MOUSE_GET_INFO, NULL, 0, val, 3) != B_OK |
403 | | || ps2_dev_command(dev, PS2_CMD_DISABLE, NULL, 0, NULL, 0) != B_OK |
404 | | || ps2_dev_command(dev, PS2_CMD_DISABLE, NULL, 0, NULL, 0) != B_OK |
405 | | || ps2_dev_command(dev, command, &arg, 1, NULL, 0) != B_OK) |
406 | | return B_ERROR; |
407 | | |
408 | | return B_OK; |
409 | | } |
410 | | |
411 | | |
412 | 387 | static status_t |
413 | 388 | get_resolution_v4(elantech_cookie* cookie, uint32* x, uint32* y) |
414 | 389 | { |
… |
… |
static status_t
|
426 | 401 | get_range(elantech_cookie* cookie, uint32* x_min, uint32* y_min, uint32* x_max, |
427 | 402 | uint32* y_max, uint32 *width) |
428 | 403 | { |
429 | | status_t status = B_OK; |
430 | 404 | uint8 val[3]; |
431 | 405 | switch (cookie->version) { |
432 | 406 | case 1: |