• Home
  • Raw
  • Download

Lines Matching refs:plat

38 	struct gpio_nand_platdata plat;  member
77 gpio_set_value(gpiomtd->plat.gpio_nce, !(ctrl & NAND_NCE)); in gpio_nand_cmd_ctrl()
78 gpio_set_value(gpiomtd->plat.gpio_cle, !!(ctrl & NAND_CLE)); in gpio_nand_cmd_ctrl()
79 gpio_set_value(gpiomtd->plat.gpio_ale, !!(ctrl & NAND_ALE)); in gpio_nand_cmd_ctrl()
93 return gpio_get_value(gpiomtd->plat.gpio_rdy); in gpio_nand_devready()
104 struct gpio_nand_platdata *plat) in gpio_nand_get_config_of() argument
113 plat->options |= NAND_BUSWIDTH_16; in gpio_nand_get_config_of()
120 plat->gpio_rdy = of_get_gpio(dev->of_node, 0); in gpio_nand_get_config_of()
121 plat->gpio_nce = of_get_gpio(dev->of_node, 1); in gpio_nand_get_config_of()
122 plat->gpio_ale = of_get_gpio(dev->of_node, 2); in gpio_nand_get_config_of()
123 plat->gpio_cle = of_get_gpio(dev->of_node, 3); in gpio_nand_get_config_of()
124 plat->gpio_nwp = of_get_gpio(dev->of_node, 4); in gpio_nand_get_config_of()
127 plat->chip_delay = val; in gpio_nand_get_config_of()
153 struct gpio_nand_platdata *plat) in gpio_nand_get_config_of() argument
166 struct gpio_nand_platdata *plat) in gpio_nand_get_config() argument
168 int ret = gpio_nand_get_config_of(dev, plat); in gpio_nand_get_config()
174 memcpy(plat, dev_get_platdata(dev), sizeof(*plat)); in gpio_nand_get_config()
198 if (gpio_is_valid(gpiomtd->plat.gpio_nwp)) in gpio_nand_remove()
199 gpio_set_value(gpiomtd->plat.gpio_nwp, 0); in gpio_nand_remove()
200 gpio_set_value(gpiomtd->plat.gpio_nce, 1); in gpio_nand_remove()
234 ret = gpio_nand_get_config(&pdev->dev, &gpiomtd->plat); in gpio_nand_probe()
238 ret = devm_gpio_request(&pdev->dev, gpiomtd->plat.gpio_nce, "NAND NCE"); in gpio_nand_probe()
241 gpio_direction_output(gpiomtd->plat.gpio_nce, 1); in gpio_nand_probe()
243 if (gpio_is_valid(gpiomtd->plat.gpio_nwp)) { in gpio_nand_probe()
244 ret = devm_gpio_request(&pdev->dev, gpiomtd->plat.gpio_nwp, in gpio_nand_probe()
250 ret = devm_gpio_request(&pdev->dev, gpiomtd->plat.gpio_ale, "NAND ALE"); in gpio_nand_probe()
253 gpio_direction_output(gpiomtd->plat.gpio_ale, 0); in gpio_nand_probe()
255 ret = devm_gpio_request(&pdev->dev, gpiomtd->plat.gpio_cle, "NAND CLE"); in gpio_nand_probe()
258 gpio_direction_output(gpiomtd->plat.gpio_cle, 0); in gpio_nand_probe()
260 if (gpio_is_valid(gpiomtd->plat.gpio_rdy)) { in gpio_nand_probe()
261 ret = devm_gpio_request(&pdev->dev, gpiomtd->plat.gpio_rdy, in gpio_nand_probe()
265 gpio_direction_input(gpiomtd->plat.gpio_rdy); in gpio_nand_probe()
271 chip->options = gpiomtd->plat.options; in gpio_nand_probe()
272 chip->chip_delay = gpiomtd->plat.chip_delay; in gpio_nand_probe()
280 if (gpio_is_valid(gpiomtd->plat.gpio_nwp)) in gpio_nand_probe()
281 gpio_direction_output(gpiomtd->plat.gpio_nwp, 1); in gpio_nand_probe()
288 if (gpiomtd->plat.adjust_parts) in gpio_nand_probe()
289 gpiomtd->plat.adjust_parts(&gpiomtd->plat, in gpio_nand_probe()
294 gpiomtd->plat.parts, in gpio_nand_probe()
295 gpiomtd->plat.num_parts); in gpio_nand_probe()
300 if (gpio_is_valid(gpiomtd->plat.gpio_nwp)) in gpio_nand_probe()
301 gpio_set_value(gpiomtd->plat.gpio_nwp, 0); in gpio_nand_probe()