stx104gpio 220 drivers/iio/adc/stx104.c struct stx104_gpio *const stx104gpio = gpiochip_get_data(chip); stx104gpio 225 drivers/iio/adc/stx104.c return !!(inb(stx104gpio->base) & BIT(offset)); stx104gpio 231 drivers/iio/adc/stx104.c struct stx104_gpio *const stx104gpio = gpiochip_get_data(chip); stx104gpio 233 drivers/iio/adc/stx104.c *bits = inb(stx104gpio->base); stx104gpio 241 drivers/iio/adc/stx104.c struct stx104_gpio *const stx104gpio = gpiochip_get_data(chip); stx104gpio 248 drivers/iio/adc/stx104.c spin_lock_irqsave(&stx104gpio->lock, flags); stx104gpio 251 drivers/iio/adc/stx104.c stx104gpio->out_state |= mask; stx104gpio 253 drivers/iio/adc/stx104.c stx104gpio->out_state &= ~mask; stx104gpio 255 drivers/iio/adc/stx104.c outb(stx104gpio->out_state, stx104gpio->base); stx104gpio 257 drivers/iio/adc/stx104.c spin_unlock_irqrestore(&stx104gpio->lock, flags); stx104gpio 268 drivers/iio/adc/stx104.c struct stx104_gpio *const stx104gpio = gpiochip_get_data(chip); stx104gpio 278 drivers/iio/adc/stx104.c spin_lock_irqsave(&stx104gpio->lock, flags); stx104gpio 280 drivers/iio/adc/stx104.c stx104gpio->out_state &= ~*mask; stx104gpio 281 drivers/iio/adc/stx104.c stx104gpio->out_state |= *mask & *bits; stx104gpio 282 drivers/iio/adc/stx104.c outb(stx104gpio->out_state, stx104gpio->base); stx104gpio 284 drivers/iio/adc/stx104.c spin_unlock_irqrestore(&stx104gpio->lock, flags); stx104gpio 291 drivers/iio/adc/stx104.c struct stx104_gpio *stx104gpio; stx104gpio 298 drivers/iio/adc/stx104.c stx104gpio = devm_kzalloc(dev, sizeof(*stx104gpio), GFP_KERNEL); stx104gpio 299 drivers/iio/adc/stx104.c if (!stx104gpio) stx104gpio 337 drivers/iio/adc/stx104.c stx104gpio->chip.label = dev_name(dev); stx104gpio 338 drivers/iio/adc/stx104.c stx104gpio->chip.parent = dev; stx104gpio 339 drivers/iio/adc/stx104.c stx104gpio->chip.owner = THIS_MODULE; stx104gpio 340 drivers/iio/adc/stx104.c stx104gpio->chip.base = -1; stx104gpio 341 drivers/iio/adc/stx104.c stx104gpio->chip.ngpio = STX104_NGPIO; stx104gpio 342 drivers/iio/adc/stx104.c stx104gpio->chip.names = stx104_names; stx104gpio 343 drivers/iio/adc/stx104.c stx104gpio->chip.get_direction = stx104_gpio_get_direction; stx104gpio 344 drivers/iio/adc/stx104.c stx104gpio->chip.direction_input = stx104_gpio_direction_input; stx104gpio 345 drivers/iio/adc/stx104.c stx104gpio->chip.direction_output = stx104_gpio_direction_output; stx104gpio 346 drivers/iio/adc/stx104.c stx104gpio->chip.get = stx104_gpio_get; stx104gpio 347 drivers/iio/adc/stx104.c stx104gpio->chip.get_multiple = stx104_gpio_get_multiple; stx104gpio 348 drivers/iio/adc/stx104.c stx104gpio->chip.set = stx104_gpio_set; stx104gpio 349 drivers/iio/adc/stx104.c stx104gpio->chip.set_multiple = stx104_gpio_set_multiple; stx104gpio 350 drivers/iio/adc/stx104.c stx104gpio->base = base[id] + 3; stx104gpio 351 drivers/iio/adc/stx104.c stx104gpio->out_state = 0x0; stx104gpio 353 drivers/iio/adc/stx104.c spin_lock_init(&stx104gpio->lock); stx104gpio 355 drivers/iio/adc/stx104.c err = devm_gpiochip_add_data(dev, &stx104gpio->chip, stx104gpio);