Lines Matching defs: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);
107 struct xra1403 *xra = gpiochip_get_data(chip);
109 return regmap_update_bits(xra->regmap, to_reg(XRA_OCR, offset),
118 struct xra1403 *xra = gpiochip_get_data(chip);
125 seq_puts(s, "xra reg:");
130 regmap_read(xra->regmap, reg, &value[reg]);
150 struct xra1403 *xra;
154 xra = devm_kzalloc(&spi->dev, sizeof(*xra), GFP_KERNEL);
155 if (!xra)
163 xra->chip.direction_input = xra1403_direction_input;
164 xra->chip.direction_output = xra1403_direction_output;
165 xra->chip.get_direction = xra1403_get_direction;
166 xra->chip.get = xra1403_get;
167 xra->chip.set = xra1403_set;
169 xra->chip.dbg_show = xra1403_dbg_show;
171 xra->chip.ngpio = 16;
172 xra->chip.label = "xra1403";
174 xra->chip.base = -1;
175 xra->chip.can_sleep = true;
176 xra->chip.parent = &spi->dev;
177 xra->chip.owner = THIS_MODULE;
179 xra->regmap = devm_regmap_init_spi(spi, &xra1403_regmap_cfg);
180 if (IS_ERR(xra->regmap)) {
181 ret = PTR_ERR(xra->regmap);
186 return devm_gpiochip_add_data(&spi->dev, &xra->chip, xra);