From: cmc-ubuntu Date: Wed, 17 Nov 2010 01:48:29 +0000 (+0800) Subject: xpt2046 irq support ok X-Git-Tag: firefly_0821_release~11023 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ce9b7865564b9776f48edfa20d85f86760b09023;p=firefly-linux-kernel-4.4.55.git xpt2046 irq support ok --- diff --git a/drivers/input/touchscreen/xpt2046_cbn_ts.c b/drivers/input/touchscreen/xpt2046_cbn_ts.c index 98d3bec83303..562c78a4747b 100755 --- a/drivers/input/touchscreen/xpt2046_cbn_ts.c +++ b/drivers/input/touchscreen/xpt2046_cbn_ts.c @@ -556,11 +556,7 @@ static irqreturn_t xpt2046_irq(int irq, void *handle) if (likely(get_pendown_state(ts))) { if (!ts->irq_disabled) { - /* The ARM do_simple_IRQ() dispatcher doesn't act - * like the other dispatchers: it will report IRQs - * even after they've been disabled. We work around - * that here. (The "generic irq" framework may help...) - */ + ts->irq_disabled = 1; disable_irq_nosync(ts->spi->irq); ts->pending = 1; diff --git a/drivers/spi/rk29xx_spim.c b/drivers/spi/rk29xx_spim.c index daa6cd8968ea..f526e94b7a91 100755 --- a/drivers/spi/rk29xx_spim.c +++ b/drivers/spi/rk29xx_spim.c @@ -38,9 +38,9 @@ QUICK_TRANSFER ĬÈÏʹÓðëË«¹¤ */ -#define QUICK_TRANSFER +//#define QUICK_TRANSFER -#if 1 +#if 0 #define DBG(x...) printk(x) #else #define DBG(x...) @@ -238,7 +238,7 @@ static int null_writer(struct rk29xx_spi *dws) return 0; rk29xx_writew(dws, SPIM_TXDR, 0); dws->tx += n_bytes; - //wait_till_not_busy(dws); + wait_till_not_busy(dws); return 1; } @@ -264,7 +264,7 @@ static int u8_writer(struct rk29xx_spi *dws) rk29xx_writew(dws, SPIM_TXDR, *(u8 *)(dws->tx)); DBG(KERN_INFO "dws->tx:%x\n", *(u8 *)(dws->tx)); ++dws->tx; - //wait_till_not_busy(dws); + wait_till_not_busy(dws); return 1; } @@ -291,7 +291,7 @@ static int u16_writer(struct rk29xx_spi *dws) rk29xx_writew(dws, SPIM_TXDR, *(u16 *)(dws->tx)); dws->tx += 2; - //wait_till_not_busy(dws); + wait_till_not_busy(dws); return 1; } @@ -374,7 +374,7 @@ static struct rk29_dma_client rk29_spi_dma_client = { }; static int acquire_dma(struct rk29xx_spi *dws) -{ +{ #if 1 dws->dma_inited = 0; return 1; @@ -384,7 +384,6 @@ static int acquire_dma(struct rk29xx_spi *dws) return 1; } - printk(KERN_INFO "request dma\n"); if(rk29_dma_request(dws->rx_dmach, &rk29_spi_dma_client, NULL) < 0) { dev_err(&dws->master->dev, "dws->rx_dmach : %d, cannot get RxDMA\n", dws->rx_dmach); @@ -416,7 +415,7 @@ static int acquire_dma(struct rk29xx_spi *dws) * the virt addr to physical */ static int map_dma_buffers(struct rk29xx_spi *dws) -{ +{ if (!dws->cur_msg->is_dma_mapped || !dws->dma_inited || !dws->cur_chip->enable_dma) return 0; @@ -835,7 +834,7 @@ static void do_read(struct rk29xx_spi *dws) while (1) { if (dws->read(dws)) break; - if (count ++ == 0x20) { + if (count++ == 0x20) { dev_err(&dws->master->dev, "+++++++++++spi receive data time out+++++++++++++\n"); break; } @@ -967,10 +966,8 @@ static int rk29xx_pump_transfers(struct rk29xx_spi *dws, int mode) chip = dws->cur_chip; spi = message->spi; - if (unlikely(!chip->clk_div)) { + if (unlikely(!chip->clk_div)) chip->clk_div = clk_get_rate(dws->clock_spim) / chip->speed_hz; - chip->clk_div = (chip->clk_div + 1) & 0xfffe; - } if (message->state == ERROR_STATE) { message->status = -EIO; goto early_exit;