• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/pps/

Lines Matching defs:pps

46 	struct pps_device *pps = file->private_data;
48 poll_wait(file, &pps->queue, wait);
55 struct pps_device *pps = file->private_data;
56 return fasync_helper(fd, file, on, &pps->async_queue);
62 struct pps_device *pps = file->private_data;
72 pr_debug("PPS_GETPARAMS: source %d\n", pps->id);
74 spin_lock_irq(&pps->lock);
77 params = pps->params;
79 spin_unlock_irq(&pps->lock);
88 pr_debug("PPS_SETPARAMS: source %d\n", pps->id);
104 if ((params.mode & ~pps->info.mode) != 0) {
110 spin_lock_irq(&pps->lock);
113 pps->params = params;
120 pps->params.mode |= PPS_TSFMT_TSPEC;
122 if (pps->info.mode & PPS_CANWAIT)
123 pps->params.mode |= PPS_CANWAIT;
124 pps->params.api_version = PPS_API_VERS;
126 spin_unlock_irq(&pps->lock);
131 pr_debug("PPS_GETCAP: source %d\n", pps->id);
133 err = put_user(pps->info.mode, iuarg);
140 pr_debug("PPS_FETCH: source %d\n", pps->id);
146 pps->go = 0;
150 err = wait_event_interruptible(pps->queue, pps->go);
160 pps->queue, pps->go, ticks);
173 spin_lock_irq(&pps->lock);
175 fdata.info.assert_sequence = pps->assert_sequence;
176 fdata.info.clear_sequence = pps->clear_sequence;
177 fdata.info.assert_tu = pps->assert_tu;
178 fdata.info.clear_tu = pps->clear_tu;
179 fdata.info.current_mode = pps->current_mode;
181 spin_unlock_irq(&pps->lock);
199 struct pps_device *pps = container_of(inode->i_cdev,
203 found = pps_get_source(pps->id) != 0;
207 file->private_data = pps;
214 struct pps_device *pps = file->private_data;
217 pps_put_source(pps);
236 int pps_register_cdev(struct pps_device *pps)
240 pps->devno = MKDEV(MAJOR(pps_devt), pps->id);
241 cdev_init(&pps->cdev, &pps_cdev_fops);
242 pps->cdev.owner = pps->info.owner;
244 err = cdev_add(&pps->cdev, pps->devno, 1);
246 printk(KERN_ERR "pps: %s: failed to add char device %d:%d\n",
247 pps->info.name, MAJOR(pps_devt), pps->id);
250 pps->dev = device_create(pps_class, pps->info.dev, pps->devno, NULL,
251 "pps%d", pps->id);
252 if (IS_ERR(pps->dev))
254 dev_set_drvdata(pps->dev, pps);
256 pr_debug("source %s got cdev (%d:%d)\n", pps->info.name,
257 MAJOR(pps_devt), pps->id);
262 cdev_del(&pps->cdev);
267 void pps_unregister_cdev(struct pps_device *pps)
269 device_destroy(pps_class, pps->devno);
270 cdev_del(&pps->cdev);
287 pps_class = class_create(THIS_MODULE, "pps");
289 printk(KERN_ERR "pps: failed to allocate class\n");
294 err = alloc_chrdev_region(&pps_devt, 0, PPS_MAX_SOURCES, "pps");
296 printk(KERN_ERR "pps: failed to allocate char device region\n");