Lines Matching defs:stx104gpio
256 struct stx104_gpio *const stx104gpio = gpiochip_get_data(chip);
261 return !!(ioread8(stx104gpio->base) & BIT(offset));
267 struct stx104_gpio *const stx104gpio = gpiochip_get_data(chip);
269 *bits = ioread8(stx104gpio->base);
277 struct stx104_gpio *const stx104gpio = gpiochip_get_data(chip);
284 spin_lock_irqsave(&stx104gpio->lock, flags);
287 stx104gpio->out_state |= mask;
289 stx104gpio->out_state &= ~mask;
291 iowrite8(stx104gpio->out_state, stx104gpio->base);
293 spin_unlock_irqrestore(&stx104gpio->lock, flags);
304 struct stx104_gpio *const stx104gpio = gpiochip_get_data(chip);
314 spin_lock_irqsave(&stx104gpio->lock, flags);
316 stx104gpio->out_state &= ~*mask;
317 stx104gpio->out_state |= *mask & *bits;
318 iowrite8(stx104gpio->out_state, stx104gpio->base);
320 spin_unlock_irqrestore(&stx104gpio->lock, flags);
327 struct stx104_gpio *stx104gpio;
334 stx104gpio = devm_kzalloc(dev, sizeof(*stx104gpio), GFP_KERNEL);
335 if (!stx104gpio)
376 stx104gpio->chip.label = dev_name(dev);
377 stx104gpio->chip.parent = dev;
378 stx104gpio->chip.owner = THIS_MODULE;
379 stx104gpio->chip.base = -1;
380 stx104gpio->chip.ngpio = STX104_NGPIO;
381 stx104gpio->chip.names = stx104_names;
382 stx104gpio->chip.get_direction = stx104_gpio_get_direction;
383 stx104gpio->chip.direction_input = stx104_gpio_direction_input;
384 stx104gpio->chip.direction_output = stx104_gpio_direction_output;
385 stx104gpio->chip.get = stx104_gpio_get;
386 stx104gpio->chip.get_multiple = stx104_gpio_get_multiple;
387 stx104gpio->chip.set = stx104_gpio_set;
388 stx104gpio->chip.set_multiple = stx104_gpio_set_multiple;
389 stx104gpio->base = &priv->reg->dio;
390 stx104gpio->out_state = 0x0;
392 spin_lock_init(&stx104gpio->lock);
394 err = devm_gpiochip_add_data(dev, &stx104gpio->chip, stx104gpio);