From patchwork Mon May 23 14:11:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Kulhavy X-Patchwork-Id: 9131993 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 0DEB260761 for ; Mon, 23 May 2016 15:13:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 039742822B for ; Mon, 23 May 2016 15:13:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ECB3428239; Mon, 23 May 2016 15:13:27 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=no 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 D15E02822B for ; Mon, 23 May 2016 15:13:23 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id BFDB12659BF; Mon, 23 May 2016 17:13:20 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 7B089260708; Mon, 23 May 2016 17:05:57 +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 CE6B8260708; Mon, 23 May 2016 17:05:56 +0200 (CEST) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by alsa0.perex.cz (Postfix) with ESMTP id 4D22D2664C2 for ; Mon, 23 May 2016 16:11:34 +0200 (CEST) Received: by mail-wm0-f45.google.com with SMTP id n129so81129949wmn.1 for ; Mon, 23 May 2016 07:11:34 -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=YWoq3lprMa5EeIYC48jCg2qvjy8XUiO+BdhktPR+wkw=; b=eHvh/hWz5gOBLLXzERUJl9XPRFI8w/7eZM0WtIqpMc7NpK4lxda55h26fqz6Xu98sr EWLbpU3Fs/v6jA/IweaJsyd97NXaGsFBsIFxCWXQmz7HmcPxhzACq0tW84gUIuPXPSMx w7IDgX6GWIVqoAmm6ZBbzijTqMX4yfg565m+18Stjj1mFiWvfZw1yQsqJwaCpa9FGwxL SPhclGYxLUA5+PRwediLpHoliW8AxIwdimU3g0OkvVPbKuqR9vKeh6sZJ4OiDOF0m+uY YLiFk0DhV2dMQXVfilWxiOIt8+85ottu4TAOpxmBOlMtPAe09+0Ljzx3ziQKbt8shpMH e+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=YWoq3lprMa5EeIYC48jCg2qvjy8XUiO+BdhktPR+wkw=; b=cl18ToWqEtykmCXECpT6RPo5kRzsbHWfRBWe5n1Z1jFd6Uq4gXKDgTyEY5aUtmdjXz 9bGVlblJnRpVJ1doXLbZmf2h3ebtYtkR06GK1KoFnZxMIb8ymwSnqKINYroQVmXkTFma YY9x99bG98oD7T+VxhZ9ofoPIUshSFgGBWUB8iIVR7VlDgKnbjqTZP9gCvSsC65ATNjD bDP9rF1t7Z/oysvmCRvImsdDk9X9VdzF0V6OeI8+NZFqEBysOrExktj1vZtxpLLVCB4u 58Iij5JjXK3d3yBnfxNNH/SUZqS1EOL59XMIIzvF0oGQ+bcXuNBVBf0fiy33H0s7DFDl XrOw== X-Gm-Message-State: AOPr4FV0oCMtkgRrtgTfYj4PwzRRF/5W3LWGNF5jCmR+Q3srkjomI7T4NtWKwBdxIk0cgixP X-Received: by 10.28.149.205 with SMTP id x196mr18606718wmd.67.1464012693911; Mon, 23 May 2016 07:11:33 -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 k127sm13968223wmf.21.2016.05.23.07.11.32 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 23 May 2016 07:11:33 -0700 (PDT) From: Petr Kulhavy To: lgirdwood@gmail.com, broonie@kernel.org, ckeepax@opensource.wolfsonmicro.com Date: Mon, 23 May 2016 16:11:24 +0200 Message-Id: <1464012685-1142-2-git-send-email-petr@barix.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464012685-1142-1-git-send-email-petr@barix.com> References: <1464012685-1142-1-git-send-email-petr@barix.com> Cc: Petr Kulhavy , alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com, plamen@barix.com Subject: [alsa-devel] [PATCH v3 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 v3: 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] */