Lines Matching defs:phy
45 struct st_nci_i2c_phy *phy = phy_id;
47 gpiod_set_value(phy->gpiod_reset, 0);
49 gpiod_set_value(phy->gpiod_reset, 1);
52 if (phy->ndlc->powered == 0 && phy->irq_active == 0) {
53 enable_irq(phy->i2c_dev->irq);
54 phy->irq_active = true;
62 struct st_nci_i2c_phy *phy = phy_id;
64 disable_irq_nosync(phy->i2c_dev->irq);
65 phy->irq_active = false;
76 struct st_nci_i2c_phy *phy = phy_id;
77 struct i2c_client *client = phy->i2c_dev;
79 if (phy->ndlc->hard_fault != 0)
80 return phy->ndlc->hard_fault;
106 static int st_nci_i2c_read(struct st_nci_i2c_phy *phy,
112 struct i2c_client *client = phy->i2c_dev;
159 struct st_nci_i2c_phy *phy = phy_id;
163 if (!phy || !phy->ndlc || irq != phy->i2c_dev->irq) {
168 if (phy->ndlc->hard_fault)
171 if (!phy->ndlc->powered) {
172 st_nci_i2c_disable(phy);
176 r = st_nci_i2c_read(phy, &skb);
180 ndlc_recv(phy->ndlc, skb);
201 struct st_nci_i2c_phy *phy;
209 phy = devm_kzalloc(dev, sizeof(struct st_nci_i2c_phy), GFP_KERNEL);
210 if (!phy)
213 phy->i2c_dev = client;
215 i2c_set_clientdata(client, phy);
222 phy->gpiod_reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
223 if (IS_ERR(phy->gpiod_reset)) {
228 phy->se_status.is_ese_present =
230 phy->se_status.is_uicc_present =
233 r = ndlc_probe(phy, &i2c_phy_ops, &client->dev,
235 &phy->ndlc, &phy->se_status);
241 phy->irq_active = true;
245 ST_NCI_DRIVER_NAME, phy);
254 struct st_nci_i2c_phy *phy = i2c_get_clientdata(client);
256 ndlc_remove(phy->ndlc);