max98373-sdw.c (03ab8e6297acd1bc0eedaa050e2a1635c576fd11) max98373-sdw.c (f9e9bdd5bb180325256e3bdfeb9c4c6526133478)
1// SPDX-License-Identifier: GPL-2.0-only
2// Copyright (c) 2020, Maxim Integrated
3
4#include <linux/acpi.h>
5#include <linux/delay.h>
6#include <linux/module.h>
7#include <linux/mod_devicetable.h>
8#include <linux/pm_runtime.h>

--- 848 unchanged lines hidden (view full) ---

857 /* Regmap Initialization */
858 regmap = devm_regmap_init_sdw(slave, &max98373_sdw_regmap);
859 if (IS_ERR(regmap))
860 return PTR_ERR(regmap);
861
862 return max98373_init(slave, regmap);
863}
864
1// SPDX-License-Identifier: GPL-2.0-only
2// Copyright (c) 2020, Maxim Integrated
3
4#include <linux/acpi.h>
5#include <linux/delay.h>
6#include <linux/module.h>
7#include <linux/mod_devicetable.h>
8#include <linux/pm_runtime.h>

--- 848 unchanged lines hidden (view full) ---

857 /* Regmap Initialization */
858 regmap = devm_regmap_init_sdw(slave, &max98373_sdw_regmap);
859 if (IS_ERR(regmap))
860 return PTR_ERR(regmap);
861
862 return max98373_init(slave, regmap);
863}
864
865static int max98373_sdw_remove(struct sdw_slave *slave)
866{
867 struct max98373_priv *max98373 = dev_get_drvdata(&slave->dev);
868
869 if (max98373->first_hw_init)
870 pm_runtime_disable(&slave->dev);
871
872 return 0;
873}
874
865#if defined(CONFIG_OF)
866static const struct of_device_id max98373_of_match[] = {
867 { .compatible = "maxim,max98373", },
868 {},
869};
870MODULE_DEVICE_TABLE(of, max98373_of_match);
871#endif
872

--- 15 unchanged lines hidden (view full) ---

888 .driver = {
889 .name = "max98373",
890 .owner = THIS_MODULE,
891 .of_match_table = of_match_ptr(max98373_of_match),
892 .acpi_match_table = ACPI_PTR(max98373_acpi_match),
893 .pm = &max98373_pm,
894 },
895 .probe = max98373_sdw_probe,
875#if defined(CONFIG_OF)
876static const struct of_device_id max98373_of_match[] = {
877 { .compatible = "maxim,max98373", },
878 {},
879};
880MODULE_DEVICE_TABLE(of, max98373_of_match);
881#endif
882

--- 15 unchanged lines hidden (view full) ---

898 .driver = {
899 .name = "max98373",
900 .owner = THIS_MODULE,
901 .of_match_table = of_match_ptr(max98373_of_match),
902 .acpi_match_table = ACPI_PTR(max98373_acpi_match),
903 .pm = &max98373_pm,
904 },
905 .probe = max98373_sdw_probe,
896 .remove = NULL,
906 .remove = max98373_sdw_remove,
897 .ops = &max98373_slave_ops,
898 .id_table = max98373_id,
899};
900
901module_sdw_driver(max98373_sdw_driver);
902
903MODULE_DESCRIPTION("ASoC MAX98373 driver SDW");
904MODULE_AUTHOR("Oleg Sherbakov <oleg.sherbakov@maximintegrated.com>");
905MODULE_LICENSE("GPL v2");
907 .ops = &max98373_slave_ops,
908 .id_table = max98373_id,
909};
910
911module_sdw_driver(max98373_sdw_driver);
912
913MODULE_DESCRIPTION("ASoC MAX98373 driver SDW");
914MODULE_AUTHOR("Oleg Sherbakov <oleg.sherbakov@maximintegrated.com>");
915MODULE_LICENSE("GPL v2");