rt715-sdw.c (762f99f4f3cb41a775b5157dd761217beba65873) | rt715-sdw.c (f9e9bdd5bb180325256e3bdfeb9c4c6526133478) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * rt715-sdw.c -- rt715 ALSA SoC audio driver 4 * 5 * Copyright(c) 2019 Realtek Semiconductor Corp. 6 * 7 * ALC715 ASoC Codec Driver based Intel Dummy SdW codec driver 8 * 9 */ 10#include <linux/delay.h> 11#include <linux/device.h> 12#include <linux/mod_devicetable.h> 13#include <linux/soundwire/sdw.h> 14#include <linux/soundwire/sdw_type.h> 15#include <linux/soundwire/sdw_registers.h> 16#include <linux/module.h> | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * rt715-sdw.c -- rt715 ALSA SoC audio driver 4 * 5 * Copyright(c) 2019 Realtek Semiconductor Corp. 6 * 7 * ALC715 ASoC Codec Driver based Intel Dummy SdW codec driver 8 * 9 */ 10#include <linux/delay.h> 11#include <linux/device.h> 12#include <linux/mod_devicetable.h> 13#include <linux/soundwire/sdw.h> 14#include <linux/soundwire/sdw_type.h> 15#include <linux/soundwire/sdw_registers.h> 16#include <linux/module.h> |
17#include <linux/pm_runtime.h> |
|
17#include <linux/of.h> 18#include <linux/regmap.h> 19#include <sound/soc.h> 20#include "rt715.h" 21#include "rt715-sdw.h" 22 23static bool rt715_readable_register(struct device *dev, unsigned int reg) 24{ --- 484 unchanged lines hidden (view full) --- 509 if (IS_ERR(regmap)) 510 return PTR_ERR(regmap); 511 512 rt715_init(&slave->dev, sdw_regmap, regmap, slave); 513 514 return 0; 515} 516 | 18#include <linux/of.h> 19#include <linux/regmap.h> 20#include <sound/soc.h> 21#include "rt715.h" 22#include "rt715-sdw.h" 23 24static bool rt715_readable_register(struct device *dev, unsigned int reg) 25{ --- 484 unchanged lines hidden (view full) --- 510 if (IS_ERR(regmap)) 511 return PTR_ERR(regmap); 512 513 rt715_init(&slave->dev, sdw_regmap, regmap, slave); 514 515 return 0; 516} 517 |
518static int rt715_sdw_remove(struct sdw_slave *slave) 519{ 520 struct rt715_priv *rt715 = dev_get_drvdata(&slave->dev); 521 522 if (rt715->first_hw_init) 523 pm_runtime_disable(&slave->dev); 524 525 return 0; 526} 527 |
|
517static const struct sdw_device_id rt715_id[] = { 518 SDW_SLAVE_ENTRY_EXT(0x025d, 0x714, 0x2, 0, 0), 519 SDW_SLAVE_ENTRY_EXT(0x025d, 0x715, 0x2, 0, 0), 520 {}, 521}; 522MODULE_DEVICE_TABLE(sdw, rt715_id); 523 524static int __maybe_unused rt715_dev_suspend(struct device *dev) --- 45 unchanged lines hidden (view full) --- 570 571static struct sdw_driver rt715_sdw_driver = { 572 .driver = { 573 .name = "rt715", 574 .owner = THIS_MODULE, 575 .pm = &rt715_pm, 576 }, 577 .probe = rt715_sdw_probe, | 528static const struct sdw_device_id rt715_id[] = { 529 SDW_SLAVE_ENTRY_EXT(0x025d, 0x714, 0x2, 0, 0), 530 SDW_SLAVE_ENTRY_EXT(0x025d, 0x715, 0x2, 0, 0), 531 {}, 532}; 533MODULE_DEVICE_TABLE(sdw, rt715_id); 534 535static int __maybe_unused rt715_dev_suspend(struct device *dev) --- 45 unchanged lines hidden (view full) --- 581 582static struct sdw_driver rt715_sdw_driver = { 583 .driver = { 584 .name = "rt715", 585 .owner = THIS_MODULE, 586 .pm = &rt715_pm, 587 }, 588 .probe = rt715_sdw_probe, |
589 .remove = rt715_sdw_remove, |
|
578 .ops = &rt715_slave_ops, 579 .id_table = rt715_id, 580}; 581module_sdw_driver(rt715_sdw_driver); 582 583MODULE_DESCRIPTION("ASoC RT715 driver SDW"); 584MODULE_AUTHOR("Jack Yu <jack.yu@realtek.com>"); 585MODULE_LICENSE("GPL v2"); | 590 .ops = &rt715_slave_ops, 591 .id_table = rt715_id, 592}; 593module_sdw_driver(rt715_sdw_driver); 594 595MODULE_DESCRIPTION("ASoC RT715 driver SDW"); 596MODULE_AUTHOR("Jack Yu <jack.yu@realtek.com>"); 597MODULE_LICENSE("GPL v2"); |