Lines Matching full:sample
3 * Sample in-kernel QMI client driver
456 struct qmi_sample *sample; in qmi_sample_probe() local
460 sample = devm_kzalloc(&pdev->dev, sizeof(*sample), GFP_KERNEL); in qmi_sample_probe()
461 if (!sample) in qmi_sample_probe()
464 ret = qmi_handle_init(&sample->qmi, TEST_DATA_REQ_MAX_MSG_LEN_V01, in qmi_sample_probe()
471 ret = kernel_connect(sample->qmi.sock, (struct sockaddr *)sq, in qmi_sample_probe()
480 sample->de_dir = debugfs_create_dir(path, qmi_debug_dir); in qmi_sample_probe()
481 if (IS_ERR(sample->de_dir)) { in qmi_sample_probe()
482 ret = PTR_ERR(sample->de_dir); in qmi_sample_probe()
486 sample->de_data = debugfs_create_file("data", 0600, sample->de_dir, in qmi_sample_probe()
487 sample, &data_fops); in qmi_sample_probe()
488 if (IS_ERR(sample->de_data)) { in qmi_sample_probe()
489 ret = PTR_ERR(sample->de_data); in qmi_sample_probe()
493 sample->de_ping = debugfs_create_file("ping", 0600, sample->de_dir, in qmi_sample_probe()
494 sample, &ping_fops); in qmi_sample_probe()
495 if (IS_ERR(sample->de_ping)) { in qmi_sample_probe()
496 ret = PTR_ERR(sample->de_ping); in qmi_sample_probe()
500 platform_set_drvdata(pdev, sample); in qmi_sample_probe()
505 debugfs_remove(sample->de_data); in qmi_sample_probe()
507 debugfs_remove(sample->de_dir); in qmi_sample_probe()
509 qmi_handle_release(&sample->qmi); in qmi_sample_probe()
516 struct qmi_sample *sample = platform_get_drvdata(pdev); in qmi_sample_remove() local
518 debugfs_remove(sample->de_ping); in qmi_sample_remove()
519 debugfs_remove(sample->de_data); in qmi_sample_remove()
520 debugfs_remove(sample->de_dir); in qmi_sample_remove()
522 qmi_handle_release(&sample->qmi); in qmi_sample_remove()
619 MODULE_DESCRIPTION("Sample QMI client driver");