Lines Matching refs:conf
31 struct xilinx_spi_conf *conf = mgr->priv; in xilinx_spi_state() local
33 if (!gpiod_get_value(conf->done)) in xilinx_spi_state()
43 struct xilinx_spi_conf *conf = mgr->priv; in xilinx_spi_write_init() local
52 gpiod_set_value(conf->prog_b, 1); in xilinx_spi_write_init()
56 gpiod_set_value(conf->prog_b, 0); in xilinx_spi_write_init()
58 if (gpiod_get_value(conf->done)) { in xilinx_spi_write_init()
71 struct xilinx_spi_conf *conf = mgr->priv; in xilinx_spi_write() local
82 ret = spi_write(conf->spi, fw_data, stride); in xilinx_spi_write()
94 static int xilinx_spi_apply_cclk_cycles(struct xilinx_spi_conf *conf) in xilinx_spi_apply_cclk_cycles() argument
96 struct spi_device *spi = conf->spi; in xilinx_spi_apply_cclk_cycles()
100 ret = spi_write(conf->spi, din_data, sizeof(din_data)); in xilinx_spi_apply_cclk_cycles()
110 struct xilinx_spi_conf *conf = mgr->priv; in xilinx_spi_write_complete() local
114 if (gpiod_get_value(conf->done)) in xilinx_spi_write_complete()
115 return xilinx_spi_apply_cclk_cycles(conf); in xilinx_spi_write_complete()
121 ret = xilinx_spi_apply_cclk_cycles(conf); in xilinx_spi_write_complete()
125 if (gpiod_get_value(conf->done)) in xilinx_spi_write_complete()
126 return xilinx_spi_apply_cclk_cycles(conf); in xilinx_spi_write_complete()
142 struct xilinx_spi_conf *conf; in xilinx_spi_probe() local
145 conf = devm_kzalloc(&spi->dev, sizeof(*conf), GFP_KERNEL); in xilinx_spi_probe()
146 if (!conf) in xilinx_spi_probe()
149 conf->spi = spi; in xilinx_spi_probe()
152 conf->prog_b = devm_gpiod_get(&spi->dev, "prog_b", GPIOD_OUT_LOW); in xilinx_spi_probe()
153 if (IS_ERR(conf->prog_b)) { in xilinx_spi_probe()
155 PTR_ERR(conf->prog_b)); in xilinx_spi_probe()
156 return PTR_ERR(conf->prog_b); in xilinx_spi_probe()
159 conf->done = devm_gpiod_get(&spi->dev, "done", GPIOD_IN); in xilinx_spi_probe()
160 if (IS_ERR(conf->done)) { in xilinx_spi_probe()
162 PTR_ERR(conf->done)); in xilinx_spi_probe()
163 return PTR_ERR(conf->done); in xilinx_spi_probe()
168 &xilinx_spi_ops, conf); in xilinx_spi_probe()