Lines Matching refs:ihid

72 #define i2c_hid_dbg(ihid, ...) dev_dbg(&(ihid)->client->dev, __VA_ARGS__)  argument
170 static int i2c_hid_probe_address(struct i2c_hid *ihid) in i2c_hid_probe_address() argument
180 ret = i2c_smbus_read_byte(ihid->client); in i2c_hid_probe_address()
183 ret = i2c_smbus_read_byte(ihid->client); in i2c_hid_probe_address()
188 static int i2c_hid_xfer(struct i2c_hid *ihid, in i2c_hid_xfer() argument
191 struct i2c_client *client = ihid->client; in i2c_hid_xfer()
197 i2c_hid_dbg(ihid, "%s: cmd=%*ph\n", in i2c_hid_xfer()
224 static int i2c_hid_read_register(struct i2c_hid *ihid, __le16 reg, in i2c_hid_read_register() argument
227 guard(mutex)(&ihid->cmd_lock); in i2c_hid_read_register()
229 *(__le16 *)ihid->cmdbuf = reg; in i2c_hid_read_register()
231 return i2c_hid_xfer(ihid, ihid->cmdbuf, sizeof(__le16), buf, len); in i2c_hid_read_register()
251 static int i2c_hid_get_report(struct i2c_hid *ihid, in i2c_hid_get_report() argument
259 i2c_hid_dbg(ihid, "%s\n", __func__); in i2c_hid_get_report()
261 guard(mutex)(&ihid->cmd_lock); in i2c_hid_get_report()
264 *(__le16 *)ihid->cmdbuf = ihid->hdesc.wCommandRegister; in i2c_hid_get_report()
267 length += i2c_hid_encode_command(ihid->cmdbuf + length, in i2c_hid_get_report()
275 put_unaligned_le16(le16_to_cpu(ihid->hdesc.wDataRegister), in i2c_hid_get_report()
276 ihid->cmdbuf + length); in i2c_hid_get_report()
283 error = i2c_hid_xfer(ihid, ihid->cmdbuf, length, in i2c_hid_get_report()
284 ihid->rawbuf, recv_len + sizeof(__le16)); in i2c_hid_get_report()
286 dev_err(&ihid->client->dev, in i2c_hid_get_report()
292 ret_count = le16_to_cpup((__le16 *)ihid->rawbuf); in i2c_hid_get_report()
299 memcpy(recv_buf, ihid->rawbuf + sizeof(__le16), recv_len); in i2c_hid_get_report()
302 dev_err(&ihid->client->dev, in i2c_hid_get_report()
337 static int i2c_hid_set_or_send_report(struct i2c_hid *ihid, in i2c_hid_set_or_send_report() argument
345 i2c_hid_dbg(ihid, "%s\n", __func__); in i2c_hid_set_or_send_report()
347 if (data_len > ihid->bufsize) in i2c_hid_set_or_send_report()
350 if (!do_set && le16_to_cpu(ihid->hdesc.wMaxOutputLength) == 0) in i2c_hid_set_or_send_report()
353 guard(mutex)(&ihid->cmd_lock); in i2c_hid_set_or_send_report()
357 *(__le16 *)ihid->cmdbuf = ihid->hdesc.wCommandRegister; in i2c_hid_set_or_send_report()
360 length += i2c_hid_encode_command(ihid->cmdbuf + length, in i2c_hid_set_or_send_report()
368 put_unaligned_le16(le16_to_cpu(ihid->hdesc.wDataRegister), in i2c_hid_set_or_send_report()
369 ihid->cmdbuf + length); in i2c_hid_set_or_send_report()
376 *(__le16 *)ihid->cmdbuf = ihid->hdesc.wOutputRegister; in i2c_hid_set_or_send_report()
380 length += i2c_hid_format_report(ihid->cmdbuf + length, in i2c_hid_set_or_send_report()
383 error = i2c_hid_xfer(ihid, ihid->cmdbuf, length, NULL, 0); in i2c_hid_set_or_send_report()
385 dev_err(&ihid->client->dev, in i2c_hid_set_or_send_report()
393 static int i2c_hid_set_power_command(struct i2c_hid *ihid, int power_state) in i2c_hid_set_power_command() argument
397 guard(mutex)(&ihid->cmd_lock); in i2c_hid_set_power_command()
400 *(__le16 *)ihid->cmdbuf = ihid->hdesc.wCommandRegister; in i2c_hid_set_power_command()
404 length += i2c_hid_encode_command(ihid->cmdbuf + length, in i2c_hid_set_power_command()
408 return i2c_hid_xfer(ihid, ihid->cmdbuf, length, NULL, 0); in i2c_hid_set_power_command()
411 static int i2c_hid_set_power(struct i2c_hid *ihid, int power_state) in i2c_hid_set_power() argument
415 i2c_hid_dbg(ihid, "%s\n", __func__); in i2c_hid_set_power()
417 ret = i2c_hid_set_power_command(ihid, power_state); in i2c_hid_set_power()
419 dev_err(&ihid->client->dev, in i2c_hid_set_power()
437 static int i2c_hid_start_hwreset(struct i2c_hid *ihid) in i2c_hid_start_hwreset() argument
442 i2c_hid_dbg(ihid, "%s\n", __func__); in i2c_hid_start_hwreset()
449 lockdep_assert_held(&ihid->reset_lock); in i2c_hid_start_hwreset()
451 ret = i2c_hid_set_power(ihid, I2C_HID_PWR_ON); in i2c_hid_start_hwreset()
455 scoped_guard(mutex, &ihid->cmd_lock) { in i2c_hid_start_hwreset()
457 *(__le16 *)ihid->cmdbuf = ihid->hdesc.wCommandRegister; in i2c_hid_start_hwreset()
460 length += i2c_hid_encode_command(ihid->cmdbuf + length, in i2c_hid_start_hwreset()
463 set_bit(I2C_HID_RESET_PENDING, &ihid->flags); in i2c_hid_start_hwreset()
465 ret = i2c_hid_xfer(ihid, ihid->cmdbuf, length, NULL, 0); in i2c_hid_start_hwreset()
467 dev_err(&ihid->client->dev, in i2c_hid_start_hwreset()
476 clear_bit(I2C_HID_RESET_PENDING, &ihid->flags); in i2c_hid_start_hwreset()
477 i2c_hid_set_power(ihid, I2C_HID_PWR_SLEEP); in i2c_hid_start_hwreset()
481 static int i2c_hid_finish_hwreset(struct i2c_hid *ihid) in i2c_hid_finish_hwreset() argument
485 i2c_hid_dbg(ihid, "%s: waiting...\n", __func__); in i2c_hid_finish_hwreset()
487 if (ihid->quirks & I2C_HID_QUIRK_NO_IRQ_AFTER_RESET) { in i2c_hid_finish_hwreset()
489 clear_bit(I2C_HID_RESET_PENDING, &ihid->flags); in i2c_hid_finish_hwreset()
490 } else if (!wait_event_timeout(ihid->wait, in i2c_hid_finish_hwreset()
491 !test_bit(I2C_HID_RESET_PENDING, &ihid->flags), in i2c_hid_finish_hwreset()
493 dev_warn(&ihid->client->dev, "device did not ack reset within 1000 ms\n"); in i2c_hid_finish_hwreset()
494 clear_bit(I2C_HID_RESET_PENDING, &ihid->flags); in i2c_hid_finish_hwreset()
496 i2c_hid_dbg(ihid, "%s: finished.\n", __func__); in i2c_hid_finish_hwreset()
499 if (!(ihid->quirks & I2C_HID_QUIRK_NO_WAKEUP_AFTER_RESET)) in i2c_hid_finish_hwreset()
500 ret = i2c_hid_set_power(ihid, I2C_HID_PWR_ON); in i2c_hid_finish_hwreset()
505 static void i2c_hid_get_input(struct i2c_hid *ihid) in i2c_hid_get_input() argument
507 u16 size = le16_to_cpu(ihid->hdesc.wMaxInputLength); in i2c_hid_get_input()
511 if (size > ihid->bufsize) in i2c_hid_get_input()
512 size = ihid->bufsize; in i2c_hid_get_input()
514 ret = i2c_master_recv(ihid->client, ihid->inbuf, size); in i2c_hid_get_input()
519 dev_err(&ihid->client->dev, "%s: got %d data instead of %d\n", in i2c_hid_get_input()
525 ret_size = le16_to_cpup((__le16 *)ihid->inbuf); in i2c_hid_get_input()
528 if (test_and_clear_bit(I2C_HID_RESET_PENDING, &ihid->flags)) in i2c_hid_get_input()
529 wake_up(&ihid->wait); in i2c_hid_get_input()
533 if ((ihid->quirks & I2C_HID_QUIRK_BOGUS_IRQ) && ret_size == 0xffff) { in i2c_hid_get_input()
534 dev_warn_once(&ihid->client->dev, in i2c_hid_get_input()
541 if (ihid->quirks & I2C_HID_QUIRK_BAD_INPUT_SIZE) { in i2c_hid_get_input()
542 *(__le16 *)ihid->inbuf = cpu_to_le16(size); in i2c_hid_get_input()
545 dev_err(&ihid->client->dev, in i2c_hid_get_input()
552 i2c_hid_dbg(ihid, "input: %*ph\n", ret_size, ihid->inbuf); in i2c_hid_get_input()
554 if (test_bit(I2C_HID_STARTED, &ihid->flags)) { in i2c_hid_get_input()
555 if (ihid->hid->group != HID_GROUP_RMI) in i2c_hid_get_input()
556 pm_wakeup_event(&ihid->client->dev, 0); in i2c_hid_get_input()
558 hid_input_report(ihid->hid, HID_INPUT_REPORT, in i2c_hid_get_input()
559 ihid->inbuf + sizeof(__le16), in i2c_hid_get_input()
568 struct i2c_hid *ihid = dev_id; in i2c_hid_irq() local
570 i2c_hid_get_input(ihid); in i2c_hid_irq()
599 static void i2c_hid_free_buffers(struct i2c_hid *ihid) in i2c_hid_free_buffers() argument
601 kfree(ihid->inbuf); in i2c_hid_free_buffers()
602 kfree(ihid->rawbuf); in i2c_hid_free_buffers()
603 kfree(ihid->cmdbuf); in i2c_hid_free_buffers()
604 ihid->inbuf = NULL; in i2c_hid_free_buffers()
605 ihid->rawbuf = NULL; in i2c_hid_free_buffers()
606 ihid->cmdbuf = NULL; in i2c_hid_free_buffers()
607 ihid->bufsize = 0; in i2c_hid_free_buffers()
610 static int i2c_hid_alloc_buffers(struct i2c_hid *ihid, size_t report_size) in i2c_hid_alloc_buffers() argument
625 ihid->inbuf = kzalloc(report_size, GFP_KERNEL); in i2c_hid_alloc_buffers()
626 ihid->rawbuf = kzalloc(report_size, GFP_KERNEL); in i2c_hid_alloc_buffers()
627 ihid->cmdbuf = kzalloc(cmd_len, GFP_KERNEL); in i2c_hid_alloc_buffers()
629 if (!ihid->inbuf || !ihid->rawbuf || !ihid->cmdbuf) { in i2c_hid_alloc_buffers()
630 i2c_hid_free_buffers(ihid); in i2c_hid_alloc_buffers()
634 ihid->bufsize = report_size; in i2c_hid_alloc_buffers()
644 struct i2c_hid *ihid = i2c_get_clientdata(client); in i2c_hid_get_raw_report() local
661 ret_count = i2c_hid_get_report(ihid, in i2c_hid_get_raw_report()
675 struct i2c_hid *ihid = i2c_get_clientdata(client); in i2c_hid_output_raw_report() local
682 mutex_lock(&ihid->reset_lock); in i2c_hid_output_raw_report()
691 ret = i2c_hid_set_or_send_report(ihid, in i2c_hid_output_raw_report()
698 mutex_unlock(&ihid->reset_lock); in i2c_hid_output_raw_report()
728 struct i2c_hid *ihid = i2c_get_clientdata(client); in i2c_hid_parse() local
729 struct i2c_hid_desc *hdesc = &ihid->hdesc; in i2c_hid_parse()
735 i2c_hid_dbg(ihid, "entering %s\n", __func__); in i2c_hid_parse()
743 mutex_lock(&ihid->reset_lock); in i2c_hid_parse()
745 ret = i2c_hid_start_hwreset(ihid); in i2c_hid_parse()
747 ret = i2c_hid_finish_hwreset(ihid); in i2c_hid_parse()
751 mutex_unlock(&ihid->reset_lock); in i2c_hid_parse()
761 i2c_hid_dbg(ihid, "Using a HID report descriptor override\n"); in i2c_hid_parse()
767 i2c_hid_dbg(ihid, "asking HID report descriptor\n"); in i2c_hid_parse()
769 ret = i2c_hid_read_register(ihid, in i2c_hid_parse()
770 ihid->hdesc.wReportDescRegister, in i2c_hid_parse()
778 i2c_hid_dbg(ihid, "Report Descriptor: %*ph\n", rsize, rdesc); in i2c_hid_parse()
794 struct i2c_hid *ihid = i2c_get_clientdata(client); in i2c_hid_start() local
802 if (bufsize > ihid->bufsize) { in i2c_hid_start()
804 i2c_hid_free_buffers(ihid); in i2c_hid_start()
806 ret = i2c_hid_alloc_buffers(ihid, bufsize); in i2c_hid_start()
824 struct i2c_hid *ihid = i2c_get_clientdata(client); in i2c_hid_open() local
826 set_bit(I2C_HID_STARTED, &ihid->flags); in i2c_hid_open()
833 struct i2c_hid *ihid = i2c_get_clientdata(client); in i2c_hid_close() local
835 clear_bit(I2C_HID_STARTED, &ihid->flags); in i2c_hid_close()
850 struct i2c_hid *ihid = i2c_get_clientdata(client); in i2c_hid_init_irq() local
854 i2c_hid_dbg(ihid, "Requesting IRQ: %d\n", client->irq); in i2c_hid_init_irq()
861 client->name, ihid); in i2c_hid_init_irq()
874 static int i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid) in i2c_hid_fetch_hid_descriptor() argument
876 struct i2c_client *client = ihid->client; in i2c_hid_fetch_hid_descriptor()
877 struct i2c_hid_desc *hdesc = &ihid->hdesc; in i2c_hid_fetch_hid_descriptor()
883 i2c_hid_dbg(ihid, "Using a HID descriptor override\n"); in i2c_hid_fetch_hid_descriptor()
884 ihid->hdesc = in i2c_hid_fetch_hid_descriptor()
887 i2c_hid_dbg(ihid, "Fetching the HID descriptor\n"); in i2c_hid_fetch_hid_descriptor()
888 error = i2c_hid_read_register(ihid, in i2c_hid_fetch_hid_descriptor()
889 ihid->wHIDDescRegister, in i2c_hid_fetch_hid_descriptor()
890 &ihid->hdesc, in i2c_hid_fetch_hid_descriptor()
891 sizeof(ihid->hdesc)); in i2c_hid_fetch_hid_descriptor()
893 dev_err(&ihid->client->dev, in i2c_hid_fetch_hid_descriptor()
905 dev_err(&ihid->client->dev, in i2c_hid_fetch_hid_descriptor()
914 dev_err(&ihid->client->dev, in i2c_hid_fetch_hid_descriptor()
918 i2c_hid_dbg(ihid, "HID Descriptor: %*ph\n", dsize, &ihid->hdesc); in i2c_hid_fetch_hid_descriptor()
922 static int i2c_hid_core_power_up(struct i2c_hid *ihid) in i2c_hid_core_power_up() argument
924 if (!ihid->ops->power_up) in i2c_hid_core_power_up()
927 return ihid->ops->power_up(ihid->ops); in i2c_hid_core_power_up()
930 static void i2c_hid_core_power_down(struct i2c_hid *ihid) in i2c_hid_core_power_down() argument
932 if (!ihid->ops->power_down) in i2c_hid_core_power_down()
935 ihid->ops->power_down(ihid->ops); in i2c_hid_core_power_down()
938 static void i2c_hid_core_shutdown_tail(struct i2c_hid *ihid) in i2c_hid_core_shutdown_tail() argument
940 if (!ihid->ops->shutdown_tail) in i2c_hid_core_shutdown_tail()
943 ihid->ops->shutdown_tail(ihid->ops); in i2c_hid_core_shutdown_tail()
946 static int i2c_hid_core_suspend(struct i2c_hid *ihid, bool force_poweroff) in i2c_hid_core_suspend() argument
948 struct i2c_client *client = ihid->client; in i2c_hid_core_suspend()
949 struct hid_device *hid = ihid->hid; in i2c_hid_core_suspend()
957 if (!(ihid->quirks & I2C_HID_QUIRK_NO_SLEEP_ON_SUSPEND)) in i2c_hid_core_suspend()
958 i2c_hid_set_power(ihid, I2C_HID_PWR_SLEEP); in i2c_hid_core_suspend()
963 i2c_hid_core_power_down(ihid); in i2c_hid_core_suspend()
968 static int i2c_hid_core_resume(struct i2c_hid *ihid) in i2c_hid_core_resume() argument
970 struct i2c_client *client = ihid->client; in i2c_hid_core_resume()
971 struct hid_device *hid = ihid->hid; in i2c_hid_core_resume()
975 i2c_hid_core_power_up(ihid); in i2c_hid_core_resume()
980 ret = i2c_hid_probe_address(ihid); in i2c_hid_core_resume()
991 if (ihid->quirks & I2C_HID_QUIRK_DELAY_WAKEUP_AFTER_RESUME) in i2c_hid_core_resume()
1002 if (ihid->quirks & I2C_HID_QUIRK_RESET_ON_RESUME) { in i2c_hid_core_resume()
1003 mutex_lock(&ihid->reset_lock); in i2c_hid_core_resume()
1004 ret = i2c_hid_start_hwreset(ihid); in i2c_hid_core_resume()
1006 ret = i2c_hid_finish_hwreset(ihid); in i2c_hid_core_resume()
1007 mutex_unlock(&ihid->reset_lock); in i2c_hid_core_resume()
1009 ret = i2c_hid_set_power(ihid, I2C_HID_PWR_ON); in i2c_hid_core_resume()
1021 static int __i2c_hid_core_probe(struct i2c_hid *ihid) in __i2c_hid_core_probe() argument
1023 struct i2c_client *client = ihid->client; in __i2c_hid_core_probe()
1024 struct hid_device *hid = ihid->hid; in __i2c_hid_core_probe()
1027 ret = i2c_hid_probe_address(ihid); in __i2c_hid_core_probe()
1029 i2c_hid_dbg(ihid, "nothing at this address: %d\n", ret); in __i2c_hid_core_probe()
1033 ret = i2c_hid_fetch_hid_descriptor(ihid); in __i2c_hid_core_probe()
1040 hid->version = le16_to_cpu(ihid->hdesc.bcdVersion); in __i2c_hid_core_probe()
1041 hid->vendor = le16_to_cpu(ihid->hdesc.wVendorID); in __i2c_hid_core_probe()
1042 hid->product = le16_to_cpu(ihid->hdesc.wProductID); in __i2c_hid_core_probe()
1051 ihid->quirks = i2c_hid_lookup_quirk(hid->vendor, hid->product); in __i2c_hid_core_probe()
1056 static int i2c_hid_core_register_hid(struct i2c_hid *ihid) in i2c_hid_core_register_hid() argument
1058 struct i2c_client *client = ihid->client; in i2c_hid_core_register_hid()
1059 struct hid_device *hid = ihid->hid; in i2c_hid_core_register_hid()
1075 static int i2c_hid_core_probe_panel_follower(struct i2c_hid *ihid) in i2c_hid_core_probe_panel_follower() argument
1079 ret = i2c_hid_core_power_up(ihid); in i2c_hid_core_probe_panel_follower()
1083 ret = __i2c_hid_core_probe(ihid); in i2c_hid_core_probe_panel_follower()
1087 ret = i2c_hid_core_register_hid(ihid); in i2c_hid_core_probe_panel_follower()
1094 i2c_hid_core_power_down(ihid); in i2c_hid_core_probe_panel_follower()
1101 struct i2c_hid *ihid = container_of(work, struct i2c_hid, in ihid_core_panel_prepare_work() local
1103 struct hid_device *hid = ihid->hid; in ihid_core_panel_prepare_work()
1112 ret = i2c_hid_core_probe_panel_follower(ihid); in ihid_core_panel_prepare_work()
1114 ret = i2c_hid_core_resume(ihid); in ihid_core_panel_prepare_work()
1117 dev_warn(&ihid->client->dev, "Power on failed: %d\n", ret); in ihid_core_panel_prepare_work()
1119 WRITE_ONCE(ihid->prepare_work_finished, true); in ihid_core_panel_prepare_work()
1135 struct i2c_hid *ihid = container_of(follower, struct i2c_hid, panel_follower); in i2c_hid_core_panel_prepared() local
1141 WRITE_ONCE(ihid->prepare_work_finished, false); in i2c_hid_core_panel_prepared()
1142 schedule_work(&ihid->panel_follower_prepare_work); in i2c_hid_core_panel_prepared()
1149 struct i2c_hid *ihid = container_of(follower, struct i2c_hid, panel_follower); in i2c_hid_core_panel_unpreparing() local
1151 cancel_work_sync(&ihid->panel_follower_prepare_work); in i2c_hid_core_panel_unpreparing()
1155 if (!READ_ONCE(ihid->prepare_work_finished)) in i2c_hid_core_panel_unpreparing()
1158 return i2c_hid_core_suspend(ihid, true); in i2c_hid_core_panel_unpreparing()
1166 static int i2c_hid_core_register_panel_follower(struct i2c_hid *ihid) in i2c_hid_core_register_panel_follower() argument
1168 struct device *dev = &ihid->client->dev; in i2c_hid_core_register_panel_follower()
1171 ihid->panel_follower.funcs = &i2c_hid_core_panel_follower_funcs; in i2c_hid_core_register_panel_follower()
1183 ret = drm_panel_add_follower(dev, &ihid->panel_follower); in i2c_hid_core_register_panel_follower()
1194 struct i2c_hid *ihid; in i2c_hid_core_probe() local
1212 ihid = devm_kzalloc(&client->dev, sizeof(*ihid), GFP_KERNEL); in i2c_hid_core_probe()
1213 if (!ihid) in i2c_hid_core_probe()
1216 i2c_set_clientdata(client, ihid); in i2c_hid_core_probe()
1218 ihid->ops = ops; in i2c_hid_core_probe()
1219 ihid->client = client; in i2c_hid_core_probe()
1220 ihid->wHIDDescRegister = cpu_to_le16(hid_descriptor_address); in i2c_hid_core_probe()
1221 ihid->is_panel_follower = drm_is_panel_follower(&client->dev); in i2c_hid_core_probe()
1223 init_waitqueue_head(&ihid->wait); in i2c_hid_core_probe()
1224 mutex_init(&ihid->cmd_lock); in i2c_hid_core_probe()
1225 mutex_init(&ihid->reset_lock); in i2c_hid_core_probe()
1226 INIT_WORK(&ihid->panel_follower_prepare_work, ihid_core_panel_prepare_work); in i2c_hid_core_probe()
1231 ret = i2c_hid_alloc_buffers(ihid, HID_MIN_BUFFER_SIZE); in i2c_hid_core_probe()
1242 ihid->hid = hid; in i2c_hid_core_probe()
1251 if (!ihid->is_panel_follower) { in i2c_hid_core_probe()
1252 ret = i2c_hid_core_power_up(ihid); in i2c_hid_core_probe()
1256 ret = __i2c_hid_core_probe(ihid); in i2c_hid_core_probe()
1269 if (ihid->is_panel_follower) in i2c_hid_core_probe()
1270 ret = i2c_hid_core_register_panel_follower(ihid); in i2c_hid_core_probe()
1272 ret = i2c_hid_core_register_hid(ihid); in i2c_hid_core_probe()
1279 free_irq(client->irq, ihid); in i2c_hid_core_probe()
1281 if (!ihid->is_panel_follower) in i2c_hid_core_probe()
1282 i2c_hid_core_power_down(ihid); in i2c_hid_core_probe()
1286 i2c_hid_free_buffers(ihid); in i2c_hid_core_probe()
1294 struct i2c_hid *ihid = i2c_get_clientdata(client); in i2c_hid_core_remove() local
1301 if (ihid->is_panel_follower) in i2c_hid_core_remove()
1302 drm_panel_remove_follower(&ihid->panel_follower); in i2c_hid_core_remove()
1304 i2c_hid_core_suspend(ihid, true); in i2c_hid_core_remove()
1306 hid = ihid->hid; in i2c_hid_core_remove()
1309 free_irq(client->irq, ihid); in i2c_hid_core_remove()
1311 if (ihid->bufsize) in i2c_hid_core_remove()
1312 i2c_hid_free_buffers(ihid); in i2c_hid_core_remove()
1318 struct i2c_hid *ihid = i2c_get_clientdata(client); in i2c_hid_core_shutdown() local
1320 i2c_hid_set_power(ihid, I2C_HID_PWR_SLEEP); in i2c_hid_core_shutdown()
1321 free_irq(client->irq, ihid); in i2c_hid_core_shutdown()
1323 i2c_hid_core_shutdown_tail(ihid); in i2c_hid_core_shutdown()
1330 struct i2c_hid *ihid = i2c_get_clientdata(client); in i2c_hid_core_pm_suspend() local
1332 if (ihid->is_panel_follower) in i2c_hid_core_pm_suspend()
1335 return i2c_hid_core_suspend(ihid, false); in i2c_hid_core_pm_suspend()
1341 struct i2c_hid *ihid = i2c_get_clientdata(client); in i2c_hid_core_pm_resume() local
1343 if (ihid->is_panel_follower) in i2c_hid_core_pm_resume()
1346 return i2c_hid_core_resume(ihid); in i2c_hid_core_pm_resume()