Lines Matching refs:xra

53 	struct xra1403 *xra = gpiochip_get_data(chip);
55 return regmap_update_bits(xra->regmap, to_reg(XRA_GCR, offset),
63 struct xra1403 *xra = gpiochip_get_data(chip);
65 ret = regmap_update_bits(xra->regmap, to_reg(XRA_GCR, offset),
70 ret = regmap_update_bits(xra->regmap, to_reg(XRA_OCR, offset),
80 struct xra1403 *xra = gpiochip_get_data(chip);
82 ret = regmap_read(xra->regmap, to_reg(XRA_GCR, offset), &val);
96 struct xra1403 *xra = gpiochip_get_data(chip);
98 ret = regmap_read(xra->regmap, to_reg(XRA_GSR, offset), &val);
108 struct xra1403 *xra = gpiochip_get_data(chip);
110 ret = regmap_update_bits(xra->regmap, to_reg(XRA_OCR, offset),
121 struct xra1403 *xra = gpiochip_get_data(chip);
128 seq_puts(s, "xra reg:");
133 regmap_read(xra->regmap, reg, &value[reg]);
153 struct xra1403 *xra;
157 xra = devm_kzalloc(&spi->dev, sizeof(*xra), GFP_KERNEL);
158 if (!xra)
166 xra->chip.direction_input = xra1403_direction_input;
167 xra->chip.direction_output = xra1403_direction_output;
168 xra->chip.get_direction = xra1403_get_direction;
169 xra->chip.get = xra1403_get;
170 xra->chip.set = xra1403_set;
172 xra->chip.dbg_show = xra1403_dbg_show;
174 xra->chip.ngpio = 16;
175 xra->chip.label = "xra1403";
177 xra->chip.base = -1;
178 xra->chip.can_sleep = true;
179 xra->chip.parent = &spi->dev;
180 xra->chip.owner = THIS_MODULE;
182 xra->regmap = devm_regmap_init_spi(spi, &xra1403_regmap_cfg);
183 if (IS_ERR(xra->regmap)) {
184 ret = PTR_ERR(xra->regmap);
189 ret = devm_gpiochip_add_data(&spi->dev, &xra->chip, xra);
195 spi_set_drvdata(spi, xra);