Lines Matching refs:client
77 struct i2c_client *client = phy->i2c_dev; in nxp_nci_i2c_write() local
82 r = i2c_master_send(client, skb->data, skb->len); in nxp_nci_i2c_write()
86 r = i2c_master_send(client, skb->data, skb->len); in nxp_nci_i2c_write()
90 nfc_err(&client->dev, "Error %d on I2C send\n", r); in nxp_nci_i2c_write()
92 nfc_err(&client->dev, in nxp_nci_i2c_write()
112 struct i2c_client *client = phy->i2c_dev; in nxp_nci_i2c_fw_read() local
117 r = i2c_master_recv(client, (u8 *) &header, NXP_NCI_FW_HDR_LEN); in nxp_nci_i2c_fw_read()
121 nfc_err(&client->dev, "Incorrect header length: %u\n", r); in nxp_nci_i2c_fw_read()
137 r = i2c_master_recv(client, skb_put(*skb, frame_len), frame_len); in nxp_nci_i2c_fw_read()
139 nfc_err(&client->dev, in nxp_nci_i2c_fw_read()
158 struct i2c_client *client = phy->i2c_dev; in nxp_nci_i2c_nci_read() local
161 r = i2c_master_recv(client, (u8 *) &header, NCI_CTRL_HDR_SIZE); in nxp_nci_i2c_nci_read()
165 nfc_err(&client->dev, "Incorrect header length: %u\n", r); in nxp_nci_i2c_nci_read()
179 r = i2c_master_recv(client, skb_put(*skb, header.plen), header.plen); in nxp_nci_i2c_nci_read()
181 nfc_err(&client->dev, in nxp_nci_i2c_nci_read()
199 struct i2c_client *client; in nxp_nci_i2c_irq_thread_fn() local
208 client = phy->i2c_dev; in nxp_nci_i2c_irq_thread_fn()
210 if (!client || irq != client->irq) in nxp_nci_i2c_irq_thread_fn()
239 nfc_err(&client->dev, "Read failed with error %d\n", r); in nxp_nci_i2c_irq_thread_fn()
264 static int nxp_nci_i2c_parse_devtree(struct i2c_client *client) in nxp_nci_i2c_parse_devtree() argument
266 struct nxp_nci_i2c_phy *phy = i2c_get_clientdata(client); in nxp_nci_i2c_parse_devtree()
270 pp = client->dev.of_node; in nxp_nci_i2c_parse_devtree()
278 nfc_err(&client->dev, "Failed to get EN gpio, error: %d\n", r); in nxp_nci_i2c_parse_devtree()
287 nfc_err(&client->dev, "Failed to get FW gpio, error: %d\n", r); in nxp_nci_i2c_parse_devtree()
294 nfc_err(&client->dev, "Unable to get irq, error: %d\n", r); in nxp_nci_i2c_parse_devtree()
297 client->irq = r; in nxp_nci_i2c_parse_devtree()
304 static int nxp_nci_i2c_parse_devtree(struct i2c_client *client) in nxp_nci_i2c_parse_devtree() argument
311 static int nxp_nci_i2c_probe(struct i2c_client *client, in nxp_nci_i2c_probe() argument
318 if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { in nxp_nci_i2c_probe()
319 nfc_err(&client->dev, "Need I2C_FUNC_I2C\n"); in nxp_nci_i2c_probe()
324 phy = devm_kzalloc(&client->dev, sizeof(struct nxp_nci_i2c_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()
334 pdata = client->dev.platform_data; in nxp_nci_i2c_probe()
336 if (!pdata && client->dev.of_node) { in nxp_nci_i2c_probe()
337 r = nxp_nci_i2c_parse_devtree(client); in nxp_nci_i2c_probe()
339 nfc_err(&client->dev, "Failed to get DT data\n"); in nxp_nci_i2c_probe()
345 client->irq = pdata->irq; in nxp_nci_i2c_probe()
347 nfc_err(&client->dev, "No platform data\n"); in nxp_nci_i2c_probe()
362 r = nxp_nci_probe(phy, &client->dev, &i2c_phy_ops, in nxp_nci_i2c_probe()
367 r = request_threaded_irq(client->irq, NULL, in nxp_nci_i2c_probe()
372 nfc_err(&client->dev, "Unable to register IRQ handler\n"); in nxp_nci_i2c_probe()
378 static int nxp_nci_i2c_remove(struct i2c_client *client) in nxp_nci_i2c_remove() argument
380 struct nxp_nci_i2c_phy *phy = i2c_get_clientdata(client); in nxp_nci_i2c_remove()
383 free_irq(client->irq, phy); in nxp_nci_i2c_remove()