Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 0f2d4f16 authored by Hans de Goede's avatar Hans de Goede Committed by Mark Brown
Browse files

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: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent ee680968
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __DT_RT5651_H
#define __DT_RT5651_H

#define RT5651_JD_NULL			0
#define RT5651_JD1_1			1
#define RT5651_JD1_2			2
#define RT5651_JD2			3

#define RT5651_OVCD_SF_0P5		0
#define RT5651_OVCD_SF_0P75		1
#define RT5651_OVCD_SF_1P0		2
#define RT5651_OVCD_SF_1P5		3

#endif /* __DT_RT5651_H */

include/sound/rt5651.h

deleted100644 → 0
+0 −36
Original line number Diff line number Diff line
/*
 * linux/sound/rt286.h -- Platform data for RT286
 *
 * Copyright 2013 Realtek Microelectronics
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#ifndef __LINUX_SND_RT5651_H
#define __LINUX_SND_RT5651_H

/*
 * Note these MUST match the values from the DT binding:
 * Documentation/devicetree/bindings/sound/rt5651.txt
 */
enum rt5651_jd_src {
	RT5651_JD_NULL,
	RT5651_JD1_1,
	RT5651_JD1_2,
	RT5651_JD2,
};

/*
 * Note these MUST match the values from the DT binding:
 * Documentation/devicetree/bindings/sound/rt5651.txt
 */
enum rt5651_ovcd_sf {
	RT5651_OVCD_SF_0P5,
	RT5651_OVCD_SF_0P75,
	RT5651_OVCD_SF_1P0,
	RT5651_OVCD_SF_1P5,
};

#endif
+2 −2
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
#ifndef __RT5651_H__
#define __RT5651_H__

#include <sound/rt5651.h>
#include <dt-bindings/sound/rt5651.h>

/* Info */
#define RT5651_RESET				0x00
@@ -2073,7 +2073,7 @@ struct rt5651_priv {
	struct regmap *regmap;
	struct snd_soc_jack *hp_jack;
	struct work_struct jack_detect_work;
	enum rt5651_jd_src jd_src;
	unsigned int jd_src;
	unsigned int ovcd_th;
	unsigned int ovcd_sf;