Lines Matching refs:skt

53 static int sa11x0_cf_hw_init(struct soc_pcmcia_socket *skt)  in sa11x0_cf_hw_init()  argument
55 struct device *dev = skt->socket.dev.parent; in sa11x0_cf_hw_init()
58 skt->gpio_reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); in sa11x0_cf_hw_init()
59 if (IS_ERR(skt->gpio_reset)) in sa11x0_cf_hw_init()
60 return PTR_ERR(skt->gpio_reset); in sa11x0_cf_hw_init()
62 skt->gpio_bus_enable = devm_gpiod_get_optional(dev, "bus-enable", in sa11x0_cf_hw_init()
64 if (IS_ERR(skt->gpio_bus_enable)) in sa11x0_cf_hw_init()
65 return PTR_ERR(skt->gpio_bus_enable); in sa11x0_cf_hw_init()
67 skt->vcc.reg = devm_regulator_get_optional(dev, "vcc"); in sa11x0_cf_hw_init()
68 if (IS_ERR(skt->vcc.reg)) in sa11x0_cf_hw_init()
69 return PTR_ERR(skt->vcc.reg); in sa11x0_cf_hw_init()
71 if (!skt->vcc.reg) in sa11x0_cf_hw_init()
76 skt->stat[i].name = sa11x0_cf_gpio_names[i]; in sa11x0_cf_hw_init()
77 skt->stat[i].desc = devm_gpiod_get_optional(dev, in sa11x0_cf_hw_init()
79 if (IS_ERR(skt->stat[i].desc)) in sa11x0_cf_hw_init()
80 return PTR_ERR(skt->stat[i].desc); in sa11x0_cf_hw_init()
85 static int sa11x0_cf_configure_socket(struct soc_pcmcia_socket *skt, in sa11x0_cf_configure_socket() argument
88 return soc_pcmcia_regulator_set(skt, &skt->vcc, state->Vcc); in sa11x0_cf_configure_socket()
136 soc_pcmcia_remove_one(&sinfo->skt[i]); in sa11x0_drv_pcmcia_legacy_remove()
143 struct soc_pcmcia_socket *skt; in sa11x0_drv_pcmcia_probe() local
149 skt = devm_kzalloc(dev, sizeof(*skt), GFP_KERNEL); in sa11x0_drv_pcmcia_probe()
150 if (!skt) in sa11x0_drv_pcmcia_probe()
153 platform_set_drvdata(pdev, skt); in sa11x0_drv_pcmcia_probe()
155 skt->nr = pdev->id; in sa11x0_drv_pcmcia_probe()
156 skt->clk = devm_clk_get(dev, NULL); in sa11x0_drv_pcmcia_probe()
157 if (IS_ERR(skt->clk)) in sa11x0_drv_pcmcia_probe()
158 return PTR_ERR(skt->clk); in sa11x0_drv_pcmcia_probe()
161 soc_pcmcia_init_one(skt, &sa11x0_cf_ops, dev); in sa11x0_drv_pcmcia_probe()
163 return sa11xx_drv_pcmcia_add_one(skt); in sa11x0_drv_pcmcia_probe()
168 struct soc_pcmcia_socket *skt; in sa11x0_drv_pcmcia_remove() local
173 skt = platform_get_drvdata(dev); in sa11x0_drv_pcmcia_remove()
175 soc_pcmcia_remove_one(skt); in sa11x0_drv_pcmcia_remove()