Commit ea1628e8 authored by Chen-Yu Tsai's avatar Chen-Yu Tsai Committed by Lee Jones

mfd: sun6i-prcm: Add codec analog controls sub-device for Allwinner A23

The PRCM block on the A23 contains a message box like interface to
the registers for the analog path controls of the internal codec.

Add a sub-device for it.
Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
Acked-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 3dfaff27
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/of.h> #include <linux/of.h>
#define SUN8I_CODEC_ANALOG_BASE 0x1c0
#define SUN8I_CODEC_ANALOG_SIZE 0x4
struct prcm_data { struct prcm_data {
int nsubdevs; int nsubdevs;
const struct mfd_cell *subdevs; const struct mfd_cell *subdevs;
...@@ -57,6 +60,10 @@ static const struct resource sun6i_a31_apb0_rstc_res[] = { ...@@ -57,6 +60,10 @@ static const struct resource sun6i_a31_apb0_rstc_res[] = {
}, },
}; };
static const struct resource sun8i_codec_analog_res[] = {
DEFINE_RES_MEM(SUN8I_CODEC_ANALOG_BASE, SUN8I_CODEC_ANALOG_SIZE),
};
static const struct mfd_cell sun6i_a31_prcm_subdevs[] = { static const struct mfd_cell sun6i_a31_prcm_subdevs[] = {
{ {
.name = "sun6i-a31-ar100-clk", .name = "sun6i-a31-ar100-clk",
...@@ -109,6 +116,12 @@ static const struct mfd_cell sun8i_a23_prcm_subdevs[] = { ...@@ -109,6 +116,12 @@ static const struct mfd_cell sun8i_a23_prcm_subdevs[] = {
.num_resources = ARRAY_SIZE(sun6i_a31_apb0_rstc_res), .num_resources = ARRAY_SIZE(sun6i_a31_apb0_rstc_res),
.resources = sun6i_a31_apb0_rstc_res, .resources = sun6i_a31_apb0_rstc_res,
}, },
{
.name = "sun8i-codec-analog",
.of_compatible = "allwinner,sun8i-a23-codec-analog",
.num_resources = ARRAY_SIZE(sun8i_codec_analog_res),
.resources = sun8i_codec_analog_res,
},
}; };
static const struct prcm_data sun6i_a31_prcm_data = { static const struct prcm_data sun6i_a31_prcm_data = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment