@@ -190,6 +190,16 @@ static void stmpe_gpio_irq_sync_unlock(struct irq_data *d)
190190 };
191191 int i , j ;
192192
193+ /*
194+ * STMPE1600: to be able to get IRQ from pins,
195+ * a read must be done on GPMR register, or a write in
196+ * GPSR or GPCR registers
197+ */
198+ if (stmpe -> partnum == STMPE1600 ) {
199+ stmpe_reg_read (stmpe , stmpe -> regs [STMPE_IDX_GPMR_LSB ]);
200+ stmpe_reg_read (stmpe , stmpe -> regs [STMPE_IDX_GPMR_CSB ]);
201+ }
202+
193203 for (i = 0 ; i < CACHE_NR_REGS ; i ++ ) {
194204 /* STMPE801 and STMPE1600 don't have RE and FE registers */
195205 if ((stmpe -> partnum == STMPE801 ||
@@ -227,21 +237,11 @@ static void stmpe_gpio_irq_unmask(struct irq_data *d)
227237{
228238 struct gpio_chip * gc = irq_data_get_irq_chip_data (d );
229239 struct stmpe_gpio * stmpe_gpio = gpiochip_get_data (gc );
230- struct stmpe * stmpe = stmpe_gpio -> stmpe ;
231240 int offset = d -> hwirq ;
232241 int regoffset = offset / 8 ;
233242 int mask = BIT (offset % 8 );
234243
235244 stmpe_gpio -> regs [REG_IE ][regoffset ] |= mask ;
236-
237- /*
238- * STMPE1600 workaround: to be able to get IRQ from pins,
239- * a read must be done on GPMR register, or a write in
240- * GPSR or GPCR registers
241- */
242- if (stmpe -> partnum == STMPE1600 )
243- stmpe_reg_read (stmpe ,
244- stmpe -> regs [STMPE_IDX_GPMR_LSB + regoffset ]);
245245}
246246
247247static void stmpe_dbg_show_one (struct seq_file * s ,
0 commit comments