comparison driver/pt1_pci.c @ 109:8a2a032bfa50

temporarily disabled set_sleepmode due to frequent read problem.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 06 Mar 2010 19:13:17 +0900
parents bc173c443e4d
children c8cfd684fee8
comparison
equal deleted inserted replaced
108:bc173c443e4d 109:8a2a032bfa50
341 if(channel->minor == minor){ 341 if(channel->minor == minor){
342 if(channel->valid == TRUE){ 342 if(channel->valid == TRUE){
343 mutex_unlock(&device[lp]->lock); 343 mutex_unlock(&device[lp]->lock);
344 return -EIO ; 344 return -EIO ;
345 } 345 }
346 346 #if 0
347 /* wake tuner up */ 347 /* wake tuner up */
348 set_sleepmode(channel->ptr->regs, &channel->lock, 348 set_sleepmode(channel->ptr->regs, &channel->lock,
349 channel->address, channel->type, 349 channel->address, channel->type,
350 TYPE_WAKEUP); 350 TYPE_WAKEUP);
351 schedule_timeout_interruptible(msecs_to_jiffies(50)); 351 schedule_timeout_interruptible(msecs_to_jiffies(50));
352 352 #endif
353 channel->drop = 0 ; 353 channel->drop = 0 ;
354 channel->valid = TRUE ; 354 channel->valid = TRUE ;
355 channel->overflow = 0 ; 355 channel->overflow = 0 ;
356 channel->counetererr = 0 ; 356 channel->counetererr = 0 ;
357 channel->transerr = 0 ; 357 channel->transerr = 0 ;
387 channel->req_dma = FALSE ; 387 channel->req_dma = FALSE ;
388 wake_up(&channel->ptr->dma_wait_q); 388 wake_up(&channel->ptr->dma_wait_q);
389 } 389 }
390 mutex_unlock(&channel->ptr->lock); 390 mutex_unlock(&channel->ptr->lock);
391 391
392 #if 0
392 /* send tuner to sleep */ 393 /* send tuner to sleep */
393 set_sleepmode(channel->ptr->regs, &channel->lock, 394 set_sleepmode(channel->ptr->regs, &channel->lock,
394 channel->address, channel->type, TYPE_SLEEP); 395 channel->address, channel->type, TYPE_SLEEP);
395 schedule_timeout_interruptible(msecs_to_jiffies(50)); 396 schedule_timeout_interruptible(msecs_to_jiffies(50));
397 #endif
396 398
397 return 0; 399 return 0;
398 } 400 }
399 401
400 static ssize_t pt1_read(struct file *file, char __user *buf, size_t cnt, loff_t * ppos) 402 static ssize_t pt1_read(struct file *file, char __user *buf, size_t cnt, loff_t * ppos)
753 } 755 }
754 } 756 }
755 // 初期化完了 757 // 初期化完了
756 for(lp = 0 ; lp < MAX_CHANNEL ; lp++){ 758 for(lp = 0 ; lp < MAX_CHANNEL ; lp++){
757 set_sleepmode(dev_conf->regs, &dev_conf->lock, 759 set_sleepmode(dev_conf->regs, &dev_conf->lock,
758 i2c_address[lp], channeltype[lp], TYPE_SLEEP); 760 i2c_address[lp], channeltype[lp], TYPE_WAKEUP);
759 761
760 schedule_timeout_interruptible(msecs_to_jiffies(50)); 762 schedule_timeout_interruptible(msecs_to_jiffies(50));
761 } 763 }
762 rc = alloc_chrdev_region(&dev_conf->dev, 0, MAX_CHANNEL, DEV_NAME); 764 rc = alloc_chrdev_region(&dev_conf->dev, 0, MAX_CHANNEL, DEV_NAME);
763 if(rc < 0){ 765 if(rc < 0){