From 67edaaefd3d0b5d278c80809b03c22370508e2a1 Mon Sep 17 00:00:00 2001 From: Sugar Zhang Date: Wed, 18 Aug 2021 20:16:17 +0800 Subject: [PATCH] ASoC: rockchip: i2s: Build depends on CPU config $ ./scripts/bloat-o-meter rockchip_i2s.o.old rockchip_i2s.o add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-1968 (-1968) Function old new delta rk3399_i2s_pins 8 - -8 rockchip_i2s_match 2548 588 -1960 Total: Before=8656, After=6688, chg -22.74% Change-Id: Iabb0a00ab27ce5623164d40de6b379272a81e4e5 Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_i2s.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c index b8592c7631f2..c497e2018436 100644 --- a/sound/soc/rockchip/rockchip_i2s.c +++ b/sound/soc/rockchip/rockchip_i2s.c @@ -728,18 +728,40 @@ static const struct rk_i2s_pins rk3399_i2s_pins = { }; static const struct of_device_id rockchip_i2s_match[] = { +#ifdef CONFIG_CPU_PX30 { .compatible = "rockchip,px30-i2s", }, +#endif +#ifdef CONFIG_CPU_RK1808 { .compatible = "rockchip,rk1808-i2s", }, +#endif +#ifdef CONFIG_CPU_RK3036 { .compatible = "rockchip,rk3036-i2s", }, +#endif { .compatible = "rockchip,rk3066-i2s", }, +#ifdef CONFIG_CPU_RK312X { .compatible = "rockchip,rk3128-i2s", }, +#endif +#ifdef CONFIG_CPU_RK3188 { .compatible = "rockchip,rk3188-i2s", }, +#endif +#ifdef CONFIG_CPU_RK3288 { .compatible = "rockchip,rk3288-i2s", }, +#endif +#ifdef CONFIG_CPU_RK3308 { .compatible = "rockchip,rk3308-i2s", }, +#endif +#ifdef CONFIG_CPU_RK3328 { .compatible = "rockchip,rk3328-i2s", }, +#endif +#ifdef CONFIG_CPU_RK3368 { .compatible = "rockchip,rk3368-i2s", }, +#endif +#ifdef CONFIG_CPU_RK3399 { .compatible = "rockchip,rk3399-i2s", .data = &rk3399_i2s_pins }, +#endif +#ifdef CONFIG_CPU_RV1126 { .compatible = "rockchip,rv1126-i2s", }, +#endif {}, };