rt711-sdw.c (9f771739a04919226081a107167596de75108fbb) | rt711-sdw.c (3f3d66ba998fb079c1239430e96e3b138bc63166) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2// 3// rt711-sdw.c -- rt711 ALSA SoC audio driver 4// 5// Copyright(c) 2019 Realtek Semiconductor Corp. 6// 7// 8 --- 439 unchanged lines hidden (view full) --- 448 if (IS_ERR(sdw_regmap)) 449 return PTR_ERR(sdw_regmap); 450 451 regmap = devm_regmap_init(&slave->dev, NULL, 452 &slave->dev, &rt711_regmap); 453 if (IS_ERR(regmap)) 454 return PTR_ERR(regmap); 455 | 1// SPDX-License-Identifier: GPL-2.0 2// 3// rt711-sdw.c -- rt711 ALSA SoC audio driver 4// 5// Copyright(c) 2019 Realtek Semiconductor Corp. 6// 7// 8 --- 439 unchanged lines hidden (view full) --- 448 if (IS_ERR(sdw_regmap)) 449 return PTR_ERR(sdw_regmap); 450 451 regmap = devm_regmap_init(&slave->dev, NULL, 452 &slave->dev, &rt711_regmap); 453 if (IS_ERR(regmap)) 454 return PTR_ERR(regmap); 455 |
456 rt711_init(&slave->dev, sdw_regmap, regmap, slave); 457 458 return 0; | 456 return rt711_init(&slave->dev, sdw_regmap, regmap, slave); |
459} 460 461static int rt711_sdw_remove(struct sdw_slave *slave) 462{ 463 struct rt711_priv *rt711 = dev_get_drvdata(&slave->dev); 464 465 if (rt711->hw_init) { 466 cancel_delayed_work_sync(&rt711->jack_detect_work); --- 66 unchanged lines hidden (view full) --- 533{ 534 struct sdw_slave *slave = dev_to_sdw_dev(dev); 535 struct rt711_priv *rt711 = dev_get_drvdata(dev); 536 unsigned long time; 537 538 if (!rt711->first_hw_init) 539 return 0; 540 | 457} 458 459static int rt711_sdw_remove(struct sdw_slave *slave) 460{ 461 struct rt711_priv *rt711 = dev_get_drvdata(&slave->dev); 462 463 if (rt711->hw_init) { 464 cancel_delayed_work_sync(&rt711->jack_detect_work); --- 66 unchanged lines hidden (view full) --- 531{ 532 struct sdw_slave *slave = dev_to_sdw_dev(dev); 533 struct rt711_priv *rt711 = dev_get_drvdata(dev); 534 unsigned long time; 535 536 if (!rt711->first_hw_init) 537 return 0; 538 |
541 if (!slave->unattach_request) | 539 if (!slave->unattach_request) { 540 if (rt711->disable_irq == true) { 541 mutex_lock(&rt711->disable_irq_lock); 542 sdw_write_no_pm(slave, SDW_SCP_INTMASK1, SDW_SCP_INT1_IMPL_DEF); 543 rt711->disable_irq = false; 544 mutex_unlock(&rt711->disable_irq_lock); 545 } |
542 goto regmap_sync; | 546 goto regmap_sync; |
547 } |
|
543 544 time = wait_for_completion_timeout(&slave->initialization_complete, 545 msecs_to_jiffies(RT711_PROBE_TIMEOUT)); 546 if (!time) { 547 dev_err(&slave->dev, "Initialization not complete, timed out\n"); 548 return -ETIMEDOUT; 549 } 550 --- 30 unchanged lines hidden --- | 548 549 time = wait_for_completion_timeout(&slave->initialization_complete, 550 msecs_to_jiffies(RT711_PROBE_TIMEOUT)); 551 if (!time) { 552 dev_err(&slave->dev, "Initialization not complete, timed out\n"); 553 return -ETIMEDOUT; 554 } 555 --- 30 unchanged lines hidden --- |