Lines Matching defs:priv
78 struct mmio_74xx_gpio_priv *priv = gpiochip_get_data(gc);
80 if (priv->flags & MMIO_74XX_DIR_OUT)
88 struct mmio_74xx_gpio_priv *priv = gpiochip_get_data(gc);
90 return (priv->flags & MMIO_74XX_DIR_OUT) ? -ENOTSUPP : 0;
95 struct mmio_74xx_gpio_priv *priv = gpiochip_get_data(gc);
97 if (priv->flags & MMIO_74XX_DIR_OUT) {
107 struct mmio_74xx_gpio_priv *priv;
111 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
112 if (!priv)
115 priv->flags = (uintptr_t)of_device_get_match_data(&pdev->dev);
121 err = bgpio_init(&priv->gc, &pdev->dev,
122 DIV_ROUND_UP(MMIO_74XX_BIT_CNT(priv->flags), 8),
127 priv->gc.direction_input = mmio_74xx_dir_in;
128 priv->gc.direction_output = mmio_74xx_dir_out;
129 priv->gc.get_direction = mmio_74xx_get_direction;
130 priv->gc.ngpio = MMIO_74XX_BIT_CNT(priv->flags);
131 priv->gc.owner = THIS_MODULE;
133 platform_set_drvdata(pdev, priv);
135 return devm_gpiochip_add_data(&pdev->dev, &priv->gc, priv);