From patchwork Tue May 17 12:48:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Kulhavy X-Patchwork-Id: 9112001 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C5F2E9F1C3 for ; Tue, 17 May 2016 12:49:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CAAD72026D for ; Tue, 17 May 2016 12:49:52 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 80BB92022D for ; Tue, 17 May 2016 12:49:51 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 9A21A265CC7; Tue, 17 May 2016 14:49:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id EAA93265A2E; Tue, 17 May 2016 14:49:16 +0200 (CEST) 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 BC4172658F0; Tue, 17 May 2016 14:49:13 +0200 (CEST) Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by alsa0.perex.cz (Postfix) with ESMTP id CCC8D26148F for ; Tue, 17 May 2016 14:49:07 +0200 (CEST) Received: by mail-wm0-f52.google.com with SMTP id e201so138486690wme.0 for ; Tue, 17 May 2016 05:49:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=barix-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ToEhTfo/J6KljDmI+3KtDHHDhw21CSKEFGj4k6HtpuA=; b=vIx7FkDEsnGb/8OVPQUzN1KJlr2amz3CqlG4kcF/uJIcLLg1mWs7eWvcXMO33EiqrW BVJT9OwTSAFTHWKFXpkzQiE8CJG1jw+zZb2lzTtedRElFoLZlp6x9MOts5HvgtcZ52Pt CZviOHPGJRjzi582DGYbLIw88Rngin8DuD1XpWW3nt/kyuMpkqJ9kAw8oM8PMxp/qP9u 99qrMYqSCOrew8C4Mn2rDHEr5fQIQ/7TDwLwKvktpw+ZqoI/Pdn3w60e+C7Wufavj+DS Xuf9vzNwOkLCA8pDWzREPwWpH9Fc5OkeaYfpLLNRhuKo1rb0whpwsQu3jRfEFpzglHeQ 3/Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ToEhTfo/J6KljDmI+3KtDHHDhw21CSKEFGj4k6HtpuA=; b=hghfweQA6gLa/u9aZIEQ3u4KOT3VTSOsbzYJdDWDKS0r3U6COnFXtcg5YLLpcbcBRs WCRSCkIbflUiflVOoUVHJjZEdT09zsI2BKpUDVi3eeaRIq1rR5KFpgZsw/Y7HrXWNnSe J/l6t9nZOZEP8EobGPN262kZiN4oEyI8hZre9UdGMWfK4/QdafKzpUjJn7wyHqdMCOyA OIMsuEjdKFpyVgn1NyiNDnbFP2j6LsEpugFDFdogMWP5OJSL5xfRgtGH3SgSr4lapSPB Bb3dhHHN1vI2sS3wRRHoUX8okKaaWzROFamHqUTtQHfioUdSJrY7ZttIwZrDjdB/KEA7 9zQg== X-Gm-Message-State: AOPr4FUUEmTfyBeHyMvD2+bSuuhB08Wl+j+0/m5yvhUGr3skPyhGF2pJggETYjIZ0Uh9/Uj7 X-Received: by 10.194.252.162 with SMTP id zt2mr1402074wjc.46.1463489347432; Tue, 17 May 2016 05:49:07 -0700 (PDT) Received: from petr-laptop.barix.com (dynamic-31-25-120-010.ftth.glattnet.ch. [31.25.120.10]) by smtp.googlemail.com with ESMTPSA id u12sm3415739wmu.12.2016.05.17.05.49.06 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 May 2016 05:49:06 -0700 (PDT) From: Petr Kulhavy To: lgirdwood@gmail.com, broonie@kernel.org, ckeepax@opensource.wolfsonmicro.com Date: Tue, 17 May 2016 14:48:53 +0200 Message-Id: <1463489334-17549-2-git-send-email-petr@barix.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1463489334-17549-1-git-send-email-petr@barix.com> References: <1463489334-17549-1-git-send-email-petr@barix.com> Cc: Petr Kulhavy , alsa-devel@alsa-project.org, plamen@barix.com Subject: [alsa-devel] [PATCH v2 1/2] ASoC: wm8985: add register definitions for WM8758 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 The WM8758 chip is almost identical to WM8985 with the difference that it doesn't feature the AUX input. This patch adds the register definitions for WM8758 specific bit fields to the header file. Signed-off-by: Petr Kulhavy Acked-by: Charles Keepax --- v1: initial v2: no change sound/soc/codecs/wm8985.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/sound/soc/codecs/wm8985.h b/sound/soc/codecs/wm8985.h index 2e71ff507638..41b1048e3c97 100644 --- a/sound/soc/codecs/wm8985.h +++ b/sound/soc/codecs/wm8985.h @@ -290,6 +290,9 @@ #define WM8985_GPIO1GPD_MASK 0x0040 /* GPIO1GPD */ #define WM8985_GPIO1GPD_SHIFT 6 /* GPIO1GPD */ #define WM8985_GPIO1GPD_WIDTH 1 /* GPIO1GPD */ +#define WM8758_OPCLKDIV_MASK 0x0030 /* OPCLKDIV - [1:0] */ +#define WM8758_OPCLKDIV_SHIFT 4 /* OPCLKDIV - [1:0] */ +#define WM8758_OPCLKDIV_WIDTH 2 /* OPCLKDIV - [1:0] */ #define WM8985_GPIO1POL 0x0008 /* GPIO1POL */ #define WM8985_GPIO1POL_MASK 0x0008 /* GPIO1POL */ #define WM8985_GPIO1POL_SHIFT 3 /* GPIO1POL */ @@ -301,6 +304,12 @@ /* * R9 (0x09) - Jack Detect Control 1 */ +#define WM8758_JD_VMID1_MASK 0x0100 /* JD_VMID1 */ +#define WM8758_JD_VMID1_SHIFT 8 /* JD_VMID1 */ +#define WM8758_JD_VMID1_WIDTH 1 /* JD_VMID1 */ +#define WM8758_JD_VMID0_MASK 0x0080 /* JD_VMID0 */ +#define WM8758_JD_VMID0_SHIFT 7 /* JD_VMID0 */ +#define WM8758_JD_VMID0_WIDTH 1 /* JD_VMID0 */ #define WM8985_JD_EN 0x0040 /* JD_EN */ #define WM8985_JD_EN_MASK 0x0040 /* JD_EN */ #define WM8985_JD_EN_SHIFT 6 /* JD_EN */ @@ -649,6 +658,12 @@ #define WM8985_OUT4_2LNR_MASK 0x0020 /* OUT4_2LNR */ #define WM8985_OUT4_2LNR_SHIFT 5 /* OUT4_2LNR */ #define WM8985_OUT4_2LNR_WIDTH 1 /* OUT4_2LNR */ +#define WM8758_VMIDTOG_MASK 0x0010 /* VMIDTOG */ +#define WM8758_VMIDTOG_SHIFT 4 /* VMIDTOG */ +#define WM8758_VMIDTOG_WIDTH 1 /* VMIDTOG */ +#define WM8758_OUT2DEL_MASK 0x0008 /* OUT2DEL */ +#define WM8758_OUT2DEL_SHIFT 3 /* OUT2DEL */ +#define WM8758_OUT2DEL_WIDTH 1 /* OUT2DEL */ #define WM8985_POBCTRL 0x0004 /* POBCTRL */ #define WM8985_POBCTRL_MASK 0x0004 /* POBCTRL */ #define WM8985_POBCTRL_SHIFT 2 /* POBCTRL */ @@ -684,6 +699,9 @@ #define WM8985_BEEPVOL_MASK 0x000E /* BEEPVOL - [3:1] */ #define WM8985_BEEPVOL_SHIFT 1 /* BEEPVOL - [3:1] */ #define WM8985_BEEPVOL_WIDTH 3 /* BEEPVOL - [3:1] */ +#define WM8758_DELEN2_MASK 0x0004 /* DELEN2 */ +#define WM8758_DELEN2_SHIFT 2 /* DELEN2 */ +#define WM8758_DELEN2_WIDTH 1 /* DELEN2 */ #define WM8985_BEEPEN 0x0001 /* BEEPEN */ #define WM8985_BEEPEN_MASK 0x0001 /* BEEPEN */ #define WM8985_BEEPEN_SHIFT 0 /* BEEPEN */ @@ -790,6 +808,14 @@ /* * R49 (0x31) - Output ctrl */ +#define WM8758_HP_COM 0x0100 /* HP_COM */ +#define WM8758_HP_COM_MASK 0x0100 /* HP_COM */ +#define WM8758_HP_COM_SHIFT 8 /* HP_COM */ +#define WM8758_HP_COM_WIDTH 1 /* HP_COM */ +#define WM8758_LINE_COM 0x0080 /* LINE_COM */ +#define WM8758_LINE_COM_MASK 0x0080 /* LINE_COM */ +#define WM8758_LINE_COM_SHIFT 7 /* LINE_COM */ +#define WM8758_LINE_COM_WIDTH 1 /* LINE_COM */ #define WM8985_DACL2RMIX 0x0040 /* DACL2RMIX */ #define WM8985_DACL2RMIX_MASK 0x0040 /* DACL2RMIX */ #define WM8985_DACL2RMIX_SHIFT 6 /* DACL2RMIX */ @@ -806,6 +832,14 @@ #define WM8985_OUT3BOOST_MASK 0x0008 /* OUT3BOOST */ #define WM8985_OUT3BOOST_SHIFT 3 /* OUT3BOOST */ #define WM8985_OUT3BOOST_WIDTH 1 /* OUT3BOOST */ +#define WM8758_OUT4ENDEL 0x0010 /* OUT4ENDEL */ +#define WM8758_OUT4ENDEL_MASK 0x0010 /* OUT4ENDEL */ +#define WM8758_OUT4ENDEL_SHIFT 4 /* OUT4ENDEL */ +#define WM8758_OUT4ENDEL_WIDTH 1 /* OUT4ENDEL */ +#define WM8758_OUT3ENDEL 0x0008 /* OUT3ENDEL */ +#define WM8758_OUT3ENDEL_MASK 0x0008 /* OUT3ENDEL */ +#define WM8758_OUT3ENDEL_SHIFT 3 /* OUT3ENDEL */ +#define WM8758_OUT3ENDEL_WIDTH 1 /* OUT3ENDEL */ #define WM8985_TSOPCTRL 0x0004 /* TSOPCTRL */ #define WM8985_TSOPCTRL_MASK 0x0004 /* TSOPCTRL */ #define WM8985_TSOPCTRL_SHIFT 2 /* TSOPCTRL */ @@ -1021,6 +1055,10 @@ #define WM8985_HALFIPBIAS_MASK 0x0080 /* HALFIPBIAS */ #define WM8985_HALFIPBIAS_SHIFT 7 /* HALFIPBIAS */ #define WM8985_HALFIPBIAS_WIDTH 1 /* HALFIPBIAS */ +#define WM8758_HALFIPBIAS 0x0040 /* HALFI_IPGA */ +#define WM8758_HALFI_IPGA_MASK 0x0040 /* HALFI_IPGA */ +#define WM8758_HALFI_IPGA_SHIFT 6 /* HALFI_IPGA */ +#define WM8758_HALFI_IPGA_WIDTH 1 /* HALFI_IPGA */ #define WM8985_VBBIASTST_MASK 0x0060 /* VBBIASTST - [6:5] */ #define WM8985_VBBIASTST_SHIFT 5 /* VBBIASTST - [6:5] */ #define WM8985_VBBIASTST_WIDTH 2 /* VBBIASTST - [6:5] */