Lines Matching defs:info
27 if (etd->info.debug) \
149 switch (etd->info.hw_version) {
181 else if (etd->info.hw_version != 4)
204 switch (etd->info.hw_version) {
311 static inline int elantech_is_buttonpad(struct elantech_device_info *info)
313 return info->fw_version & 0x001000;
327 if (etd->info.fw_version < 0x020000) {
342 if (etd->info.jumpy_cursor) {
372 if (etd->info.fw_version < 0x020000 &&
373 (etd->info.capabilities[0] & ETP_CAP_HAS_ROCKER)) {
481 if (etd->info.reports_pressure) {
547 if (etd->info.debug == 1)
626 if (elantech_is_buttonpad(&etd->info))
644 if (elantech_is_buttonpad(&etd->info))
773 if (etd->info.fw_version < 0x020000) {
818 if (etd->info.reports_pressure)
855 if (etd->info.crc_enabled) {
886 ic_version = (etd->info.fw_version & 0x0f0000) >> 16;
895 if (etd->info.crc_enabled)
897 else if (ic_version == 7 && etd->info.samples[1] == 0x2A)
931 if (etd->info.debug > 1)
934 switch (etd->info.hw_version) {
936 if (etd->info.paritycheck && !elantech_packet_check_v1(psmouse))
947 if (etd->info.paritycheck && !elantech_packet_check_v2(psmouse))
1020 switch (etd->info.hw_version) {
1043 if (etd->info.set_hw_resolution)
1080 } else if (etd->info.hw_version == 1 &&
1126 if (elantech_is_buttonpad(&etd->info)) {
1169 struct elantech_device_info *info = &etd->info;
1170 unsigned int x_min = info->x_min, y_min = info->y_min,
1171 x_max = info->x_max, y_max = info->y_max,
1172 width = info->width;
1180 if (info->has_middle_button)
1189 switch (info->hw_version) {
1192 if (info->fw_version < 0x020000 &&
1193 (info->capabilities[0] & ETP_CAP_HAS_ROCKER)) {
1206 if (info->hw_version == 3)
1210 if (info->reports_pressure) {
1250 input_abs_set_res(dev, ABS_X, info->x_res);
1251 input_abs_set_res(dev, ABS_Y, info->y_res);
1252 if (info->hw_version > 1) {
1253 input_abs_set_res(dev, ABS_MT_POSITION_X, info->x_res);
1254 input_abs_set_res(dev, ABS_MT_POSITION_Y, info->y_res);
1302 if (etd->info.hw_version == 1) {
1329 .field_offset = offsetof(struct elantech_data, info) + \
1612 static int elantech_set_properties(struct elantech_device_info *info)
1615 info->ic_version = (info->fw_version & 0x0f0000) >> 16;
1618 if (info->fw_version < 0x020030 || info->fw_version == 0x020600)
1619 info->hw_version = 1;
1621 switch (info->ic_version) {
1624 info->hw_version = 2;
1627 info->hw_version = 3;
1630 info->hw_version = 4;
1638 info->pattern = 0x00;
1639 if (info->ic_version == 0x0f && (info->fw_version & 0xff) <= 0x02)
1640 info->pattern = info->fw_version & 0xff;
1643 info->send_cmd = info->hw_version >= 3 ? elantech_send_cmd :
1647 info->paritycheck = 1;
1654 info->jumpy_cursor =
1655 (info->fw_version == 0x020022 || info->fw_version == 0x020600);
1657 if (info->hw_version > 1) {
1659 info->debug = 1;
1661 if (info->fw_version >= 0x020800)
1662 info->reports_pressure = true;
1669 info->crc_enabled = (info->fw_version & 0x4000) == 0x4000 ||
1673 info->set_hw_resolution = !dmi_check_system(no_hw_res_dmi_table);
1679 struct elantech_device_info *info)
1685 memset(info, 0, sizeof(*info));
1694 info->fw_version = (param[0] << 16) | (param[1] << 8) | param[2];
1696 if (elantech_set_properties(info)) {
1702 info->hw_version, param[0], param[1], param[2]);
1704 if (info->send_cmd(psmouse, ETP_CAPABILITIES_QUERY,
1705 info->capabilities)) {
1711 info->capabilities[0], info->capabilities[1],
1712 info->capabilities[2]);
1714 if (info->hw_version != 1) {
1715 if (info->send_cmd(psmouse, ETP_SAMPLE_QUERY, info->samples)) {
1721 info->samples[0],
1722 info->samples[1],
1723 info->samples[2]);
1726 if (info->pattern > 0x00 && info->ic_version == 0xf) {
1727 if (info->send_cmd(psmouse, ETP_ICBODY_QUERY, ic_body)) {
1731 info->ic_version = be16_to_cpup((__be16 *)ic_body);
1734 info->ic_version, ic_body[2]);
1737 info->product_id = be16_to_cpup((__be16 *)info->samples);
1738 if (info->pattern == 0x00)
1739 info->product_id &= 0xff;
1741 if (info->samples[1] == 0x74 && info->hw_version == 0x03) {
1753 info->has_trackpoint = (info->capabilities[0] & 0x80) == 0x80;
1755 if (info->has_trackpoint && info->ic_version == 0x0011 &&
1756 (info->product_id == 0x08 || info->product_id == 0x09 ||
1757 info->product_id == 0x0d || info->product_id == 0x0e)) {
1772 info->x_res = 31;
1773 info->y_res = 31;
1774 if (info->hw_version == 4) {
1776 &info->x_res,
1777 &info->y_res,
1778 &info->bus)) {
1785 switch (info->hw_version) {
1787 info->x_min = ETP_XMIN_V1;
1788 info->y_min = ETP_YMIN_V1;
1789 info->x_max = ETP_XMAX_V1;
1790 info->y_max = ETP_YMAX_V1;
1794 if (info->fw_version == 0x020800 ||
1795 info->fw_version == 0x020b00 ||
1796 info->fw_version == 0x020030) {
1797 info->x_min = ETP_XMIN_V2;
1798 info->y_min = ETP_YMIN_V2;
1799 info->x_max = ETP_XMAX_V2;
1800 info->y_max = ETP_YMAX_V2;
1805 i = (info->fw_version > 0x020800 &&
1806 info->fw_version < 0x020900) ? 1 : 2;
1808 if (info->send_cmd(psmouse, ETP_FW_ID_QUERY, param))
1813 if (((info->fw_version >> 16) == 0x14) && fixed_dpi) {
1814 if (info->send_cmd(psmouse, ETP_SAMPLE_QUERY, param))
1817 info->x_max = (info->capabilities[1] - i) * param[1] / 2;
1818 info->y_max = (info->capabilities[2] - i) * param[2] / 2;
1819 } else if (info->fw_version == 0x040216) {
1820 info->x_max = 819;
1821 info->y_max = 405;
1822 } else if (info->fw_version == 0x040219 || info->fw_version == 0x040215) {
1823 info->x_max = 900;
1824 info->y_max = 500;
1826 info->x_max = (info->capabilities[1] - i) * 64;
1827 info->y_max = (info->capabilities[2] - i) * 64;
1833 if (info->send_cmd(psmouse, ETP_FW_ID_QUERY, param))
1836 info->x_max = (0x0f & param[0]) << 8 | param[1];
1837 info->y_max = (0xf0 & param[0]) << 4 | param[2];
1841 if (info->send_cmd(psmouse, ETP_FW_ID_QUERY, param))
1844 info->x_max = (0x0f & param[0]) << 8 | param[1];
1845 info->y_max = (0xf0 & param[0]) << 4 | param[2];
1846 traces = info->capabilities[1];
1847 if ((traces < 2) || (traces > info->x_max))
1850 info->width = info->x_max / (traces - 1);
1853 info->x_traces = traces;
1856 traces = info->capabilities[2];
1857 if ((traces >= 2) && (traces <= info->y_max))
1858 info->y_traces = traces;
1864 info->has_middle_button = dmi_check_system(elantech_dmi_has_middle_button) ||
1865 (ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version) &&
1866 !elantech_is_buttonpad(info));
1898 struct elantech_device_info *info,
1911 info->x_max + 1);
1913 info->y_max + 1);
1915 info->x_min);
1917 info->y_min);
1918 if (info->x_res)
1920 (info->x_max + 1) / info->x_res);
1921 if (info->y_res)
1923 (info->y_max + 1) / info->y_res);
1925 if (info->has_trackpoint)
1928 if (info->has_middle_button)
1931 if (info->x_traces)
1933 info->x_traces);
1934 if (info->y_traces)
1936 info->y_traces);
1938 if (elantech_is_buttonpad(info))
1950 struct elantech_device_info *info,
1964 if (!ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version) ||
1971 error = elantech_create_smbus(psmouse, info, leave_breadcrumbs);
1985 struct elantech_device_info *info)
1987 if (ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version))
1990 switch (info->bus) {
2004 info->bus);
2012 struct elantech_device_info info;
2017 error = elantech_query_info(psmouse, &info);
2021 if (info.hw_version < 4) {
2026 return elantech_create_smbus(psmouse, &info, false);
2037 struct elantech_device_info *info)
2048 etd->info = *info;
2060 if (info->fw_version == 0x381f17) {
2079 if (info->has_trackpoint) {
2116 psmouse->pktsize = info->hw_version > 1 ? 6 : 4;
2131 struct elantech_device_info info;
2136 error = elantech_query_info(psmouse, &info);
2140 error = elantech_setup_ps2(psmouse, &info);
2152 struct elantech_device_info info;
2157 error = elantech_query_info(psmouse, &info);
2163 if (elantech_use_host_notify(psmouse, &info)) {
2170 error = elantech_setup_smbus(psmouse, &info, true);
2177 error = elantech_setup_ps2(psmouse, &info);