Lines Matching +full:rx +full:- +full:float +full:- +full:inactive

1 // SPDX-License-Identifier: GPL-2.0-or-later
139 .name = "event-prox",
144 .name = "event-touch",
151 { .name = "event-press", },
153 .name = "event-tap",
160 .name = "event-swipe-pos",
167 .name = "event-swipe-neg",
174 .name = "event-flick-pos",
181 .name = "event-flick-neg",
484 .name = "azoteq,conv-period",
492 .name = "azoteq,conv-frac",
500 .name = "azoteq,rx-float-inactive",
508 .name = "azoteq,dead-time-enable",
515 .name = "azoteq,tx-freq-fosc",
522 .name = "azoteq,vbias-enable",
529 .name = "azoteq,sense-mode",
538 .name = "azoteq,iref-enable",
545 .name = "azoteq,iref-level",
553 .name = "azoteq,iref-trim",
561 .name = "azoteq,max-counts",
569 .name = "azoteq,auto-mode",
577 .name = "azoteq,ati-frac-div-fine",
585 .name = "azoteq,ati-frac-div-coarse",
593 .name = "azoteq,ati-comp-select",
601 .name = "azoteq,ati-band",
609 .name = "azoteq,global-halt",
616 .name = "azoteq,invert-enable",
623 .name = "azoteq,dual-direction",
630 .name = "azoteq,samp-cap-double",
637 .name = "azoteq,vref-half",
644 .name = "azoteq,proj-bias",
652 .name = "azoteq,ati-target",
661 .name = "azoteq,ati-base",
670 .name = "azoteq,ati-mode",
679 .name = "azoteq,ati-frac-div-fine",
687 .name = "azoteq,ati-frac-mult-coarse",
695 .name = "azoteq,ati-frac-div-coarse",
703 .name = "azoteq,ati-comp-div",
711 .name = "azoteq,ati-comp-select",
719 .name = "azoteq,debounce-exit",
728 .name = "azoteq,debounce-enter",
765 .name = "azoteq,lta-beta-lp",
770 .label = "low-power mode long-term average beta",
773 .name = "azoteq,lta-beta-np",
778 .label = "normal-power mode long-term average beta",
781 .name = "azoteq,counts-beta-lp",
786 .label = "low-power mode counts beta",
789 .name = "azoteq,counts-beta-np",
794 .label = "normal-power mode counts beta",
797 .name = "azoteq,lta-fast-beta-lp",
802 .label = "low-power mode long-term average fast beta",
805 .name = "azoteq,lta-fast-beta-np",
810 .label = "normal-power mode long-term average fast beta",
813 .name = "azoteq,lower-cal",
821 .name = "azoteq,static-beta",
829 .name = "azoteq,bottom-beta",
838 .name = "azoteq,static-beta",
846 .name = "azoteq,bottom-beta",
855 .name = "azoteq,bottom-speed",
863 .name = "azoteq,upper-cal",
871 .name = "azoteq,gesture-max-ms",
881 .name = "azoteq,gesture-min-ms",
891 .name = "azoteq,gesture-dist",
901 .name = "azoteq,gesture-max-ms",
911 .name = "drive-open-drain",
918 .name = "azoteq,timeout-ati-ms",
927 .name = "azoteq,rate-ati-ms",
935 .name = "azoteq,timeout-np-ms",
940 .label = "normal-power mode timeout",
943 .name = "azoteq,rate-np-ms",
949 .label = "normal-power mode report rate",
952 .name = "azoteq,timeout-lp-ms",
957 .label = "low-power mode timeout",
960 .name = "azoteq,rate-lp-ms",
966 .label = "low-power mode report rate",
969 .name = "azoteq,timeout-ulp-ms",
974 .label = "ultra-low-power mode timeout",
977 .name = "azoteq,rate-ulp-ms",
983 .label = "ultra-low-power mode report rate",
1012 return iqs7222->cycle_setup[row]; in iqs7222_setup()
1015 return iqs7222->glbl_setup; in iqs7222_setup()
1018 return iqs7222->btn_setup[row]; in iqs7222_setup()
1021 return iqs7222->chan_setup[row]; in iqs7222_setup()
1024 return iqs7222->filt_setup; in iqs7222_setup()
1027 return iqs7222->sldr_setup[row]; in iqs7222_setup()
1030 return iqs7222->gpio_setup[row]; in iqs7222_setup()
1033 return iqs7222->sys_setup; in iqs7222_setup()
1048 ret = gpiod_get_value_cansleep(iqs7222->irq_gpio); in iqs7222_irq_poll()
1055 return -EBUSY; in iqs7222_irq_poll()
1060 struct i2c_client *client = iqs7222->client; in iqs7222_hard_reset()
1063 if (!iqs7222->reset_gpio) in iqs7222_hard_reset()
1066 gpiod_set_value_cansleep(iqs7222->reset_gpio, 1); in iqs7222_hard_reset()
1069 gpiod_set_value_cansleep(iqs7222->reset_gpio, 0); in iqs7222_hard_reset()
1073 dev_err(&client->dev, "Failed to reset device: %d\n", error); in iqs7222_hard_reset()
1085 * pin. Attempts to do so while RDY is deasserted return an ACK; how- in iqs7222_force_comms()
1088 * Unsolicited communication must be preceded by a special force com- in iqs7222_force_comms()
1096 ret = gpiod_get_value_cansleep(iqs7222->irq_gpio); in iqs7222_force_comms()
1102 ret = i2c_master_send(iqs7222->client, msg_buf, sizeof(msg_buf)); in iqs7222_force_comms()
1105 ret = -EIO; in iqs7222_force_comms()
1123 struct i2c_client *client = iqs7222->client; in iqs7222_read_burst()
1126 .addr = client->addr, in iqs7222_read_burst()
1132 .addr = client->addr, in iqs7222_read_burst()
1154 ret = i2c_transfer(client->adapter, msg, ARRAY_SIZE(msg)); in iqs7222_read_burst()
1157 ret = -EIO; in iqs7222_read_burst()
1164 ret = -ENODATA; in iqs7222_read_burst()
1179 dev_err(&client->dev, in iqs7222_read_burst()
1206 struct i2c_client *client = iqs7222->client; in iqs7222_write_burst()
1211 return -ENOMEM; in iqs7222_write_burst()
1237 ret = -EIO; in iqs7222_write_burst()
1252 dev_err(&client->dev, in iqs7222_write_burst()
1267 struct i2c_client *client = iqs7222->client; in iqs7222_ati_trigger()
1288 * Trigger ATI from streaming and normal-power modes so that in iqs7222_ati_trigger()
1320 * Use stream-in-touch mode if either slider reports in iqs7222_ati_trigger()
1323 sys_setup |= test_bit(EV_ABS, iqs7222->keypad->evbit) in iqs7222_ati_trigger()
1332 dev_err(&client->dev, in iqs7222_ati_trigger()
1338 return -ETIMEDOUT; in iqs7222_ati_trigger()
1343 const struct iqs7222_dev_desc *dev_desc = iqs7222->dev_desc; in iqs7222_dev_init()
1344 int comms_offset = dev_desc->comms_offset; in iqs7222_dev_init()
1358 u16 reg = dev_desc->reg_grps[IQS7222_REG_GRP_FILT].base + 1; in iqs7222_dev_init()
1362 iqs7222->sys_setup[0] | in iqs7222_dev_init()
1371 iqs7222->filt_setup[1] &= GENMASK(7, 0); in iqs7222_dev_init()
1372 iqs7222->filt_setup[1] |= (filt_setup & ~GENMASK(7, 0)); in iqs7222_dev_init()
1376 * Take advantage of the stop-bit disable function, if available, to in iqs7222_dev_init()
1397 int num_row = dev_desc->reg_grps[i].num_row; in iqs7222_dev_init()
1398 int num_col = dev_desc->reg_grps[i].num_col; in iqs7222_dev_init()
1399 u16 reg = dev_desc->reg_grps[i].base; in iqs7222_dev_init()
1412 return -ENOMEM; in iqs7222_dev_init()
1431 error = -EINVAL; in iqs7222_dev_init()
1471 struct i2c_client *client = iqs7222->client; in iqs7222_dev_info()
1493 iqs7222->dev_desc = &iqs7222_devs[i]; in iqs7222_dev_info()
1498 dev_err(&client->dev, "Unsupported firmware revision: %u.%u\n", in iqs7222_dev_info()
1501 dev_err(&client->dev, "Unrecognized product number: %u\n", in iqs7222_dev_info()
1504 return -EINVAL; in iqs7222_dev_info()
1511 const struct iqs7222_dev_desc *dev_desc = iqs7222->dev_desc; in iqs7222_gpio_select()
1512 struct i2c_client *client = iqs7222->client; in iqs7222_gpio_select()
1513 int num_gpio = dev_desc->reg_grps[IQS7222_REG_GRP_GPIO].num_row; in iqs7222_gpio_select()
1520 if (!fwnode_property_present(child_node, "azoteq,gpio-select")) in iqs7222_gpio_select()
1523 count = fwnode_property_count_u32(child_node, "azoteq,gpio-select"); in iqs7222_gpio_select()
1525 dev_err(&client->dev, "Invalid number of %s GPIOs\n", in iqs7222_gpio_select()
1527 return -EINVAL; in iqs7222_gpio_select()
1529 dev_err(&client->dev, "Failed to count %s GPIOs: %d\n", in iqs7222_gpio_select()
1535 "azoteq,gpio-select", in iqs7222_gpio_select()
1538 dev_err(&client->dev, "Failed to read %s GPIOs: %d\n", in iqs7222_gpio_select()
1547 dev_err(&client->dev, "Invalid %s GPIO: %u\n", in iqs7222_gpio_select()
1549 return -EINVAL; in iqs7222_gpio_select()
1552 gpio_setup = iqs7222->gpio_setup[gpio_sel[i]]; in iqs7222_gpio_select()
1555 dev_err(&client->dev, in iqs7222_gpio_select()
1558 return -EINVAL; in iqs7222_gpio_select()
1576 struct i2c_client *client = iqs7222->client; in iqs7222_parse_props()
1589 * for additional group-specific processing. In some cases, the in iqs7222_parse_props()
1596 snprintf(reg_grp_name, sizeof(reg_grp_name), "%s-%d", in iqs7222_parse_props()
1599 reg_grp_node = device_get_named_child_node(&client->dev, in iqs7222_parse_props()
1614 reg_grp_node = dev_fwnode(&client->dev); in iqs7222_parse_props()
1618 return -EINVAL; in iqs7222_parse_props()
1667 dev_err(&client->dev, "Failed to read %s %s: %d\n", in iqs7222_parse_props()
1673 val_max = GENMASK(reg_width - 1, 0) * val_pitch; in iqs7222_parse_props()
1676 dev_err(&client->dev, "Invalid %s %s: %u\n", in iqs7222_parse_props()
1678 return -EINVAL; in iqs7222_parse_props()
1681 setup[reg_offset] &= ~GENMASK(reg_shift + reg_width - 1, in iqs7222_parse_props()
1691 u16 *cycle_setup = iqs7222->cycle_setup[cycle_index]; in iqs7222_parse_cycle()
1692 struct i2c_client *client = iqs7222->client; in iqs7222_parse_cycle()
1714 * CTx pins (CTx0-8). in iqs7222_parse_cycle()
1716 if (!fwnode_property_present(cycle_node, "azoteq,tx-enable")) in iqs7222_parse_cycle()
1719 count = fwnode_property_count_u32(cycle_node, "azoteq,tx-enable"); in iqs7222_parse_cycle()
1721 dev_err(&client->dev, "Failed to count %s CTx pins: %d\n", in iqs7222_parse_cycle()
1725 dev_err(&client->dev, "Invalid number of %s CTx pins\n", in iqs7222_parse_cycle()
1727 return -EINVAL; in iqs7222_parse_cycle()
1730 error = fwnode_property_read_u32_array(cycle_node, "azoteq,tx-enable", in iqs7222_parse_cycle()
1733 dev_err(&client->dev, "Failed to read %s CTx pins: %d\n", in iqs7222_parse_cycle()
1738 cycle_setup[1] &= ~GENMASK(7 + ARRAY_SIZE(pins) - 1, 7); in iqs7222_parse_cycle()
1742 dev_err(&client->dev, "Invalid %s CTx pin: %u\n", in iqs7222_parse_cycle()
1744 return -EINVAL; in iqs7222_parse_cycle()
1755 const struct iqs7222_dev_desc *dev_desc = iqs7222->dev_desc; in iqs7222_parse_chan()
1756 struct i2c_client *client = iqs7222->client; in iqs7222_parse_chan()
1758 int num_chan = dev_desc->reg_grps[IQS7222_REG_GRP_CHAN].num_row; in iqs7222_parse_chan()
1761 u16 *chan_setup = iqs7222->chan_setup[chan_index]; in iqs7222_parse_chan()
1762 u16 *sys_setup = iqs7222->sys_setup; in iqs7222_parse_chan()
1774 if (dev_desc->allow_offset && in iqs7222_parse_chan()
1775 fwnode_property_present(chan_node, "azoteq,ulp-allow")) in iqs7222_parse_chan()
1776 sys_setup[dev_desc->allow_offset] &= ~BIT(chan_index); in iqs7222_parse_chan()
1784 if (dev_desc->reg_grps[IQS7222_REG_GRP_CHAN].num_col > 4 && in iqs7222_parse_chan()
1785 fwnode_property_present(chan_node, "azoteq,ref-select")) { in iqs7222_parse_chan()
1788 error = fwnode_property_read_u32(chan_node, "azoteq,ref-select", in iqs7222_parse_chan()
1791 dev_err(&client->dev, in iqs7222_parse_chan()
1798 dev_err(&client->dev, in iqs7222_parse_chan()
1801 return -EINVAL; in iqs7222_parse_chan()
1804 ref_setup = iqs7222->chan_setup[val]; in iqs7222_parse_chan()
1813 if (!fwnode_property_read_u32(chan_node, "azoteq,ref-weight", in iqs7222_parse_chan()
1816 dev_err(&client->dev, in iqs7222_parse_chan()
1819 return -EINVAL; in iqs7222_parse_chan()
1832 ref_setup[4] = dev_desc->touch_link; in iqs7222_parse_chan()
1833 if (fwnode_property_present(chan_node, "azoteq,use-prox")) in iqs7222_parse_chan()
1834 ref_setup[4] -= 2; in iqs7222_parse_chan()
1837 if (fwnode_property_present(chan_node, "azoteq,rx-enable")) { in iqs7222_parse_chan()
1840 * the channels can use CRx0-3, while the second half can use in iqs7222_parse_chan()
1841 * CRx4-7. in iqs7222_parse_chan()
1847 "azoteq,rx-enable"); in iqs7222_parse_chan()
1849 dev_err(&client->dev, in iqs7222_parse_chan()
1854 dev_err(&client->dev, in iqs7222_parse_chan()
1857 return -EINVAL; in iqs7222_parse_chan()
1861 "azoteq,rx-enable", in iqs7222_parse_chan()
1864 dev_err(&client->dev, in iqs7222_parse_chan()
1870 chan_setup[0] &= ~GENMASK(4 + ARRAY_SIZE(pins) - 1, 4); in iqs7222_parse_chan()
1876 dev_err(&client->dev, in iqs7222_parse_chan()
1879 return -EINVAL; in iqs7222_parse_chan()
1882 chan_setup[0] |= BIT(pins[i] + 4 - min_crx); in iqs7222_parse_chan()
1903 dev_desc->touch_link - (i ? 0 : 2)); in iqs7222_parse_chan()
1908 "azoteq,timeout-press-ms", in iqs7222_parse_chan()
1912 * registers as opposed to channel-specific registers. in iqs7222_parse_chan()
1914 u16 *setup = dev_desc->reg_grps in iqs7222_parse_chan()
1916 &iqs7222->btn_setup[chan_index][2] : in iqs7222_parse_chan()
1920 dev_err(&client->dev, in iqs7222_parse_chan()
1923 return -EINVAL; in iqs7222_parse_chan()
1933 dev_err(&client->dev, "Failed to read %s code: %d\n", in iqs7222_parse_chan()
1938 iqs7222->kp_code[chan_index][i] = val; in iqs7222_parse_chan()
1939 iqs7222->kp_type[chan_index][i] = EV_KEY; in iqs7222_parse_chan()
1941 if (fwnode_property_present(event_node, "linux,input-type")) { in iqs7222_parse_chan()
1943 "linux,input-type", in iqs7222_parse_chan()
1946 dev_err(&client->dev, in iqs7222_parse_chan()
1953 dev_err(&client->dev, in iqs7222_parse_chan()
1956 return -EINVAL; in iqs7222_parse_chan()
1959 iqs7222->kp_type[chan_index][i] = val; in iqs7222_parse_chan()
1966 if (iqs7222->kp_type[chan_index][i] == EV_KEY && in iqs7222_parse_chan()
1967 iqs7222->kp_code[chan_index][i] == KEY_RESERVED) in iqs7222_parse_chan()
1970 input_set_capability(iqs7222->keypad, in iqs7222_parse_chan()
1971 iqs7222->kp_type[chan_index][i], in iqs7222_parse_chan()
1972 iqs7222->kp_code[chan_index][i]); in iqs7222_parse_chan()
1974 if (!dev_desc->event_offset) in iqs7222_parse_chan()
1977 sys_setup[dev_desc->event_offset] |= event_enable; in iqs7222_parse_chan()
1991 const struct iqs7222_dev_desc *dev_desc = iqs7222->dev_desc; in iqs7222_parse_sldr()
1992 struct i2c_client *client = iqs7222->client; in iqs7222_parse_sldr()
1994 int num_chan = dev_desc->reg_grps[IQS7222_REG_GRP_CHAN].num_row; in iqs7222_parse_sldr()
1997 u16 *event_mask = &iqs7222->sys_setup[dev_desc->event_offset]; in iqs7222_parse_sldr()
1998 u16 *sldr_setup = iqs7222->sldr_setup[sldr_index]; in iqs7222_parse_sldr()
2015 count = fwnode_property_count_u32(sldr_node, "azoteq,channel-select"); in iqs7222_parse_sldr()
2017 dev_err(&client->dev, "Failed to count %s channels: %d\n", in iqs7222_parse_sldr()
2021 dev_err(&client->dev, "Invalid number of %s channels\n", in iqs7222_parse_sldr()
2023 return -EINVAL; in iqs7222_parse_sldr()
2027 "azoteq,channel-select", in iqs7222_parse_sldr()
2030 dev_err(&client->dev, "Failed to read %s channels: %d\n", in iqs7222_parse_sldr()
2038 * the slider-related register addresses are offset by one. in iqs7222_parse_sldr()
2040 reg_offset = dev_desc->sldr_res < U16_MAX ? 0 : 1; in iqs7222_parse_sldr()
2043 sldr_setup[3 + reg_offset] &= ~GENMASK(ext_chan - 1, 0); in iqs7222_parse_sldr()
2051 dev_err(&client->dev, "Invalid %s channel: %u\n", in iqs7222_parse_sldr()
2053 return -EINVAL; in iqs7222_parse_sldr()
2064 sldr_setup[4 + reg_offset] = dev_desc->touch_link; in iqs7222_parse_sldr()
2065 if (fwnode_property_present(sldr_node, "azoteq,use-prox")) in iqs7222_parse_sldr()
2066 sldr_setup[4 + reg_offset] -= 2; in iqs7222_parse_sldr()
2068 if (!fwnode_property_read_u32(sldr_node, "azoteq,slider-size", &val)) { in iqs7222_parse_sldr()
2069 if (!val || val > dev_desc->sldr_res) { in iqs7222_parse_sldr()
2070 dev_err(&client->dev, "Invalid %s size: %u\n", in iqs7222_parse_sldr()
2072 return -EINVAL; in iqs7222_parse_sldr()
2084 if (!fwnode_property_read_u32(sldr_node, "azoteq,top-speed", &val)) { in iqs7222_parse_sldr()
2086 dev_err(&client->dev, "Invalid %s top speed: %u\n", in iqs7222_parse_sldr()
2088 return -EINVAL; in iqs7222_parse_sldr()
2100 u16 sldr_max = sldr_setup[3] - 1; in iqs7222_parse_sldr()
2108 sldr_max = sldr_max * 16 - 1; in iqs7222_parse_sldr()
2111 input_set_abs_params(iqs7222->keypad, val, 0, sldr_max, 0, 0); in iqs7222_parse_sldr()
2112 iqs7222->sl_axis[sldr_index] = val; in iqs7222_parse_sldr()
2115 if (dev_desc->wheel_enable) { in iqs7222_parse_sldr()
2116 sldr_setup[0] &= ~dev_desc->wheel_enable; in iqs7222_parse_sldr()
2117 if (iqs7222->sl_axis[sldr_index] == ABS_WHEEL) in iqs7222_parse_sldr()
2118 sldr_setup[0] |= dev_desc->wheel_enable; in iqs7222_parse_sldr()
2165 dev_err(&client->dev, "Failed to read %s code: %d\n", in iqs7222_parse_sldr()
2170 iqs7222->sl_code[sldr_index][i] = val; in iqs7222_parse_sldr()
2171 input_set_capability(iqs7222->keypad, EV_KEY, val); in iqs7222_parse_sldr()
2173 if (!dev_desc->event_offset) in iqs7222_parse_sldr()
2183 else if (sldr_setup[4 + reg_offset] == dev_desc->touch_link) in iqs7222_parse_sldr()
2195 dev_desc->wheel_enable ? in iqs7222_parse_sldr()
2202 const struct iqs7222_dev_desc *dev_desc = iqs7222->dev_desc; in iqs7222_parse_all()
2203 const struct iqs7222_reg_grp_desc *reg_grps = dev_desc->reg_grps; in iqs7222_parse_all()
2204 u16 *sys_setup = iqs7222->sys_setup; in iqs7222_parse_all()
2207 if (dev_desc->allow_offset) in iqs7222_parse_all()
2208 sys_setup[dev_desc->allow_offset] = U16_MAX; in iqs7222_parse_all()
2210 if (dev_desc->event_offset) in iqs7222_parse_all()
2211 sys_setup[dev_desc->event_offset] = IQS7222_EVENT_MASK_ATI; in iqs7222_parse_all()
2226 u16 *gpio_setup = iqs7222->gpio_setup[i]; in iqs7222_parse_all()
2253 u16 *chan_setup = iqs7222->chan_setup[i]; in iqs7222_parse_all()
2273 u16 *sldr_setup = iqs7222->sldr_setup[i]; in iqs7222_parse_all()
2288 const struct iqs7222_dev_desc *dev_desc = iqs7222->dev_desc; in iqs7222_report()
2289 struct i2c_client *client = iqs7222->client; in iqs7222_report()
2290 int num_chan = dev_desc->reg_grps[IQS7222_REG_GRP_CHAN].num_row; in iqs7222_report()
2291 int num_stat = dev_desc->reg_grps[IQS7222_REG_GRP_STAT].num_col; in iqs7222_report()
2301 dev_err(&client->dev, "Unexpected device reset\n"); in iqs7222_report()
2306 dev_err(&client->dev, "Unexpected ATI error\n"); in iqs7222_report()
2314 u16 *chan_setup = iqs7222->chan_setup[i]; in iqs7222_report()
2330 if (!iqs7222->kp_type[i][j]) in iqs7222_report()
2333 input_event(iqs7222->keypad, in iqs7222_report()
2334 iqs7222->kp_type[i][j], in iqs7222_report()
2335 iqs7222->kp_code[i][j], in iqs7222_report()
2340 for (i = 0; i < dev_desc->reg_grps[IQS7222_REG_GRP_SLDR].num_row; i++) { in iqs7222_report()
2341 u16 *sldr_setup = iqs7222->sldr_setup[i]; in iqs7222_report()
2348 if (sldr_pos < dev_desc->sldr_res) in iqs7222_report()
2349 input_report_abs(iqs7222->keypad, iqs7222->sl_axis[i], in iqs7222_report()
2352 input_report_key(iqs7222->keypad, iqs7222->sl_code[i][0], in iqs7222_report()
2353 sldr_pos < dev_desc->sldr_res); in iqs7222_report()
2359 if (dev_desc->sldr_res == U16_MAX) in iqs7222_report()
2373 input_report_key(iqs7222->keypad, in iqs7222_report()
2374 iqs7222->sl_code[i][j], in iqs7222_report()
2378 input_sync(iqs7222->keypad); in iqs7222_report()
2381 input_report_key(iqs7222->keypad, in iqs7222_report()
2382 iqs7222->sl_code[i][j], 0); in iqs7222_report()
2385 input_sync(iqs7222->keypad); in iqs7222_report()
2403 iqs7222 = devm_kzalloc(&client->dev, sizeof(*iqs7222), GFP_KERNEL); in iqs7222_probe()
2405 return -ENOMEM; in iqs7222_probe()
2408 iqs7222->client = client; in iqs7222_probe()
2410 iqs7222->keypad = devm_input_allocate_device(&client->dev); in iqs7222_probe()
2411 if (!iqs7222->keypad) in iqs7222_probe()
2412 return -ENOMEM; in iqs7222_probe()
2414 iqs7222->keypad->name = client->name; in iqs7222_probe()
2415 iqs7222->keypad->id.bustype = BUS_I2C; in iqs7222_probe()
2422 iqs7222->irq_gpio = devm_gpiod_get(&client->dev, "irq", GPIOD_IN); in iqs7222_probe()
2423 if (IS_ERR(iqs7222->irq_gpio)) { in iqs7222_probe()
2424 error = PTR_ERR(iqs7222->irq_gpio); in iqs7222_probe()
2425 dev_err(&client->dev, "Failed to request IRQ GPIO: %d\n", in iqs7222_probe()
2430 iqs7222->reset_gpio = devm_gpiod_get_optional(&client->dev, "reset", in iqs7222_probe()
2432 if (IS_ERR(iqs7222->reset_gpio)) { in iqs7222_probe()
2433 error = PTR_ERR(iqs7222->reset_gpio); in iqs7222_probe()
2434 dev_err(&client->dev, "Failed to request reset GPIO: %d\n", in iqs7222_probe()
2463 error = input_register_device(iqs7222->keypad); in iqs7222_probe()
2465 dev_err(&client->dev, "Failed to register device: %d\n", error); in iqs7222_probe()
2469 irq = gpiod_to_irq(iqs7222->irq_gpio); in iqs7222_probe()
2473 irq_flags = gpiod_is_active_low(iqs7222->irq_gpio) ? IRQF_TRIGGER_LOW in iqs7222_probe()
2477 error = devm_request_threaded_irq(&client->dev, irq, NULL, iqs7222_irq, in iqs7222_probe()
2478 irq_flags, client->name, iqs7222); in iqs7222_probe()
2480 dev_err(&client->dev, "Failed to request IRQ: %d\n", error); in iqs7222_probe()