Lines Matching refs:phy
115 struct st33zp24_spi_phy *phy = phy_id; in st33zp24_spi_send() local
116 struct spi_device *dev = phy->spi_device; in st33zp24_spi_send()
117 u8 *tx_buf = (u8 *)phy->spi_xfer.tx_buf; in st33zp24_spi_send()
118 u8 *rx_buf = phy->spi_xfer.rx_buf; in st33zp24_spi_send()
136 nbr_dummy_bytes = phy->latency; in st33zp24_spi_send()
139 phy->spi_xfer.len = total_length + nbr_dummy_bytes; in st33zp24_spi_send()
141 ret = spi_sync_transfer(dev, &phy->spi_xfer, 1); in st33zp24_spi_send()
161 struct st33zp24_spi_phy *phy = phy_id; in read8_reg() local
162 struct spi_device *dev = phy->spi_device; in read8_reg()
163 u8 *tx_buf = (u8 *)phy->spi_xfer.tx_buf; in read8_reg()
164 u8 *rx_buf = phy->spi_xfer.rx_buf; in read8_reg()
174 nbr_dummy_bytes = phy->latency; in read8_reg()
178 phy->spi_xfer.len = total_length + nbr_dummy_bytes + tpm_size; in read8_reg()
181 ret = spi_sync_transfer(dev, &phy->spi_xfer, 1); in read8_reg()
214 struct st33zp24_spi_phy *phy = phy_id; in evaluate_latency() local
219 phy->latency = latency; in evaluate_latency()
232 static int tpm_stm_spi_of_request_resources(struct st33zp24_spi_phy *phy) in tpm_stm_spi_of_request_resources() argument
235 struct spi_device *dev = phy->spi_device; in tpm_stm_spi_of_request_resources()
250 phy->io_lpcpd = -1; in tpm_stm_spi_of_request_resources()
265 phy->io_lpcpd = gpio; in tpm_stm_spi_of_request_resources()
270 static int tpm_stm_spi_of_request_resources(struct st33zp24_spi_phy *phy) in tpm_stm_spi_of_request_resources() argument
277 struct st33zp24_spi_phy *phy) in tpm_stm_spi_request_resources() argument
289 phy->io_lpcpd = pdata->io_lpcpd; in tpm_stm_spi_request_resources()
316 struct st33zp24_spi_phy *phy; in tpm_st33_spi_probe() local
325 phy = devm_kzalloc(&dev->dev, sizeof(struct st33zp24_spi_phy), in tpm_st33_spi_probe()
327 if (!phy) in tpm_st33_spi_probe()
330 phy->spi_device = dev; in tpm_st33_spi_probe()
333 ret = tpm_stm_spi_of_request_resources(phy); in tpm_st33_spi_probe()
337 ret = tpm_stm_spi_request_resources(dev, phy); in tpm_st33_spi_probe()
342 phy->spi_xfer.tx_buf = phy->tx_buf; in tpm_st33_spi_probe()
343 phy->spi_xfer.rx_buf = phy->rx_buf; in tpm_st33_spi_probe()
345 phy->latency = evaluate_latency(phy); in tpm_st33_spi_probe()
346 if (phy->latency <= 0) in tpm_st33_spi_probe()
349 return st33zp24_probe(phy, &spi_phy_ops, &dev->dev, dev->irq, in tpm_st33_spi_probe()
350 phy->io_lpcpd); in tpm_st33_spi_probe()