Lines Matching defs:peripheral

203 static int cs42l42_sdw_poll_status(struct sdw_slave *peripheral, u8 mask, u8 match)
210 false, peripheral, CS42L42_SDW_MEM_ACCESS_STATUS);
215 dev_err(&peripheral->dev, "MEM_ACCESS_STATUS & %#x for %#x fail: %d\n",
223 struct sdw_slave *peripheral = context;
229 ret = cs42l42_sdw_poll_status(peripheral, CS42L42_SDW_CMD_IN_PROGRESS, 0);
233 ret = sdw_read_no_pm(peripheral, reg);
235 dev_err(&peripheral->dev, "Failed to issue read @0x%x: %d\n", reg, ret);
240 ret = sdw_read_no_pm(peripheral, CS42L42_SDW_MEM_ACCESS_STATUS);
242 dev_err(&peripheral->dev, "Failed to read MEM_ACCESS_STATUS: %d\n", ret);
254 ret = cs42l42_sdw_poll_status(peripheral,
260 ret = sdw_read_no_pm(peripheral, CS42L42_SDW_MEM_READ_DATA);
262 dev_err(&peripheral->dev, "Failed to read READ_DATA: %d\n", ret);
273 struct sdw_slave *peripheral = context;
276 ret = cs42l42_sdw_poll_status(peripheral, CS42L42_SDW_CMD_IN_PROGRESS, 0);
280 return sdw_write_no_pm(peripheral, reg + CS42L42_SDW_ADDR_OFFSET, (u8)val);
284 static void cs42l42_sdw_init(struct sdw_slave *peripheral)
286 struct cs42l42_private *cs42l42 = dev_get_drvdata(&peripheral->dev);
310 static int cs42l42_sdw_read_prop(struct sdw_slave *peripheral)
312 struct cs42l42_private *cs42l42 = dev_get_drvdata(&peripheral->dev);
313 struct sdw_slave_prop *prop = &peripheral->prop;
340 static int cs42l42_sdw_update_status(struct sdw_slave *peripheral,
343 struct cs42l42_private *cs42l42 = dev_get_drvdata(&peripheral->dev);
364 cs42l42_sdw_init(peripheral);
386 static int cs42l42_sdw_bus_config(struct sdw_slave *peripheral,
389 struct cs42l42_private *cs42l42 = dev_get_drvdata(&peripheral->dev);
435 struct sdw_slave *peripheral = cs42l42->sdw_peripheral;
437 if (!peripheral->unattach_request)
441 dev_dbg(&peripheral->dev, "Wait for initialization_complete\n");
442 if (!wait_for_completion_timeout(&peripheral->initialization_complete,
444 dev_err(&peripheral->dev, "initialization_complete timed out\n");
448 peripheral->unattach_request = 0;
516 static int cs42l42_sdw_probe(struct sdw_slave *peripheral, const struct sdw_device_id *id)
519 struct device *dev = &peripheral->dev;
547 regmap = devm_regmap_init(dev, NULL, peripheral, regmap_conf);
566 cs42l42->sdw_peripheral = peripheral;
588 static int cs42l42_sdw_remove(struct sdw_slave *peripheral)
590 struct cs42l42_private *cs42l42 = dev_get_drvdata(&peripheral->dev);