From patchwork Wed Jul 18 00:49:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kurtz X-Patchwork-Id: 10531101 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 EA0EA60545 for ; Wed, 18 Jul 2018 00:50:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DCB9629064 for ; Wed, 18 Jul 2018 00:50:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D091829077; Wed, 18 Jul 2018 00:50:05 +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=-2.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE, RDNS_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (unknown [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21EA629064 for ; Wed, 18 Jul 2018 00:50:04 +0000 (UTC) Received: from alsa.alsa-project.org (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 80881267836; Wed, 18 Jul 2018 02:49: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 E01D426783C; Wed, 18 Jul 2018 02:49:28 +0200 (CEST) Received: from mail-it0-f65.google.com (mail-it0-f65.google.com [209.85.214.65]) by alsa0.perex.cz (Postfix) with ESMTP id B7D5A2677BC for ; Wed, 18 Jul 2018 02:49:23 +0200 (CEST) Received: by mail-it0-f65.google.com with SMTP id 198-v6so1767622ite.4 for ; Tue, 17 Jul 2018 17:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5gCuAeFsBocnt2TCTl7l3vZ0A5Xa/gAxFCMcGKMOHw8=; b=Ev9VbxzDs4yOyQYKXTJRuhlyu+cqHXdI/KK4viZEyIsIr7nK5Q72NpH56RJ9tOoS0C NnhZkUrtjW/2y3PQ67Y+O6V6vs78LIE6rjRrfZXNAXDjLxJTBSh58guoXxanSjH4JdYB 8dssivMqgjbSNOiehaptvXUzzSiTsaHXGZG9c= 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:in-reply-to :references; bh=5gCuAeFsBocnt2TCTl7l3vZ0A5Xa/gAxFCMcGKMOHw8=; b=nz9qhVWUhNqrbhhorwoDKF9deInmiYHTzDXeKUpqNh7ZIeaADSZoOnNM/tXuT5o+DI EYQ9o2tUwODztiRiSYp4MxWDnYs0ne3lP2lNID9WomUh6rTIORI8VAr5iE72oUBWOEMo XleUUuAksFcaOkD6FDKFqEpg+cf0NNimkxeIIwls4W2+0qE+37Y2spUkpv9/xfTVWqW8 r+5G2xqe7+64wnKRQ0KFIuJMwuALQCSsGv2CSzIeABueoYwbBBCoM5drMoaoWVcsPUyi hFBlcdOfCWN8QRgrAfDiRIqP4GIkzcjcd/VbiMFwjHxx6vXqMylgRQbp2hMYzyiXO1T3 awVQ== X-Gm-Message-State: AOUpUlFnTWlzztzagTkJ+2a+/SwaXcf/kndAXWO/FRIZ4oeF2e41u0Cu 017gdQrcx++uUHHNZl5ZYmFplw== X-Google-Smtp-Source: AAOMgpcAINcDbns3QGEIjjX9sYQ8zSEEaKKx6oOn9p1+iqQEqKrbYBtHjjG6qSTLvusfHgDi5dyc/g== X-Received: by 2002:a24:e4cf:: with SMTP id o198-v6mr286413ith.21.1531874962458; Tue, 17 Jul 2018 17:49:22 -0700 (PDT) Received: from djkurtz2.bld.corp.google.com ([2620:15c:183:0:1cfd:61a5:7215:5f9c]) by smtp.gmail.com with ESMTPSA id z71-v6sm3275425ioz.34.2018.07.17.17.49.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jul 2018 17:49:22 -0700 (PDT) From: Daniel Kurtz To: Date: Tue, 17 Jul 2018 18:49:09 -0600 Message-Id: <20180718004909.213735-3-djkurtz@chromium.org> X-Mailer: git-send-email 2.18.0.203.gfac676dfb9-goog In-Reply-To: <20180718004909.213735-1-djkurtz@chromium.org> References: <20180718004909.213735-1-djkurtz@chromium.org> Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Jimmy Cheng-Yi Chiang , Kuninori Morimoto , open list , Takashi Iwai , Liam Girdwood , Daniel Kurtz , Akshu Agrawal , Mark Brown , Wei Yongjun , "Mukunda, Vijendar" , Alex Deucher , Dylan Reid Subject: [alsa-devel] [PATCH 2/2] ASoC: AMD: Add an always on fixed 1.8V regulator for da7219 VDDIO 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 From: Akshu Agrawal DA7219's VDDIO for our platform need to be configured for 1.8V. Hence we register a fixed 1.8V voltage regulator in the machine driver. Change-Id: I65fd93e1dd37c3e0d38265b4b1492ea53b93afd4 Signed-off-by: Akshu Agrawal Signed-off-by: Daniel Kurtz --- sound/soc/amd/Kconfig | 1 + sound/soc/amd/acp-da7219-max98357a.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/sound/soc/amd/Kconfig b/sound/soc/amd/Kconfig index 6cbf9cf4d1a4c2..58c1dcb4d2550f 100644 --- a/sound/soc/amd/Kconfig +++ b/sound/soc/amd/Kconfig @@ -8,6 +8,7 @@ config SND_SOC_AMD_CZ_DA7219MX98357_MACH select SND_SOC_DA7219 select SND_SOC_MAX98357A select SND_SOC_ADAU7002 + select REGULATOR depends on SND_SOC_AMD_ACP && I2C help This option enables machine driver for DA7219 and MAX9835. diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c index ccddc6650b9c79..6ea0f42f5b7692 100644 --- a/sound/soc/amd/acp-da7219-max98357a.c +++ b/sound/soc/amd/acp-da7219-max98357a.c @@ -32,6 +32,8 @@ #include #include #include +#include +#include #include #include #include @@ -278,11 +280,23 @@ static struct snd_soc_card cz_card = { .num_controls = ARRAY_SIZE(cz_mc_controls), }; +static struct regulator_consumer_supply acp_da7219_supplies[] = { + REGULATOR_SUPPLY("VDDIO", "i2c-DLGS7219:00") +}; + static int cz_probe(struct platform_device *pdev) { int ret; struct snd_soc_card *card; struct acp_platform_info *machine; + struct platform_device *reg; + + reg = regulator_register_always_on(0, "fixed-1.8V", + acp_da7219_supplies, + ARRAY_SIZE(acp_da7219_supplies), + 1800000); + if (!reg) + return -ENOMEM; machine = devm_kzalloc(&pdev->dev, sizeof(struct acp_platform_info), GFP_KERNEL);