Lines Matching defs:phy

48 	struct nxp_nci_i2c_phy *phy = (struct nxp_nci_i2c_phy *) phy_id;
50 gpiod_set_value(phy->gpiod_fw, (mode == NXP_NCI_MODE_FW) ? 1 : 0);
51 gpiod_set_value(phy->gpiod_en, (mode != NXP_NCI_MODE_COLD) ? 1 : 0);
55 phy->hard_fault = 0;
63 struct nxp_nci_i2c_phy *phy = phy_id;
64 struct i2c_client *client = phy->i2c_dev;
66 if (phy->hard_fault != 0)
67 return phy->hard_fault;
96 static int nxp_nci_i2c_fw_read(struct nxp_nci_i2c_phy *phy,
99 struct i2c_client *client = phy->i2c_dev;
143 static int nxp_nci_i2c_nci_read(struct nxp_nci_i2c_phy *phy,
147 struct i2c_client *client = phy->i2c_dev;
191 struct nxp_nci_i2c_phy *phy = phy_id;
198 if (!phy || !phy->ndev)
201 client = phy->i2c_dev;
206 info = nci_get_drvdata(phy->ndev);
213 if (phy->hard_fault != 0)
218 r = nxp_nci_i2c_nci_read(phy, &skb);
221 r = nxp_nci_i2c_fw_read(phy, &skb);
229 phy->hard_fault = r;
231 nxp_nci_fw_recv_frame(phy->ndev, NULL);
240 nci_recv_frame(phy->ndev, skb);
243 nxp_nci_fw_recv_frame(phy->ndev, skb);
269 struct nxp_nci_i2c_phy *phy;
277 phy = devm_kzalloc(&client->dev, sizeof(struct nxp_nci_i2c_phy),
279 if (!phy)
282 phy->i2c_dev = client;
283 i2c_set_clientdata(client, phy);
289 phy->gpiod_en = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW);
290 if (IS_ERR(phy->gpiod_en)) {
292 return PTR_ERR(phy->gpiod_en);
295 phy->gpiod_fw = devm_gpiod_get_optional(dev, "firmware", GPIOD_OUT_LOW);
296 if (IS_ERR(phy->gpiod_fw)) {
298 return PTR_ERR(phy->gpiod_fw);
301 r = nxp_nci_probe(phy, &client->dev, &i2c_phy_ops,
302 NXP_NCI_I2C_MAX_PAYLOAD, &phy->ndev);
309 NXP_NCI_I2C_DRIVER_NAME, phy);
318 struct nxp_nci_i2c_phy *phy = i2c_get_clientdata(client);
320 nxp_nci_remove(phy->ndev);
321 free_irq(client->irq, phy);