Lines Matching defs:phy

46 	struct st_nci_spi_phy *phy = phy_id;
48 gpiod_set_value(phy->gpiod_reset, 0);
50 gpiod_set_value(phy->gpiod_reset, 1);
53 if (phy->ndlc->powered == 0 && phy->irq_active == 0) {
54 enable_irq(phy->spi_dev->irq);
55 phy->irq_active = true;
63 struct st_nci_spi_phy *phy = phy_id;
65 disable_irq_nosync(phy->spi_dev->irq);
66 phy->irq_active = false;
77 struct st_nci_spi_phy *phy = phy_id;
78 struct spi_device *dev = phy->spi_dev;
88 if (phy->ndlc->hard_fault != 0)
89 return phy->ndlc->hard_fault;
103 ndlc_recv(phy->ndlc, skb_rx);
117 static int st_nci_spi_read(struct st_nci_spi_phy *phy,
123 struct spi_device *dev = phy->spi_dev;
136 phy->ndlc->hard_fault = 1;
171 struct st_nci_spi_phy *phy = phy_id;
175 if (!phy || !phy->ndlc || irq != phy->spi_dev->irq) {
180 if (phy->ndlc->hard_fault)
183 if (!phy->ndlc->powered) {
184 st_nci_spi_disable(phy);
188 r = st_nci_spi_read(phy, &skb);
192 ndlc_recv(phy->ndlc, skb);
212 struct st_nci_spi_phy *phy;
222 phy = devm_kzalloc(&dev->dev, sizeof(struct st_nci_spi_phy),
224 if (!phy)
227 phy->spi_dev = dev;
229 spi_set_drvdata(dev, phy);
236 phy->gpiod_reset = devm_gpiod_get(&dev->dev, "reset", GPIOD_OUT_HIGH);
237 if (IS_ERR(phy->gpiod_reset)) {
239 return PTR_ERR(phy->gpiod_reset);
242 phy->se_status.is_ese_present =
244 phy->se_status.is_uicc_present =
247 r = ndlc_probe(phy, &spi_phy_ops, &dev->dev,
249 &phy->ndlc, &phy->se_status);
255 phy->irq_active = true;
259 ST_NCI_SPI_DRIVER_NAME, phy);
268 struct st_nci_spi_phy *phy = spi_get_drvdata(dev);
270 ndlc_remove(phy->ndlc);