Lines Matching refs:conf

15  * atmel_smc_cs_conf_init - initialize a SMC CS conf
16 * @conf: the SMC CS conf to initialize
20 void atmel_smc_cs_conf_init(struct atmel_smc_cs_conf *conf)
22 memset(conf, 0, sizeof(*conf));
79 * atmel_smc_cs_conf_set_timing - set the SMC CS conf Txx parameter to a
81 * @conf: SMC CS conf descriptor
88 * @conf->timings field at @shift position.
93 int atmel_smc_cs_conf_set_timing(struct atmel_smc_cs_conf *conf,
113 conf->timings &= ~GENMASK(shift + 3, shift);
114 conf->timings |= val << shift;
121 * atmel_smc_cs_conf_set_setup - set the SMC CS conf xx_SETUP parameter to a
123 * @conf: SMC CS conf descriptor
130 * @conf->setup field at @shift position.
135 int atmel_smc_cs_conf_set_setup(struct atmel_smc_cs_conf *conf,
152 conf->setup &= ~GENMASK(shift + 7, shift);
153 conf->setup |= val << shift;
160 * atmel_smc_cs_conf_set_pulse - set the SMC CS conf xx_PULSE parameter to a
162 * @conf: SMC CS conf descriptor
169 * @conf->setup field at @shift position.
174 int atmel_smc_cs_conf_set_pulse(struct atmel_smc_cs_conf *conf,
191 conf->pulse &= ~GENMASK(shift + 7, shift);
192 conf->pulse |= val << shift;
199 * atmel_smc_cs_conf_set_cycle - set the SMC CS conf xx_CYCLE parameter to a
201 * @conf: SMC CS conf descriptor
208 * @conf->setup field at @shift position.
213 int atmel_smc_cs_conf_set_cycle(struct atmel_smc_cs_conf *conf,
229 conf->cycle &= ~GENMASK(shift + 15, shift);
230 conf->cycle |= val << shift;
237 * atmel_smc_cs_conf_apply - apply an SMC CS conf
240 * @conf: the SMC CS conf to apply
246 const struct atmel_smc_cs_conf *conf)
248 regmap_write(regmap, ATMEL_SMC_SETUP(cs), conf->setup);
249 regmap_write(regmap, ATMEL_SMC_PULSE(cs), conf->pulse);
250 regmap_write(regmap, ATMEL_SMC_CYCLE(cs), conf->cycle);
251 regmap_write(regmap, ATMEL_SMC_MODE(cs), conf->mode);
256 * atmel_hsmc_cs_conf_apply - apply an SMC CS conf
260 * @conf: the SMC CS conf to apply
267 int cs, const struct atmel_smc_cs_conf *conf)
269 regmap_write(regmap, ATMEL_HSMC_SETUP(layout, cs), conf->setup);
270 regmap_write(regmap, ATMEL_HSMC_PULSE(layout, cs), conf->pulse);
271 regmap_write(regmap, ATMEL_HSMC_CYCLE(layout, cs), conf->cycle);
272 regmap_write(regmap, ATMEL_HSMC_TIMINGS(layout, cs), conf->timings);
273 regmap_write(regmap, ATMEL_HSMC_MODE(layout, cs), conf->mode);
278 * atmel_smc_cs_conf_get - retrieve the current SMC CS conf
281 * @conf: the SMC CS conf object to store the current conf
287 struct atmel_smc_cs_conf *conf)
289 regmap_read(regmap, ATMEL_SMC_SETUP(cs), &conf->setup);
290 regmap_read(regmap, ATMEL_SMC_PULSE(cs), &conf->pulse);
291 regmap_read(regmap, ATMEL_SMC_CYCLE(cs), &conf->cycle);
292 regmap_read(regmap, ATMEL_SMC_MODE(cs), &conf->mode);
297 * atmel_hsmc_cs_conf_get - retrieve the current SMC CS conf
301 * @conf: the SMC CS conf object to store the current conf
308 int cs, struct atmel_smc_cs_conf *conf)
310 regmap_read(regmap, ATMEL_HSMC_SETUP(layout, cs), &conf->setup);
311 regmap_read(regmap, ATMEL_HSMC_PULSE(layout, cs), &conf->pulse);
312 regmap_read(regmap, ATMEL_HSMC_CYCLE(layout, cs), &conf->cycle);
313 regmap_read(regmap, ATMEL_HSMC_TIMINGS(layout, cs), &conf->timings);
314 regmap_read(regmap, ATMEL_HSMC_MODE(layout, cs), &conf->mode);