Lines Matching full:conf
83 struct altera_ps_conf *conf = mgr->priv; in altera_ps_state() local
85 if (gpiod_get_value_cansleep(conf->status)) in altera_ps_state()
103 struct altera_ps_conf *conf = mgr->priv; in altera_ps_write_init() local
107 conf->info_flags = info->flags; in altera_ps_write_init()
114 gpiod_set_value_cansleep(conf->config, 1); in altera_ps_write_init()
117 altera_ps_delay(conf->data->t_cfg_us); in altera_ps_write_init()
119 if (!gpiod_get_value_cansleep(conf->status)) { in altera_ps_write_init()
124 gpiod_set_value_cansleep(conf->config, 0); in altera_ps_write_init()
126 min = conf->data->status_wait_min_us; in altera_ps_write_init()
127 max = conf->data->status_wait_max_us; in altera_ps_write_init()
135 if (!gpiod_get_value_cansleep(conf->status)) { in altera_ps_write_init()
137 altera_ps_delay(conf->data->t_st2ck_us); in altera_ps_write_init()
171 struct altera_ps_conf *conf = mgr->priv; in altera_ps_write() local
179 if (!(conf->info_flags & FPGA_MGR_BITSTREAM_LSB_FIRST)) in altera_ps_write()
182 ret = spi_write(conf->spi, fw_data, stride); in altera_ps_write()
197 struct altera_ps_conf *conf = mgr->priv; in altera_ps_write_complete() local
201 if (gpiod_get_value_cansleep(conf->status)) { in altera_ps_write_complete()
206 if (conf->confd) { in altera_ps_write_complete()
207 if (!gpiod_get_raw_value_cansleep(conf->confd)) { in altera_ps_write_complete()
217 ret = spi_write(conf->spi, dummy, 1); in altera_ps_write_complete()
235 struct altera_ps_conf *conf; in altera_ps_probe() local
238 conf = devm_kzalloc(&spi->dev, sizeof(*conf), GFP_KERNEL); in altera_ps_probe()
239 if (!conf) in altera_ps_probe()
242 conf->data = spi_get_device_match_data(spi); in altera_ps_probe()
243 conf->spi = spi; in altera_ps_probe()
244 conf->config = devm_gpiod_get(&spi->dev, "nconfig", GPIOD_OUT_LOW); in altera_ps_probe()
245 if (IS_ERR(conf->config)) { in altera_ps_probe()
247 PTR_ERR(conf->config)); in altera_ps_probe()
248 return PTR_ERR(conf->config); in altera_ps_probe()
251 conf->status = devm_gpiod_get(&spi->dev, "nstat", GPIOD_IN); in altera_ps_probe()
252 if (IS_ERR(conf->status)) { in altera_ps_probe()
254 PTR_ERR(conf->status)); in altera_ps_probe()
255 return PTR_ERR(conf->status); in altera_ps_probe()
258 conf->confd = devm_gpiod_get_optional(&spi->dev, "confd", GPIOD_IN); in altera_ps_probe()
259 if (IS_ERR(conf->confd)) { in altera_ps_probe()
261 PTR_ERR(conf->confd)); in altera_ps_probe()
262 return PTR_ERR(conf->confd); in altera_ps_probe()
263 } else if (!conf->confd) { in altera_ps_probe()
268 snprintf(conf->mgr_name, sizeof(conf->mgr_name), "%s %s", in altera_ps_probe()
271 mgr = devm_fpga_mgr_register(&spi->dev, conf->mgr_name, in altera_ps_probe()
272 &altera_ps_ops, conf); in altera_ps_probe()