From patchwork Tue Sep 18 19:12:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 146940 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp250210ljw; Tue, 18 Sep 2018 12:12:37 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYmdRuyVtTwvvaPXjtXxIKYu/qBZHWMD8bZDZk++s1YIfCP8O5M4AYcJ+f2X2tMbaaBPz1c X-Received: by 2002:adf:8919:: with SMTP id s25-v6mr25450455wrs.89.1537297957118; Tue, 18 Sep 2018 12:12:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537297957; cv=none; d=google.com; s=arc-20160816; b=UJw1g8JnbRn7ZHrrQ9m1Dbv68fN0Z2lC4JNcLZJl7w/zUIMnk/62BM0htvTf2CZ3cs 0UWL550plDi+YnzvJHJKr+S/QrezBpntH+CYA779CDPponItybDiIqiTLbwPIag/CHLJ W8mzGSc5+JfXRsSPc9TH1fcwvNiMK89BK9GFy/LnXahJIt37Wgff+ZR59LeFS2E91Plr SsAKDTiFgmeBOLIrRWVX7KmSIfy8Pp+b+G8Yvy4xFWh1Q2w04bAfziuz5AGnHz5Zf786 rWrVhwaPkDtaqmdDw+frLfdMOfePxv5EZORKFh9WQFn08ZmoR1WbIsGJ5GsN2PzDtwWp hARg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :dkim-signature:delivered-to; bh=bqSmHpARwrBqmXhQWFrLGHJiHwWsKREruz3iSfXEwpA=; b=GKbOtPIebFJ1WgWDjwl+B08ExLvcnZNaCu9wYR8xJZiu5eXRcAZgo7zVXLJMIFBphH ydDFNK0sspEx0bCWU6eVwoiiCoRscla/Fo3UJjLYtgUJOXC4ObDjfudq0fN3FyhBgl8Q 2GJRcTzk1P6XAee+nRdTuftyYSOyTBYKzfF+rK09W9b0lnXbHU/wbUOL/325m1MVKmok VjtrREz5fBUuF6fxS0Q7/8/a5EPidMe45pIfUN346i08oUlVb0Q5lu5fN8rxShJd62zK h2cLKiCyB8tORcWpmwkiHWAeCM18o3rlWZE1IhMACGxY09rgYtm9XuNetLAUrGSG7T45 Awjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=UUcc+RVo; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id j1-v6si9722910wrs.82.2018.09.18.12.12.36; Tue, 18 Sep 2018 12:12:37 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=UUcc+RVo; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id CF49126789F; Tue, 18 Sep 2018 21:12:35 +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 775222678A5; Tue, 18 Sep 2018 21:12:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS autolearn=disabled version=3.4.0 Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by alsa0.perex.cz (Postfix) with ESMTP id 2D5D726789F for ; Tue, 18 Sep 2018 21:12:31 +0200 (CEST) Received: by mail-pf1-f193.google.com with SMTP id u24-v6so1453518pfn.13 for ; Tue, 18 Sep 2018 12:12:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=fTZQCD0J81eQK4+Q7VYr6hsVNeRL6N/98n/VoVXi2Xo=; b=UUcc+RVoHovm8oASLlmtgVPoirsWCdov3d9wGVCHXlShBDI1S9qrJP8A7QyK5FRAJa 6LifFRnMfmkbQhA8XWa/8epM2M/SRiXiZFylVTUGmFMN8iuhpecq+TvsdOq341gXdjS4 /c9xijtmB/Ioi/wsXbzW2BT1nyDhGatbVTIIg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=fTZQCD0J81eQK4+Q7VYr6hsVNeRL6N/98n/VoVXi2Xo=; b=j5aSDpUfQK/lBfGoNRtpT9PWI48v9W8o80mQIauypkfsFEONSiMDP1GuiJr8tev3ei uD9HyrvmfZmVJDNswhv7WeacgZgNGMkzVVBZo9spimf4Hr/gI0/Mt/SRtgz7aoIs5M/R TDhGMaX538OetkQJ9mx4O7yZqSeE0ELDejBoceSxwuNSP4gekFoNibwTL1bbn4zqrKiu 7+mgVEu+7DmJ1cX1L9JuUdTbqVgeLKEsXyuLz9LD3c06dzGtZRD9TniCdmDn2E6kEZxP WcOxhbmLzj42XE/A2/XWWriehFso+oTs5TZquwVpsiTCe5AxboGYm8OecTZcUfMhvUX3 pjEg== X-Gm-Message-State: APzg51DNkDLyZQrkZhN7jO718NRZPan4shF/pxjgw+tsJhXPx25+7VGW lJ1C9Mc9Ndw7IPffT4G93a/ZXg== X-Received: by 2002:a62:cdcf:: with SMTP id o198-v6mr32425274pfg.12.1537297950901; Tue, 18 Sep 2018 12:12:30 -0700 (PDT) Received: from localhost.localdomain ([209.121.128.187]) by smtp.gmail.com with ESMTPSA id l9-v6sm24381865pgg.79.2018.09.18.12.12.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Sep 2018 12:12:29 -0700 (PDT) From: Linus Walleij To: Liam Girdwood , Mark Brown Date: Tue, 18 Sep 2018 12:12:26 -0700 Message-Id: <20180918191226.17104-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.1 Cc: alsa-devel@alsa-project.org, Linus Walleij Subject: [alsa-devel] [PATCH 1/2] sound: soc: wm8903: Pull in platform data 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 No platform in the kernel is using platform data to populate the WM8903 so pull it into the source file. This is done to handle further simplifications. Signed-off-by: Linus Walleij --- include/sound/wm8903.h | 24 ------------------------ sound/soc/codecs/wm8903.c | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 24 deletions(-) -- 2.17.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/include/sound/wm8903.h b/include/sound/wm8903.h index b310c5a3a958..b2ef76d5d00d 100644 --- a/include/sound/wm8903.h +++ b/include/sound/wm8903.h @@ -11,12 +11,6 @@ #ifndef __LINUX_SND_WM8903_H #define __LINUX_SND_WM8903_H -/* - * Used to enable configuration of a GPIO to all zeros; a gpio_cfg value of - * zero in platform data means "don't touch this pin". - */ -#define WM8903_GPIO_CONFIG_ZERO 0x8000 - /* * R6 (0x06) - Mic Bias Control 0 */ @@ -245,22 +239,4 @@ #define WM8903_GP5_DB_SHIFT 0 /* GP5_DB */ #define WM8903_GP5_DB_WIDTH 1 /* GP5_DB */ -#define WM8903_NUM_GPIO 5 - -struct wm8903_platform_data { - bool irq_active_low; /* Set if IRQ active low, default high */ - - /* Default register value for R6 (Mic bias), used to configure - * microphone detection. In conjunction with gpio_cfg this - * can be used to route the microphone status signals out onto - * the GPIOs for use with snd_soc_jack_add_gpios(). - */ - u16 micdet_cfg; - - int micdet_delay; /* Delay after microphone detection (ms) */ - - int gpio_base; - u32 gpio_cfg[WM8903_NUM_GPIO]; /* Default register values for GPIO pin mux */ -}; - #endif diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index 6cb3c153ba19..23e43ff40ded 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c @@ -124,6 +124,30 @@ static const char *wm8903_supply_names[WM8903_NUM_SUPPLIES] = { "DCVDD", }; +/* + * Used to enable configuration of a GPIO to all zeros; a gpio_cfg value of + * zero in platform data means "don't touch this pin". + */ +#define WM8903_GPIO_CONFIG_ZERO 0x8000 + +#define WM8903_NUM_GPIO 5 + +struct wm8903_platform_data { + bool irq_active_low; /* Set if IRQ active low, default high */ + + /* Default register value for R6 (Mic bias), used to configure + * microphone detection. In conjunction with gpio_cfg this + * can be used to route the microphone status signals out onto + * the GPIOs for use with snd_soc_jack_add_gpios(). + */ + u16 micdet_cfg; + + int micdet_delay; /* Delay after microphone detection (ms) */ + + int gpio_base; + u32 gpio_cfg[WM8903_NUM_GPIO]; /* Default register values for GPIO pin mux */ +}; + struct wm8903_priv { struct wm8903_platform_data *pdata; struct device *dev;