#endif
int mgr_suspend_init(void )
{
- int ret;
atomic_set(&g_mgr_suspend.refcnt, 0);
atomic_set(&g_mgr_suspend.in_sdio_suspend, 0);
mutex_init(&g_mgr_suspend.func_lock);
void set_sprd_download_fin(int dl_tag)
{
- return fwdownload_fin = dl_tag;
+ fwdownload_fin = dl_tag;
}
EXPORT_SYMBOL_GPL(set_sprd_download_fin);
old_fs = get_fs();
set_fs(KERNEL_DS);
- buf = (int *)kzalloc(4,GFP_KERNEL);
+ buf = kzalloc(4,GFP_KERNEL);
vfs_read(file, buf, 3, &pos);
#if !defined(CONFIG_MARLIN_NO_SLEEP)
int ret;
- int flags;
+ unsigned long flags;
+#if 0
int screen_status = 1;
int bt_state ;
+#endif
SDIOTRAN_DEBUG("entry");
if(get_sprd_download_fin() != 1)
if(0 != ack_gpio_status) //bt ack low,then lose the marlinwake irq
{
spin_unlock_irqrestore(&sleep_spinlock, flags);
- SDIOTRAN_ERR("ack_gpio_status-%d", ack_gpio_status,user_id);
+ SDIOTRAN_ERR("ack_gpio_status-%d,user_id-%d", ack_gpio_status,user_id);
return -2;
}
if(0 == atomic_read(&(set_marlin_cmplete))) //last wakeup don't complete
{
spin_unlock_irqrestore(&sleep_spinlock, flags);
- SDIOTRAN_ERR("set_marlin_complete -%d", set_marlin_cmplete);
+ SDIOTRAN_ERR("set_marlin_complete -%d", atomic_read(&set_marlin_cmplete));
return -3;
}
}
-static void marlin_workq(void)
+static void marlin_workq(struct work_struct *work)
{
int read_chn;
int ret = 0;
EXPORT_SYMBOL_GPL(marlin_sdio_sync_uninit);
-static void marlinack_workq(void)
+static void marlinack_workq(struct work_struct *work)
{
- int read_chn;
- int ret = 0;
-
SDIOTRAN_ERR("ENTRY");
if(sdio_w_flag == 1)
complete(&marlin_ack);
static irqreturn_t marlinwake_irq_handler(int irq, void * para)
{
struct timeval cur_time;
- uint32 gpio_wake_status = 0, usec;
+ uint32 gpio_wake_status = 0;
//irq_set_irq_type(irq,IRQF_TRIGGER_RISING|IRQF_TRIGGER_FALLING);
gpio_wake_status = gpio_get_value(sdio_data->wake_ack);
do_gettimeofday(&cur_time);
if(ack_gpio_status == gpio_wake_status)
{
+#if 0
+ uint32 usec;
//usec = time_d_value(&ack_irq_time, &cur_time);
//if(usec < 200) //means invalid gpio value, so discard
+#endif
{
SDIOTRAN_ERR("discard gpio%d irq", sdio_data->wake_ack);
return IRQ_HANDLED;
}
-
-
+#if defined(CONFIG_SDIODEV_TEST)
static void sdio_tran_sync(void)
{
- int datalen,i,j;
+ int datalen,i;
SDIOTRAN_ERR("entry");
if (NULL == sync_data_ptr)
{
SDIOTRAN_ERR("kmalloc sync buf err!!!");
- return -1;
+ return;
}
SDIOTRAN_ERR("kmalloc sync buf ok!!!");
set_blklen(512);
}
-
+#endif
void set_blklen(int blklen)
{