Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 //
0003 // Analog Devices ADAU7118 8 channel PDM-to-I2S/TDM Converter Standalone Hw
0004 // driver
0005 //
0006 // Copyright 2019 Analog Devices Inc.
0007 
0008 #include <linux/module.h>
0009 #include <linux/mod_devicetable.h>
0010 #include <linux/platform_device.h>
0011 
0012 #include "adau7118.h"
0013 
0014 static int adau7118_probe_hw(struct platform_device *pdev)
0015 {
0016     return adau7118_probe(&pdev->dev, NULL, true);
0017 }
0018 
0019 static const struct of_device_id adau7118_of_match[] = {
0020     { .compatible = "adi,adau7118" },
0021     {}
0022 };
0023 MODULE_DEVICE_TABLE(of, adau7118_of_match);
0024 
0025 static const struct platform_device_id adau7118_id[] = {
0026     { .name = "adau7118" },
0027     { }
0028 };
0029 MODULE_DEVICE_TABLE(platform, adau7118_id);
0030 
0031 static struct platform_driver adau7118_driver_hw = {
0032     .driver = {
0033         .name = "adau7118",
0034         .of_match_table = adau7118_of_match,
0035     },
0036     .probe = adau7118_probe_hw,
0037     .id_table = adau7118_id,
0038 };
0039 module_platform_driver(adau7118_driver_hw);
0040 
0041 MODULE_AUTHOR("Nuno Sa <nuno.sa@analog.com>");
0042 MODULE_DESCRIPTION("ADAU7118 8 channel PDM-to-I2S/TDM Converter driver for standalone hw mode");
0043 MODULE_LICENSE("GPL");