2 * Cypress Trackpad PS/2 mouse driver
4 * Copyright (c) 2012 Cypress Semiconductor Corporation.
7 * Dudley Du <dudl@cypress.com>
9 * Additional contributors include:
10 * Kamal Mostafa <kamal@canonical.com>
11 * Kyle Fazzari <git@status.e4ward.com>
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License version 2 as published by
15 * the Free Software Foundation.
18 #include <linux/init.h>
19 #include <linux/module.h>
20 #include <linux/kernel.h>
21 #include <linux/slab.h>
22 #include <linux/serio.h>
23 #include <linux/libps2.h>
24 #include <linux/input.h>
25 #include <linux/input/mt.h>
26 #include <linux/sched.h>
27 #include <linux/wait.h>
29 #include "cypress_ps2.h"
31 #undef CYTP_DEBUG_VERBOSE /* define this and DEBUG for more verbose dump */
33 static void cypress_set_packet_size(struct psmouse *psmouse, unsigned int n)
35 struct cytp_data *cytp = psmouse->private;
39 static const unsigned char cytp_rate[] = {10, 20, 40, 60, 100, 200};
40 static const unsigned char cytp_resolution[] = {0x00, 0x01, 0x02, 0x03};
42 static int cypress_ps2_sendbyte(struct psmouse *psmouse, int value)
44 struct ps2dev *ps2dev = &psmouse->ps2dev;
46 if (ps2_sendbyte(ps2dev, value & 0xff, CYTP_CMD_TIMEOUT) < 0) {
48 "sending command 0x%02x failed, resp 0x%02x\n",
49 value & 0xff, ps2dev->nak);
50 if (ps2dev->nak == CYTP_PS2_RETRY)
51 return CYTP_PS2_RETRY;
53 return CYTP_PS2_ERROR;
56 #ifdef CYTP_DEBUG_VERBOSE
57 psmouse_dbg(psmouse, "sending command 0x%02x succeeded, resp 0xfa\n",
64 static int cypress_ps2_ext_cmd(struct psmouse *psmouse, unsigned short cmd,
67 struct ps2dev *ps2dev = &psmouse->ps2dev;
68 int tries = CYTP_PS2_CMD_TRIES;
71 ps2_begin_command(ps2dev);
75 * Send extension command byte (0xE8 or 0xF3).
76 * If sending the command fails, send recovery command
77 * to make the device return to the ready state.
79 rc = cypress_ps2_sendbyte(psmouse, cmd & 0xff);
80 if (rc == CYTP_PS2_RETRY) {
81 rc = cypress_ps2_sendbyte(psmouse, 0x00);
82 if (rc == CYTP_PS2_RETRY)
83 rc = cypress_ps2_sendbyte(psmouse, 0x0a);
85 if (rc == CYTP_PS2_ERROR)
88 rc = cypress_ps2_sendbyte(psmouse, data);
89 if (rc == CYTP_PS2_RETRY)
90 rc = cypress_ps2_sendbyte(psmouse, data);
91 if (rc == CYTP_PS2_ERROR)
95 } while (--tries > 0);
97 ps2_end_command(ps2dev);
102 static int cypress_ps2_read_cmd_status(struct psmouse *psmouse,
104 unsigned char *param)
107 struct ps2dev *ps2dev = &psmouse->ps2dev;
108 enum psmouse_state old_state;
111 ps2_begin_command(&psmouse->ps2dev);
113 old_state = psmouse->state;
114 psmouse->state = PSMOUSE_CMD_MODE;
117 pktsize = (cmd == CYTP_CMD_READ_TP_METRICS) ? 8 : 3;
118 memset(param, 0, pktsize);
120 rc = cypress_ps2_sendbyte(psmouse, 0xe9);
124 wait_event_timeout(ps2dev->wait,
125 (psmouse->pktcnt >= pktsize),
126 msecs_to_jiffies(CYTP_CMD_TIMEOUT));
128 memcpy(param, psmouse->packet, pktsize);
130 psmouse_dbg(psmouse, "Command 0x%02x response data (0x): %*ph\n",
131 cmd, pktsize, param);
134 psmouse->state = old_state;
137 ps2_end_command(&psmouse->ps2dev);
142 static bool cypress_verify_cmd_state(struct psmouse *psmouse,
143 unsigned char cmd, unsigned char *param)
145 bool rate_match = false;
146 bool resolution_match = false;
149 /* callers will do further checking. */
150 if (cmd == CYTP_CMD_READ_CYPRESS_ID ||
151 cmd == CYTP_CMD_STANDARD_MODE ||
152 cmd == CYTP_CMD_READ_TP_METRICS)
155 if ((~param[0] & DFLT_RESP_BITS_VALID) == DFLT_RESP_BITS_VALID &&
156 (param[0] & DFLT_RESP_BIT_MODE) == DFLT_RESP_STREAM_MODE) {
157 for (i = 0; i < sizeof(cytp_resolution); i++)
158 if (cytp_resolution[i] == param[1])
159 resolution_match = true;
161 for (i = 0; i < sizeof(cytp_rate); i++)
162 if (cytp_rate[i] == param[2])
165 if (resolution_match && rate_match)
169 psmouse_dbg(psmouse, "verify cmd state failed.\n");
173 static int cypress_send_ext_cmd(struct psmouse *psmouse, unsigned char cmd,
174 unsigned char *param)
176 int tries = CYTP_PS2_CMD_TRIES;
179 psmouse_dbg(psmouse, "send extension cmd 0x%02x, [%d %d %d %d]\n",
180 cmd, DECODE_CMD_AA(cmd), DECODE_CMD_BB(cmd),
181 DECODE_CMD_CC(cmd), DECODE_CMD_DD(cmd));
184 cypress_ps2_ext_cmd(psmouse,
185 PSMOUSE_CMD_SETRES, DECODE_CMD_DD(cmd));
186 cypress_ps2_ext_cmd(psmouse,
187 PSMOUSE_CMD_SETRES, DECODE_CMD_CC(cmd));
188 cypress_ps2_ext_cmd(psmouse,
189 PSMOUSE_CMD_SETRES, DECODE_CMD_BB(cmd));
190 cypress_ps2_ext_cmd(psmouse,
191 PSMOUSE_CMD_SETRES, DECODE_CMD_AA(cmd));
193 rc = cypress_ps2_read_cmd_status(psmouse, cmd, param);
197 if (cypress_verify_cmd_state(psmouse, cmd, param))
200 } while (--tries > 0);
205 int cypress_detect(struct psmouse *psmouse, bool set_properties)
207 unsigned char param[3];
209 if (cypress_send_ext_cmd(psmouse, CYTP_CMD_READ_CYPRESS_ID, param))
212 /* Check for Cypress Trackpad signature bytes: 0x33 0xCC */
213 if (param[0] != 0x33 || param[1] != 0xCC)
216 if (set_properties) {
217 psmouse->vendor = "Cypress";
218 psmouse->name = "Trackpad";
224 static int cypress_read_fw_version(struct psmouse *psmouse)
226 struct cytp_data *cytp = psmouse->private;
227 unsigned char param[3];
229 if (cypress_send_ext_cmd(psmouse, CYTP_CMD_READ_CYPRESS_ID, param))
232 /* Check for Cypress Trackpad signature bytes: 0x33 0xCC */
233 if (param[0] != 0x33 || param[1] != 0xCC)
236 cytp->fw_version = param[2] & FW_VERSION_MASX;
237 cytp->tp_metrics_supported = (param[2] & TP_METRICS_MASK) ? 1 : 0;
239 psmouse_dbg(psmouse, "cytp->fw_version = %d\n", cytp->fw_version);
240 psmouse_dbg(psmouse, "cytp->tp_metrics_supported = %d\n",
241 cytp->tp_metrics_supported);
246 static int cypress_read_tp_metrics(struct psmouse *psmouse)
248 struct cytp_data *cytp = psmouse->private;
249 unsigned char param[8];
251 /* set default values for tp metrics. */
252 cytp->tp_width = CYTP_DEFAULT_WIDTH;
253 cytp->tp_high = CYTP_DEFAULT_HIGH;
254 cytp->tp_max_abs_x = CYTP_ABS_MAX_X;
255 cytp->tp_max_abs_y = CYTP_ABS_MAX_Y;
256 cytp->tp_min_pressure = CYTP_MIN_PRESSURE;
257 cytp->tp_max_pressure = CYTP_MAX_PRESSURE;
258 cytp->tp_res_x = cytp->tp_max_abs_x / cytp->tp_width;
259 cytp->tp_res_y = cytp->tp_max_abs_y / cytp->tp_high;
261 memset(param, 0, sizeof(param));
262 if (cypress_send_ext_cmd(psmouse, CYTP_CMD_READ_TP_METRICS, param) == 0) {
263 /* Update trackpad parameters. */
264 cytp->tp_max_abs_x = (param[1] << 8) | param[0];
265 cytp->tp_max_abs_y = (param[3] << 8) | param[2];
266 cytp->tp_min_pressure = param[4];
267 cytp->tp_max_pressure = param[5];
270 if (!cytp->tp_max_pressure ||
271 cytp->tp_max_pressure < cytp->tp_min_pressure ||
272 !cytp->tp_width || !cytp->tp_high ||
273 !cytp->tp_max_abs_x ||
274 cytp->tp_max_abs_x < cytp->tp_width ||
275 !cytp->tp_max_abs_y ||
276 cytp->tp_max_abs_y < cytp->tp_high)
279 cytp->tp_res_x = cytp->tp_max_abs_x / cytp->tp_width;
280 cytp->tp_res_y = cytp->tp_max_abs_y / cytp->tp_high;
282 #ifdef CYTP_DEBUG_VERBOSE
283 psmouse_dbg(psmouse, "Dump trackpad hardware configuration as below:\n");
284 psmouse_dbg(psmouse, "cytp->tp_width = %d\n", cytp->tp_width);
285 psmouse_dbg(psmouse, "cytp->tp_high = %d\n", cytp->tp_high);
286 psmouse_dbg(psmouse, "cytp->tp_max_abs_x = %d\n", cytp->tp_max_abs_x);
287 psmouse_dbg(psmouse, "cytp->tp_max_abs_y = %d\n", cytp->tp_max_abs_y);
288 psmouse_dbg(psmouse, "cytp->tp_min_pressure = %d\n", cytp->tp_min_pressure);
289 psmouse_dbg(psmouse, "cytp->tp_max_pressure = %d\n", cytp->tp_max_pressure);
290 psmouse_dbg(psmouse, "cytp->tp_res_x = %d\n", cytp->tp_res_x);
291 psmouse_dbg(psmouse, "cytp->tp_res_y = %d\n", cytp->tp_res_y);
293 psmouse_dbg(psmouse, "tp_type_APA = %d\n",
294 (param[6] & TP_METRICS_BIT_APA) ? 1 : 0);
295 psmouse_dbg(psmouse, "tp_type_MTG = %d\n",
296 (param[6] & TP_METRICS_BIT_MTG) ? 1 : 0);
297 psmouse_dbg(psmouse, "tp_palm = %d\n",
298 (param[6] & TP_METRICS_BIT_PALM) ? 1 : 0);
299 psmouse_dbg(psmouse, "tp_stubborn = %d\n",
300 (param[6] & TP_METRICS_BIT_STUBBORN) ? 1 : 0);
301 psmouse_dbg(psmouse, "tp_1f_jitter = %d\n",
302 (param[6] & TP_METRICS_BIT_1F_JITTER) >> 2);
303 psmouse_dbg(psmouse, "tp_2f_jitter = %d\n",
304 (param[6] & TP_METRICS_BIT_2F_JITTER) >> 4);
305 psmouse_dbg(psmouse, "tp_1f_spike = %d\n",
306 param[7] & TP_METRICS_BIT_1F_SPIKE);
307 psmouse_dbg(psmouse, "tp_2f_spike = %d\n",
308 (param[7] & TP_METRICS_BIT_2F_SPIKE) >> 2);
309 psmouse_dbg(psmouse, "tp_abs_packet_format_set = %d\n",
310 (param[7] & TP_METRICS_BIT_ABS_PKT_FORMAT_SET) >> 4);
316 static int cypress_query_hardware(struct psmouse *psmouse)
318 struct cytp_data *cytp = psmouse->private;
321 ret = cypress_read_fw_version(psmouse);
325 if (cytp->tp_metrics_supported) {
326 ret = cypress_read_tp_metrics(psmouse);
334 static int cypress_set_absolute_mode(struct psmouse *psmouse)
336 struct cytp_data *cytp = psmouse->private;
337 unsigned char param[3];
339 if (cypress_send_ext_cmd(psmouse, CYTP_CMD_ABS_WITH_PRESSURE_MODE, param) < 0)
342 cytp->mode = (cytp->mode & ~CYTP_BIT_ABS_REL_MASK)
343 | CYTP_BIT_ABS_PRESSURE;
344 cypress_set_packet_size(psmouse, 5);
350 * Reset trackpad device.
351 * This is also the default mode when trackpad powered on.
353 static void cypress_reset(struct psmouse *psmouse)
355 struct cytp_data *cytp = psmouse->private;
359 psmouse_reset(psmouse);
362 static int cypress_set_input_params(struct input_dev *input,
363 struct cytp_data *cytp)
367 if (!cytp->tp_res_x || !cytp->tp_res_y)
370 __set_bit(EV_ABS, input->evbit);
371 input_set_abs_params(input, ABS_X, 0, cytp->tp_max_abs_x, 0, 0);
372 input_set_abs_params(input, ABS_Y, 0, cytp->tp_max_abs_y, 0, 0);
373 input_set_abs_params(input, ABS_PRESSURE,
374 cytp->tp_min_pressure, cytp->tp_max_pressure, 0, 0);
375 input_set_abs_params(input, ABS_TOOL_WIDTH, 0, 255, 0, 0);
377 /* finger position */
378 input_set_abs_params(input, ABS_MT_POSITION_X, 0, cytp->tp_max_abs_x, 0, 0);
379 input_set_abs_params(input, ABS_MT_POSITION_Y, 0, cytp->tp_max_abs_y, 0, 0);
380 input_set_abs_params(input, ABS_MT_PRESSURE, 0, 255, 0, 0);
382 ret = input_mt_init_slots(input, CYTP_MAX_MT_SLOTS,
383 INPUT_MT_DROP_UNUSED|INPUT_MT_TRACK);
387 __set_bit(INPUT_PROP_SEMI_MT, input->propbit);
389 input_abs_set_res(input, ABS_X, cytp->tp_res_x);
390 input_abs_set_res(input, ABS_Y, cytp->tp_res_y);
392 input_abs_set_res(input, ABS_MT_POSITION_X, cytp->tp_res_x);
393 input_abs_set_res(input, ABS_MT_POSITION_Y, cytp->tp_res_y);
395 __set_bit(BTN_TOUCH, input->keybit);
396 __set_bit(BTN_TOOL_FINGER, input->keybit);
397 __set_bit(BTN_TOOL_DOUBLETAP, input->keybit);
398 __set_bit(BTN_TOOL_TRIPLETAP, input->keybit);
399 __set_bit(BTN_TOOL_QUADTAP, input->keybit);
400 __set_bit(BTN_TOOL_QUINTTAP, input->keybit);
402 __clear_bit(EV_REL, input->evbit);
403 __clear_bit(REL_X, input->relbit);
404 __clear_bit(REL_Y, input->relbit);
406 __set_bit(INPUT_PROP_BUTTONPAD, input->propbit);
407 __set_bit(EV_KEY, input->evbit);
408 __set_bit(BTN_LEFT, input->keybit);
409 __set_bit(BTN_RIGHT, input->keybit);
410 __set_bit(BTN_MIDDLE, input->keybit);
412 input_set_drvdata(input, cytp);
417 static int cypress_get_finger_count(unsigned char header_byte)
419 unsigned char bits6_7;
422 bits6_7 = header_byte >> 6;
423 finger_count = bits6_7 & 0x03;
425 if (finger_count == 1)
428 if (header_byte & ABS_HSCROLL_BIT) {
429 /* HSCROLL gets added on to 0 finger count. */
430 switch (finger_count) {
434 /* Invalid contact (e.g. palm). Ignore it. */
443 static int cypress_parse_packet(struct psmouse *psmouse,
444 struct cytp_data *cytp, struct cytp_report_data *report_data)
446 unsigned char *packet = psmouse->packet;
447 unsigned char header_byte = packet[0];
450 memset(report_data, 0, sizeof(struct cytp_report_data));
452 contact_cnt = cypress_get_finger_count(header_byte);
454 if (contact_cnt < 0) /* e.g. palm detect */
457 report_data->contact_cnt = contact_cnt;
459 report_data->tap = (header_byte & ABS_MULTIFINGER_TAP) ? 1 : 0;
461 if (report_data->contact_cnt == 1) {
462 report_data->contacts[0].x =
463 ((packet[1] & 0x70) << 4) | packet[2];
464 report_data->contacts[0].y =
465 ((packet[1] & 0x07) << 8) | packet[3];
466 if (cytp->mode & CYTP_BIT_ABS_PRESSURE)
467 report_data->contacts[0].z = packet[4];
469 } else if (report_data->contact_cnt >= 2) {
470 report_data->contacts[0].x =
471 ((packet[1] & 0x70) << 4) | packet[2];
472 report_data->contacts[0].y =
473 ((packet[1] & 0x07) << 8) | packet[3];
474 if (cytp->mode & CYTP_BIT_ABS_PRESSURE)
475 report_data->contacts[0].z = packet[4];
477 report_data->contacts[1].x =
478 ((packet[5] & 0xf0) << 4) | packet[6];
479 report_data->contacts[1].y =
480 ((packet[5] & 0x0f) << 8) | packet[7];
481 if (cytp->mode & CYTP_BIT_ABS_PRESSURE)
482 report_data->contacts[1].z = report_data->contacts[0].z;
485 report_data->left = (header_byte & BTN_LEFT_BIT) ? 1 : 0;
486 report_data->right = (header_byte & BTN_RIGHT_BIT) ? 1 : 0;
489 * This is only true if one of the mouse buttons were tapped. Make
490 * sure it doesn't turn into a click. The regular tap-to-click
491 * functionality will handle that on its own. If we don't do this,
492 * disabling tap-to-click won't affect the mouse button zones.
494 if (report_data->tap)
495 report_data->left = 0;
497 #ifdef CYTP_DEBUG_VERBOSE
500 int n = report_data->contact_cnt;
501 psmouse_dbg(psmouse, "Dump parsed report data as below:\n");
502 psmouse_dbg(psmouse, "contact_cnt = %d\n",
503 report_data->contact_cnt);
504 if (n > CYTP_MAX_MT_SLOTS)
505 n = CYTP_MAX_MT_SLOTS;
506 for (i = 0; i < n; i++)
507 psmouse_dbg(psmouse, "contacts[%d] = {%d, %d, %d}\n", i,
508 report_data->contacts[i].x,
509 report_data->contacts[i].y,
510 report_data->contacts[i].z);
511 psmouse_dbg(psmouse, "left = %d\n", report_data->left);
512 psmouse_dbg(psmouse, "right = %d\n", report_data->right);
513 psmouse_dbg(psmouse, "middle = %d\n", report_data->middle);
520 static void cypress_process_packet(struct psmouse *psmouse, bool zero_pkt)
523 struct input_dev *input = psmouse->dev;
524 struct cytp_data *cytp = psmouse->private;
525 struct cytp_report_data report_data;
526 struct cytp_contact *contact;
527 struct input_mt_pos pos[CYTP_MAX_MT_SLOTS];
528 int slots[CYTP_MAX_MT_SLOTS];
531 if (cypress_parse_packet(psmouse, cytp, &report_data))
534 n = report_data.contact_cnt;
536 if (n > CYTP_MAX_MT_SLOTS)
537 n = CYTP_MAX_MT_SLOTS;
539 for (i = 0; i < n; i++) {
540 contact = &report_data.contacts[i];
541 pos[i].x = contact->x;
542 pos[i].y = contact->y;
545 input_mt_assign_slots(input, slots, pos, n);
547 for (i = 0; i < n; i++) {
548 contact = &report_data.contacts[i];
549 input_mt_slot(input, slots[i]);
550 input_mt_report_slot_state(input, MT_TOOL_FINGER, true);
551 input_report_abs(input, ABS_MT_POSITION_X, contact->x);
552 input_report_abs(input, ABS_MT_POSITION_Y, contact->y);
553 input_report_abs(input, ABS_MT_PRESSURE, contact->z);
556 input_mt_sync_frame(input);
558 input_mt_report_finger_count(input, report_data.contact_cnt);
560 input_report_key(input, BTN_LEFT, report_data.left);
561 input_report_key(input, BTN_RIGHT, report_data.right);
562 input_report_key(input, BTN_MIDDLE, report_data.middle);
567 static psmouse_ret_t cypress_validate_byte(struct psmouse *psmouse)
570 int index = psmouse->pktcnt - 1;
571 unsigned char *packet = psmouse->packet;
572 struct cytp_data *cytp = psmouse->private;
574 if (index < 0 || index > cytp->pkt_size)
575 return PSMOUSE_BAD_DATA;
577 if (index == 0 && (packet[0] & 0xfc) == 0) {
578 /* call packet process for reporting finger leave. */
579 cypress_process_packet(psmouse, 1);
580 return PSMOUSE_FULL_PACKET;
584 * Perform validation (and adjust packet size) based only on the
585 * first byte; allow all further bytes through.
588 return PSMOUSE_GOOD_DATA;
591 * If absolute/relative mode bit has not been set yet, just pass
594 if ((cytp->mode & CYTP_BIT_ABS_REL_MASK) == 0)
595 return PSMOUSE_GOOD_DATA;
597 if ((packet[0] & 0x08) == 0x08)
598 return PSMOUSE_BAD_DATA;
600 contact_cnt = cypress_get_finger_count(packet[0]);
603 return PSMOUSE_BAD_DATA;
605 if (cytp->mode & CYTP_BIT_ABS_NO_PRESSURE)
606 cypress_set_packet_size(psmouse, contact_cnt == 2 ? 7 : 4);
608 cypress_set_packet_size(psmouse, contact_cnt == 2 ? 8 : 5);
610 return PSMOUSE_GOOD_DATA;
613 static psmouse_ret_t cypress_protocol_handler(struct psmouse *psmouse)
615 struct cytp_data *cytp = psmouse->private;
617 if (psmouse->pktcnt >= cytp->pkt_size) {
618 cypress_process_packet(psmouse, 0);
619 return PSMOUSE_FULL_PACKET;
622 return cypress_validate_byte(psmouse);
625 static void cypress_set_rate(struct psmouse *psmouse, unsigned int rate)
627 struct cytp_data *cytp = psmouse->private;
631 cytp->mode |= CYTP_BIT_HIGH_RATE;
634 cytp->mode &= ~CYTP_BIT_HIGH_RATE;
637 ps2_command(&psmouse->ps2dev, (unsigned char *)&psmouse->rate,
638 PSMOUSE_CMD_SETRATE);
641 static void cypress_disconnect(struct psmouse *psmouse)
643 cypress_reset(psmouse);
644 kfree(psmouse->private);
645 psmouse->private = NULL;
648 static int cypress_reconnect(struct psmouse *psmouse)
650 int tries = CYTP_PS2_CMD_TRIES;
654 cypress_reset(psmouse);
655 rc = cypress_detect(psmouse, false);
656 } while (rc && (--tries > 0));
659 psmouse_err(psmouse, "Reconnect: unable to detect trackpad.\n");
663 if (cypress_set_absolute_mode(psmouse)) {
664 psmouse_err(psmouse, "Reconnect: Unable to initialize Cypress absolute mode.\n");
671 int cypress_init(struct psmouse *psmouse)
673 struct cytp_data *cytp;
675 cytp = (struct cytp_data *)kzalloc(sizeof(struct cytp_data), GFP_KERNEL);
676 psmouse->private = (void *)cytp;
680 cypress_reset(psmouse);
682 psmouse->pktsize = 8;
684 if (cypress_query_hardware(psmouse)) {
685 psmouse_err(psmouse, "Unable to query Trackpad hardware.\n");
689 if (cypress_set_absolute_mode(psmouse)) {
690 psmouse_err(psmouse, "init: Unable to initialize Cypress absolute mode.\n");
694 if (cypress_set_input_params(psmouse->dev, cytp) < 0) {
695 psmouse_err(psmouse, "init: Unable to set input params.\n");
700 psmouse->protocol_handler = cypress_protocol_handler;
701 psmouse->set_rate = cypress_set_rate;
702 psmouse->disconnect = cypress_disconnect;
703 psmouse->reconnect = cypress_reconnect;
704 psmouse->cleanup = cypress_reset;
705 psmouse->resync_time = 0;
711 * Reset Cypress Trackpad as a standard mouse. Then
712 * let psmouse driver commmunicating with it as default PS2 mouse.
714 cypress_reset(psmouse);
716 psmouse->private = NULL;
722 bool cypress_supported(void)