static irqreturn_t sch_gpio_irq_handler(int irq, void *dev_id) { int res; int i, ret = IRQ_NONE; for (i = 0; i < sch_gpio_core.ngpio; i++) { res = sch_gpio_reg_get(CGTS, i); if (res) { /* clear by setting TS to 1 */ sch_gpio_reg_set(CGTS, i, 1); generic_handle_irq(chip_ptr->irq_base_core + i); ret = IRQ_HANDLED; } } for (i = 0; i < sch_gpio_resume.ngpio; i++) { res = sch_gpio_reg_get(RGTS, i); if (res) { /* clear by setting TS to 1 */ sch_gpio_reg_set(RGTS, i, 1); generic_handle_irq(chip_ptr->irq_base_resume + i); ret = IRQ_HANDLED; } } return ret; }
static int sch_gpio_resume_get(struct gpio_chip *gc, unsigned gpio_num) { int res; res = sch_gpio_reg_get(RGLV, gpio_num); return res; }
static int sch_gpio_get(struct gpio_chip *gc, unsigned gpio_num) { return sch_gpio_reg_get(gc, gpio_num, GLV); }
static int sch_gpio_get(struct gpio_chip *gc, unsigned gpio_num) { struct sch_gpio *sch = gpiochip_get_data(gc); return sch_gpio_reg_get(sch, gpio_num, GLV); }