Lines Matching defs:offset
209 static void __iomem *lp_gpio_reg(struct gpio_chip *chip, unsigned int offset,
216 comm = intel_get_community(lg, offset);
220 offset -= comm->pin_base;
224 reg_offset = offset * 8;
227 reg_offset = (offset / 32) * 4;
243 static bool lp_gpio_ioxapic_use(struct gpio_chip *chip, unsigned int offset)
245 void __iomem *ioxapic_use = lp_gpio_reg(chip, offset, LP_IRQ2IOXAPIC);
250 if (offset >= 8 && offset <= 10)
251 return !!(value & BIT(offset - 8 + 0));
252 if (offset >= 13 && offset <= 14)
253 return !!(value & BIT(offset - 13 + 3));
254 if (offset >= 45 && offset <= 55)
255 return !!(value & BIT(offset - 45 + 5));
524 static int lp_gpio_get(struct gpio_chip *chip, unsigned int offset)
526 void __iomem *reg = lp_gpio_reg(chip, offset, LP_CONFIG1);
530 static void lp_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
533 void __iomem *reg = lp_gpio_reg(chip, offset, LP_CONFIG1);
546 static int lp_gpio_direction_input(struct gpio_chip *chip, unsigned int offset)
548 return pinctrl_gpio_direction_input(chip->base + offset);
551 static int lp_gpio_direction_output(struct gpio_chip *chip, unsigned int offset,
554 lp_gpio_set(chip, offset, value);
556 return pinctrl_gpio_direction_output(chip->base + offset);
559 static int lp_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)
561 void __iomem *reg = lp_gpio_reg(chip, offset, LP_CONFIG1);