Lines Matching defs:xra
52 struct xra1403 *xra = gpiochip_get_data(chip);
54 return regmap_update_bits(xra->regmap, to_reg(XRA_GCR, offset),
62 struct xra1403 *xra = gpiochip_get_data(chip);
64 ret = regmap_update_bits(xra->regmap, to_reg(XRA_GCR, offset),
69 ret = regmap_update_bits(xra->regmap, to_reg(XRA_OCR, offset),
79 struct xra1403 *xra = gpiochip_get_data(chip);
81 ret = regmap_read(xra->regmap, to_reg(XRA_GCR, offset), &val);
95 struct xra1403 *xra = gpiochip_get_data(chip);
97 ret = regmap_read(xra->regmap, to_reg(XRA_GSR, offset), &val);
107 struct xra1403 *xra = gpiochip_get_data(chip);
109 ret = regmap_update_bits(xra->regmap, to_reg(XRA_OCR, offset),
120 struct xra1403 *xra = gpiochip_get_data(chip);
127 seq_puts(s, "xra reg:");
132 regmap_read(xra->regmap, reg, &value[reg]);
152 struct xra1403 *xra;
156 xra = devm_kzalloc(&spi->dev, sizeof(*xra), GFP_KERNEL);
157 if (!xra)
165 xra->chip.direction_input = xra1403_direction_input;
166 xra->chip.direction_output = xra1403_direction_output;
167 xra->chip.get_direction = xra1403_get_direction;
168 xra->chip.get = xra1403_get;
169 xra->chip.set = xra1403_set;
171 xra->chip.dbg_show = xra1403_dbg_show;
173 xra->chip.ngpio = 16;
174 xra->chip.label = "xra1403";
176 xra->chip.base = -1;
177 xra->chip.can_sleep = true;
178 xra->chip.parent = &spi->dev;
179 xra->chip.owner = THIS_MODULE;
181 xra->regmap = devm_regmap_init_spi(spi, &xra1403_regmap_cfg);
182 if (IS_ERR(xra->regmap)) {
183 ret = PTR_ERR(xra->regmap);
188 return devm_gpiochip_add_data(&spi->dev, &xra->chip, xra);