1
0
Fork 0

mfd: Add audiomix support

Some of the i.MX SoCs have a IP for interfacing the audio dedicated IPs with
clocks, resets and interrupts, plus some DSP specific control registers.
To allow the functionality to be split between drivers, this MFD driver is
added that has only two purposes: register the devices and map the entire
register addresses. Everything else is left to the dedicated drivers that will
bind to the registered devices.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Abel Vesa 2019-09-03 16:02:00 +03:00 committed by Sandor Yu
parent fd3113259b
commit 5f5a9c97f5
3 changed files with 55 additions and 0 deletions

View File

@ -467,6 +467,12 @@ config MFD_MXC_HDMI
This is the core driver for the Freescale i.MX6 on-chip HDMI.
This MFD driver connects with the video and audio drivers for HDMI.
config MFD_IMX_AUDIOMIX
tristate "NXP i.MX8MP Audiomix Control Driver"
depends on OF || COMPILE_TEST
help
Enable audiomix support
config MFD_HI6421_PMIC
tristate "HiSilicon Hi6421 PMU/Codec IC"
depends on OF

View File

@ -113,6 +113,7 @@ obj-$(CONFIG_TWL6040_CORE) += twl6040.o
obj-$(CONFIG_MFD_MX25_TSADC) += fsl-imx25-tsadc.o
obj-$(CONFIG_MFD_MXC_HDMI) += mxc-hdmi-core.o
obj-$(CONFIG_MFD_IMX_AUDIOMIX) += imx-audiomix.o
obj-$(CONFIG_MFD_MC13XXX) += mc13xxx-core.o
obj-$(CONFIG_MFD_MC13XXX_SPI) += mc13xxx-spi.o

View File

@ -0,0 +1,48 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright 2019 NXP.
*/
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/spinlock.h>
#include <linux/types.h>
#include <linux/platform_device.h>
#include <linux/of_platform.h>
#include <linux/mfd/core.h>
static int imx_audiomix_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct resource *res;
void __iomem *base;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
base = devm_ioremap_resource(dev, res);
if (IS_ERR(base))
return PTR_ERR(base);
dev_set_drvdata(dev, base);
return devm_of_platform_populate(dev);
}
static const struct of_device_id imx_audiomix_of_match[] = {
{ .compatible = "fsl,imx8mp-audiomix" },
{ /* Sentinel */ },
};
MODULE_DEVICE_TABLE(of, imx_audiomix_of_match);
static struct platform_driver imx_audiomix_driver = {
.probe = imx_audiomix_probe,
.driver = {
.name = "imx-audiomix",
.of_match_table = of_match_ptr(imx_audiomix_of_match),
},
};
module_platform_driver(imx_audiomix_driver);