Lines Matching refs:client

99 	struct i2c_client *client = phy->i2c_dev;  in st21nfcb_nci_i2c_write()  local
106 r = i2c_master_send(client, skb->data, skb->len); in st21nfcb_nci_i2c_write()
109 r = i2c_master_send(client, skb->data, skb->len); in st21nfcb_nci_i2c_write()
141 struct i2c_client *client = phy->i2c_dev; in st21nfcb_nci_i2c_read() local
143 r = i2c_master_recv(client, buf, ST21NFCB_NCI_I2C_MIN_SIZE); in st21nfcb_nci_i2c_read()
146 r = i2c_master_recv(client, buf, ST21NFCB_NCI_I2C_MIN_SIZE); in st21nfcb_nci_i2c_read()
154 nfc_err(&client->dev, "invalid frame len\n"); in st21nfcb_nci_i2c_read()
169 r = i2c_master_recv(client, buf, len); in st21nfcb_nci_i2c_read()
191 struct i2c_client *client; in st21nfcb_nci_irq_thread_fn() local
200 client = phy->i2c_dev; in st21nfcb_nci_irq_thread_fn()
201 dev_dbg(&client->dev, "IRQ\n"); in st21nfcb_nci_irq_thread_fn()
227 static int st21nfcb_nci_i2c_of_request_resources(struct i2c_client *client) in st21nfcb_nci_i2c_of_request_resources() argument
229 struct st21nfcb_i2c_phy *phy = i2c_get_clientdata(client); in st21nfcb_nci_i2c_of_request_resources()
234 pp = client->dev.of_node; in st21nfcb_nci_i2c_of_request_resources()
241 nfc_err(&client->dev, in st21nfcb_nci_i2c_of_request_resources()
247 r = devm_gpio_request_one(&client->dev, gpio, in st21nfcb_nci_i2c_of_request_resources()
250 nfc_err(&client->dev, "Failed to request reset pin\n"); in st21nfcb_nci_i2c_of_request_resources()
255 phy->irq_polarity = irq_get_trigger_type(client->irq); in st21nfcb_nci_i2c_of_request_resources()
260 static int st21nfcb_nci_i2c_of_request_resources(struct i2c_client *client) in st21nfcb_nci_i2c_of_request_resources() argument
266 static int st21nfcb_nci_i2c_request_resources(struct i2c_client *client) in st21nfcb_nci_i2c_request_resources() argument
269 struct st21nfcb_i2c_phy *phy = i2c_get_clientdata(client); in st21nfcb_nci_i2c_request_resources()
272 pdata = client->dev.platform_data; in st21nfcb_nci_i2c_request_resources()
274 nfc_err(&client->dev, "No platform data\n"); in st21nfcb_nci_i2c_request_resources()
282 r = devm_gpio_request_one(&client->dev, in st21nfcb_nci_i2c_request_resources()
292 static int st21nfcb_nci_i2c_probe(struct i2c_client *client, in st21nfcb_nci_i2c_probe() argument
299 dev_dbg(&client->dev, "%s\n", __func__); in st21nfcb_nci_i2c_probe()
300 dev_dbg(&client->dev, "IRQ: %d\n", client->irq); in st21nfcb_nci_i2c_probe()
302 if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { in st21nfcb_nci_i2c_probe()
303 nfc_err(&client->dev, "Need I2C_FUNC_I2C\n"); in st21nfcb_nci_i2c_probe()
307 phy = devm_kzalloc(&client->dev, sizeof(struct st21nfcb_i2c_phy), in st21nfcb_nci_i2c_probe()
312 phy->i2c_dev = client; in st21nfcb_nci_i2c_probe()
314 i2c_set_clientdata(client, phy); in st21nfcb_nci_i2c_probe()
316 pdata = client->dev.platform_data; in st21nfcb_nci_i2c_probe()
317 if (!pdata && client->dev.of_node) { in st21nfcb_nci_i2c_probe()
318 r = st21nfcb_nci_i2c_of_request_resources(client); in st21nfcb_nci_i2c_probe()
320 nfc_err(&client->dev, "No platform data\n"); in st21nfcb_nci_i2c_probe()
324 r = st21nfcb_nci_i2c_request_resources(client); in st21nfcb_nci_i2c_probe()
326 nfc_err(&client->dev, in st21nfcb_nci_i2c_probe()
331 nfc_err(&client->dev, in st21nfcb_nci_i2c_probe()
336 r = ndlc_probe(phy, &i2c_phy_ops, &client->dev, in st21nfcb_nci_i2c_probe()
340 nfc_err(&client->dev, "Unable to register ndlc layer\n"); in st21nfcb_nci_i2c_probe()
344 r = devm_request_threaded_irq(&client->dev, client->irq, NULL, in st21nfcb_nci_i2c_probe()
349 nfc_err(&client->dev, "Unable to register IRQ handler\n"); in st21nfcb_nci_i2c_probe()
354 static int st21nfcb_nci_i2c_remove(struct i2c_client *client) in st21nfcb_nci_i2c_remove() argument
356 struct st21nfcb_i2c_phy *phy = i2c_get_clientdata(client); in st21nfcb_nci_i2c_remove()
358 dev_dbg(&client->dev, "%s\n", __func__); in st21nfcb_nci_i2c_remove()