Lines Matching refs:phy

61 	struct nxp_nci_i2c_phy *phy = (struct nxp_nci_i2c_phy *) phy_id;  in nxp_nci_i2c_set_mode()  local
63 gpio_set_value(phy->gpio_fw, (mode == NXP_NCI_MODE_FW) ? 1 : 0); in nxp_nci_i2c_set_mode()
64 gpio_set_value(phy->gpio_en, (mode != NXP_NCI_MODE_COLD) ? 1 : 0); in nxp_nci_i2c_set_mode()
68 phy->hard_fault = 0; in nxp_nci_i2c_set_mode()
76 struct nxp_nci_i2c_phy *phy = phy_id; in nxp_nci_i2c_write() local
77 struct i2c_client *client = phy->i2c_dev; in nxp_nci_i2c_write()
79 if (phy->hard_fault != 0) in nxp_nci_i2c_write()
80 return phy->hard_fault; in nxp_nci_i2c_write()
109 static int nxp_nci_i2c_fw_read(struct nxp_nci_i2c_phy *phy, in nxp_nci_i2c_fw_read() argument
112 struct i2c_client *client = phy->i2c_dev; in nxp_nci_i2c_fw_read()
154 static int nxp_nci_i2c_nci_read(struct nxp_nci_i2c_phy *phy, in nxp_nci_i2c_nci_read() argument
158 struct i2c_client *client = phy->i2c_dev; in nxp_nci_i2c_nci_read()
198 struct nxp_nci_i2c_phy *phy = phy_id; in nxp_nci_i2c_irq_thread_fn() local
205 if (!phy || !phy->ndev) in nxp_nci_i2c_irq_thread_fn()
208 client = phy->i2c_dev; in nxp_nci_i2c_irq_thread_fn()
213 info = nci_get_drvdata(phy->ndev); in nxp_nci_i2c_irq_thread_fn()
220 if (phy->hard_fault != 0) in nxp_nci_i2c_irq_thread_fn()
225 r = nxp_nci_i2c_nci_read(phy, &skb); in nxp_nci_i2c_irq_thread_fn()
228 r = nxp_nci_i2c_fw_read(phy, &skb); in nxp_nci_i2c_irq_thread_fn()
236 phy->hard_fault = r; in nxp_nci_i2c_irq_thread_fn()
245 nci_recv_frame(phy->ndev, skb); in nxp_nci_i2c_irq_thread_fn()
248 nxp_nci_fw_recv_frame(phy->ndev, skb); in nxp_nci_i2c_irq_thread_fn()
266 struct nxp_nci_i2c_phy *phy = i2c_get_clientdata(client); in nxp_nci_i2c_parse_devtree() local
281 phy->gpio_en = r; in nxp_nci_i2c_parse_devtree()
290 phy->gpio_fw = r; in nxp_nci_i2c_parse_devtree()
314 struct nxp_nci_i2c_phy *phy; in nxp_nci_i2c_probe() local
324 phy = devm_kzalloc(&client->dev, sizeof(struct nxp_nci_i2c_phy), in nxp_nci_i2c_probe()
326 if (!phy) { in nxp_nci_i2c_probe()
331 phy->i2c_dev = client; in nxp_nci_i2c_probe()
332 i2c_set_clientdata(client, phy); in nxp_nci_i2c_probe()
343 phy->gpio_en = pdata->gpio_en; in nxp_nci_i2c_probe()
344 phy->gpio_fw = pdata->gpio_fw; in nxp_nci_i2c_probe()
352 r = devm_gpio_request_one(&phy->i2c_dev->dev, phy->gpio_en, in nxp_nci_i2c_probe()
357 r = devm_gpio_request_one(&phy->i2c_dev->dev, phy->gpio_fw, in nxp_nci_i2c_probe()
362 r = nxp_nci_probe(phy, &client->dev, &i2c_phy_ops, in nxp_nci_i2c_probe()
363 NXP_NCI_I2C_MAX_PAYLOAD, &phy->ndev); in nxp_nci_i2c_probe()
370 NXP_NCI_I2C_DRIVER_NAME, phy); in nxp_nci_i2c_probe()
380 struct nxp_nci_i2c_phy *phy = i2c_get_clientdata(client); in nxp_nci_i2c_remove() local
382 nxp_nci_remove(phy->ndev); in nxp_nci_i2c_remove()
383 free_irq(client->irq, phy); in nxp_nci_i2c_remove()