hello kangqi236,
sorry for late reply, let’s debug further.
could you please enable dynamic debug flag of pps driver.
for example,
# cd /sys/kernel/debug/dynamic_debug/
# echo file pps.c +p > control
furthermore, pps_cdev_pps_fetch()
is a IOCTL call user passes the timeout values. if there was any errors, this IOCTL sequence/call would have failed.
we also need to check if there are issues in sequence of IOCTL, you may adding some debug prints as below to check whether API return any errors.
for example,
static long pps_cdev_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
{
...
case PPS_FETCH: {
struct pps_fdata fdata;
dev_dbg(pps->dev, "PPS_FETCH\n");
err = copy_from_user(&fdata, uarg, sizeof(struct pps_fdata));
if (err) {
pr_err("%s: add some debug prints...Line(%d)\n", __FUNC__, __LINE__);
return -EFAULT;
}
err = pps_cdev_pps_fetch(pps, &fdata);
if (err) {
pr_err("%s: add some debug prints...Line(%d)\n", __FUNC__, __LINE__);
return err;
}