Lines Matching refs:error
106 int error; in hycon_hy46xx_isr() local
110 error = regmap_bulk_read(tsdata->regmap, 0, rdbuf, sizeof(rdbuf)); in hycon_hy46xx_isr()
111 if (error) { in hycon_hy46xx_isr()
113 error); in hycon_hy46xx_isr()
185 int error = 0; in hycon_hy46xx_setting_show() local
190 error = regmap_read(tsdata->regmap, attr->address, &val); in hycon_hy46xx_setting_show()
191 if (error < 0) { in hycon_hy46xx_setting_show()
194 dattr->attr.name, error); in hycon_hy46xx_setting_show()
209 return error ?: count; in hycon_hy46xx_setting_show()
222 int error; in hycon_hy46xx_setting_store() local
226 error = kstrtouint(buf, 0, &val); in hycon_hy46xx_setting_store()
227 if (error) in hycon_hy46xx_setting_store()
231 error = -ERANGE; in hycon_hy46xx_setting_store()
235 error = regmap_write(tsdata->regmap, attr->address, val); in hycon_hy46xx_setting_store()
236 if (error < 0) { in hycon_hy46xx_setting_store()
239 dattr->attr.name, error); in hycon_hy46xx_setting_store()
246 return error ?: count; in hycon_hy46xx_setting_store()
285 int error; in hycon_hy46xx_get_defaults() local
288 error = device_property_read_u32(dev, "hycon,threshold", &val); in hycon_hy46xx_get_defaults()
289 if (!error) { in hycon_hy46xx_get_defaults()
290 error = regmap_write(tsdata->regmap, HY46XX_THRESHOLD, val); in hycon_hy46xx_get_defaults()
291 if (error < 0) in hycon_hy46xx_get_defaults()
298 error = regmap_write(tsdata->regmap, HY46XX_GLOVE_EN, val_bool); in hycon_hy46xx_get_defaults()
299 if (error < 0) in hycon_hy46xx_get_defaults()
303 error = device_property_read_u32(dev, "hycon,report-speed-hz", &val); in hycon_hy46xx_get_defaults()
304 if (!error) { in hycon_hy46xx_get_defaults()
305 error = regmap_write(tsdata->regmap, HY46XX_REPORT_SPEED, val); in hycon_hy46xx_get_defaults()
306 if (error < 0) in hycon_hy46xx_get_defaults()
313 error = regmap_write(tsdata->regmap, HY46XX_PWR_NOISE_EN, val_bool); in hycon_hy46xx_get_defaults()
314 if (error < 0) in hycon_hy46xx_get_defaults()
318 error = device_property_read_u32(dev, "hycon,filter-data", &val); in hycon_hy46xx_get_defaults()
319 if (!error) { in hycon_hy46xx_get_defaults()
320 error = regmap_write(tsdata->regmap, HY46XX_FILTER_DATA, val); in hycon_hy46xx_get_defaults()
321 if (error < 0) in hycon_hy46xx_get_defaults()
327 error = device_property_read_u32(dev, "hycon,gain", &val); in hycon_hy46xx_get_defaults()
328 if (!error) { in hycon_hy46xx_get_defaults()
329 error = regmap_write(tsdata->regmap, HY46XX_GAIN, val); in hycon_hy46xx_get_defaults()
330 if (error < 0) in hycon_hy46xx_get_defaults()
336 error = device_property_read_u32(dev, "hycon,edge-offset", &val); in hycon_hy46xx_get_defaults()
337 if (!error) { in hycon_hy46xx_get_defaults()
338 error = regmap_write(tsdata->regmap, HY46XX_EDGE_OFFSET, val); in hycon_hy46xx_get_defaults()
339 if (error < 0) in hycon_hy46xx_get_defaults()
352 int error; in hycon_hy46xx_get_parameters() local
355 error = regmap_read(tsdata->regmap, HY46XX_THRESHOLD, &val); in hycon_hy46xx_get_parameters()
356 if (error < 0) in hycon_hy46xx_get_parameters()
360 error = regmap_read(tsdata->regmap, HY46XX_GLOVE_EN, &val); in hycon_hy46xx_get_parameters()
361 if (error < 0) in hycon_hy46xx_get_parameters()
365 error = regmap_read(tsdata->regmap, HY46XX_REPORT_SPEED, &val); in hycon_hy46xx_get_parameters()
366 if (error < 0) in hycon_hy46xx_get_parameters()
370 error = regmap_read(tsdata->regmap, HY46XX_PWR_NOISE_EN, &val); in hycon_hy46xx_get_parameters()
371 if (error < 0) in hycon_hy46xx_get_parameters()
375 error = regmap_read(tsdata->regmap, HY46XX_FILTER_DATA, &val); in hycon_hy46xx_get_parameters()
376 if (error < 0) in hycon_hy46xx_get_parameters()
380 error = regmap_read(tsdata->regmap, HY46XX_GAIN, &val); in hycon_hy46xx_get_parameters()
381 if (error < 0) in hycon_hy46xx_get_parameters()
385 error = regmap_read(tsdata->regmap, HY46XX_EDGE_OFFSET, &val); in hycon_hy46xx_get_parameters()
386 if (error < 0) in hycon_hy46xx_get_parameters()
390 error = regmap_read(tsdata->regmap, HY46XX_RX_NR_USED, &val); in hycon_hy46xx_get_parameters()
391 if (error < 0) in hycon_hy46xx_get_parameters()
395 error = regmap_read(tsdata->regmap, HY46XX_TX_NR_USED, &val); in hycon_hy46xx_get_parameters()
396 if (error < 0) in hycon_hy46xx_get_parameters()
400 error = regmap_read(tsdata->regmap, HY46XX_PWR_MODE, &val); in hycon_hy46xx_get_parameters()
401 if (error < 0) in hycon_hy46xx_get_parameters()
405 error = regmap_read(tsdata->regmap, HY46XX_FW_VERSION, &val); in hycon_hy46xx_get_parameters()
406 if (error < 0) in hycon_hy46xx_get_parameters()
410 error = regmap_read(tsdata->regmap, HY46XX_LIB_VERSION, &val); in hycon_hy46xx_get_parameters()
411 if (error < 0) in hycon_hy46xx_get_parameters()
415 error = regmap_read(tsdata->regmap, HY46XX_TP_INFO, &val); in hycon_hy46xx_get_parameters()
416 if (error < 0) in hycon_hy46xx_get_parameters()
420 error = regmap_read(tsdata->regmap, HY46XX_TP_CHIP_ID, &val); in hycon_hy46xx_get_parameters()
421 if (error < 0) in hycon_hy46xx_get_parameters()
425 error = regmap_read(tsdata->regmap, HY46XX_BOOT_VER, &val); in hycon_hy46xx_get_parameters()
426 if (error < 0) in hycon_hy46xx_get_parameters()
446 int error; in hycon_hy46xx_probe() local
456 error = PTR_ERR(tsdata->vcc); in hycon_hy46xx_probe()
457 if (error != -EPROBE_DEFER) in hycon_hy46xx_probe()
459 "failed to request regulator: %d\n", error); in hycon_hy46xx_probe()
460 return error; in hycon_hy46xx_probe()
463 error = regulator_enable(tsdata->vcc); in hycon_hy46xx_probe()
464 if (error < 0) { in hycon_hy46xx_probe()
465 dev_err(&client->dev, "failed to enable vcc: %d\n", error); in hycon_hy46xx_probe()
466 return error; in hycon_hy46xx_probe()
469 error = devm_add_action_or_reset(&client->dev, in hycon_hy46xx_probe()
472 if (error) in hycon_hy46xx_probe()
473 return error; in hycon_hy46xx_probe()
478 error = PTR_ERR(tsdata->reset_gpio); in hycon_hy46xx_probe()
480 "Failed to request GPIO reset pin, error %d\n", error); in hycon_hy46xx_probe()
481 return error; in hycon_hy46xx_probe()
521 error = input_mt_init_slots(input, HY46XX_MAX_SUPPORTED_POINTS, in hycon_hy46xx_probe()
523 if (error) { in hycon_hy46xx_probe()
525 return error; in hycon_hy46xx_probe()
530 error = devm_request_threaded_irq(&client->dev, client->irq, in hycon_hy46xx_probe()
533 if (error) { in hycon_hy46xx_probe()
535 return error; in hycon_hy46xx_probe()
538 error = devm_device_add_group(&client->dev, &hycon_hy46xx_attr_group); in hycon_hy46xx_probe()
539 if (error) in hycon_hy46xx_probe()
540 return error; in hycon_hy46xx_probe()
542 error = input_register_device(input); in hycon_hy46xx_probe()
543 if (error) in hycon_hy46xx_probe()
544 return error; in hycon_hy46xx_probe()