From patchwork Mon Mar 12 19:34:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 10277195 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 84363603B5 for ; Mon, 12 Mar 2018 19:34:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 744DB28B23 for ; Mon, 12 Mar 2018 19:34:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 668D928B37; Mon, 12 Mar 2018 19:34:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB4B228B23 for ; Mon, 12 Mar 2018 19:34:57 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 8292C267284; Mon, 12 Mar 2018 20:34:50 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 6FA7326718B; Mon, 12 Mar 2018 20:34:44 +0100 (CET) Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by alsa0.perex.cz (Postfix) with ESMTP id 0DC6A267048 for ; Mon, 12 Mar 2018 20:34:40 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AFDEA4000B6E; Mon, 12 Mar 2018 19:34:39 +0000 (UTC) Received: from shalem.localdomain.com (ovpn-116-170.ams2.redhat.com [10.36.116.170]) by smtp.corp.redhat.com (Postfix) with ESMTP id 15C42202699A; Mon, 12 Mar 2018 19:34:37 +0000 (UTC) From: Hans de Goede To: Mark Brown , Bard Liao , Oder Chiou Date: Mon, 12 Mar 2018 20:34:35 +0100 Message-Id: <20180312193436.8385-1-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 12 Mar 2018 19:34:39 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 12 Mar 2018 19:34:39 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'hdegoede@redhat.com' RCPT:'' Cc: Hans de Goede , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH 1/2] ASoC: rt5651: move definitions of dt-binding constants to include/dt-bindings X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- include/dt-bindings/sound/rt5651.h | 15 +++++++++++++++ include/sound/rt5651.h | 36 ------------------------------------ sound/soc/codecs/rt5651.h | 4 ++-- 3 files changed, 17 insertions(+), 38 deletions(-) create mode 100644 include/dt-bindings/sound/rt5651.h delete mode 100644 include/sound/rt5651.h diff --git a/include/dt-bindings/sound/rt5651.h b/include/dt-bindings/sound/rt5651.h new file mode 100644 index 000000000000..2f2dac915168 --- /dev/null +++ b/include/dt-bindings/sound/rt5651.h @@ -0,0 +1,15 @@ +/* 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 */ diff --git a/include/sound/rt5651.h b/include/sound/rt5651.h deleted file mode 100644 index 6403b862fb9a..000000000000 --- a/include/sound/rt5651.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 diff --git a/sound/soc/codecs/rt5651.h b/sound/soc/codecs/rt5651.h index f20c9be94fb2..3a0968c53fde 100644 --- a/sound/soc/codecs/rt5651.h +++ b/sound/soc/codecs/rt5651.h @@ -12,7 +12,7 @@ #ifndef __RT5651_H__ #define __RT5651_H__ -#include +#include /* 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;