Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: rt5651: move definitions of dt-binding constants to include/dt-bindings

Move the definitions of constants used in the dt-bindings from
include/sound/rt5651.h to include/dt-bindings/sound/rt5651.h.

As dt-bindings headers may also be parsed by the dt-compiler, they cannot
use enums, only defines, so this commit also changes the code declaring
the constants to use defines.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Hans de Goede and committed by
Mark Brown
0f2d4f16 ee680968

+17 -38
+15
include/dt-bindings/sound/rt5651.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef __DT_RT5651_H 3 + #define __DT_RT5651_H 4 + 5 + #define RT5651_JD_NULL 0 6 + #define RT5651_JD1_1 1 7 + #define RT5651_JD1_2 2 8 + #define RT5651_JD2 3 9 + 10 + #define RT5651_OVCD_SF_0P5 0 11 + #define RT5651_OVCD_SF_0P75 1 12 + #define RT5651_OVCD_SF_1P0 2 13 + #define RT5651_OVCD_SF_1P5 3 14 + 15 + #endif /* __DT_RT5651_H */
-36
include/sound/rt5651.h
··· 1 - /* 2 - * linux/sound/rt286.h -- Platform data for RT286 3 - * 4 - * Copyright 2013 Realtek Microelectronics 5 - * 6 - * This program is free software; you can redistribute it and/or modify 7 - * it under the terms of the GNU General Public License version 2 as 8 - * published by the Free Software Foundation. 9 - */ 10 - 11 - #ifndef __LINUX_SND_RT5651_H 12 - #define __LINUX_SND_RT5651_H 13 - 14 - /* 15 - * Note these MUST match the values from the DT binding: 16 - * Documentation/devicetree/bindings/sound/rt5651.txt 17 - */ 18 - enum rt5651_jd_src { 19 - RT5651_JD_NULL, 20 - RT5651_JD1_1, 21 - RT5651_JD1_2, 22 - RT5651_JD2, 23 - }; 24 - 25 - /* 26 - * Note these MUST match the values from the DT binding: 27 - * Documentation/devicetree/bindings/sound/rt5651.txt 28 - */ 29 - enum rt5651_ovcd_sf { 30 - RT5651_OVCD_SF_0P5, 31 - RT5651_OVCD_SF_0P75, 32 - RT5651_OVCD_SF_1P0, 33 - RT5651_OVCD_SF_1P5, 34 - }; 35 - 36 - #endif
+2 -2
sound/soc/codecs/rt5651.h
··· 12 12 #ifndef __RT5651_H__ 13 13 #define __RT5651_H__ 14 14 15 - #include <sound/rt5651.h> 15 + #include <dt-bindings/sound/rt5651.h> 16 16 17 17 /* Info */ 18 18 #define RT5651_RESET 0x00 ··· 2073 2073 struct regmap *regmap; 2074 2074 struct snd_soc_jack *hp_jack; 2075 2075 struct work_struct jack_detect_work; 2076 - enum rt5651_jd_src jd_src; 2076 + unsigned int jd_src; 2077 2077 unsigned int ovcd_th; 2078 2078 unsigned int ovcd_sf; 2079 2079