From patchwork Wed Jul 25 17:30:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 142904 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1079853ljj; Wed, 25 Jul 2018 10:30:52 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe+Wr9vsI9oicvcBrKK1gX789xjyhQEKKRKj6B5IsK8ELNwSzlvgZogFOQiBm3HtSmg6zur X-Received: by 2002:a1c:91c7:: with SMTP id t190-v6mr5439872wmd.2.1532539852604; Wed, 25 Jul 2018 10:30:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532539852; cv=none; d=google.com; s=arc-20160816; b=dTn6MMWwRAPYLXw4/Yal2EQPd0/rdnUrnfN1zPkc3dFFmCAGAjrsu83S22Ehlia8ke EHTH92s9iUbHGHsg9E6WKdsr+l0gpTacb/gAX5R3PHb6ezHAVtM9rv7HsanKO6XyNgr4 x67K6hEt7weeBt2vwmecIa0eejOQOtAnvw9PzL4VeIO0nfATec9+HFMv1ntvRkmA2aJ6 gDRI5nrMoRqr5K5m5Ji1DOiZeb5K6MsDfjLoCXGwPF8qsMqg2+2OP79Y96cN8XGsvjbO BSy/SWnXQwnFRVz++wYMBBSWPWixDXyvWPLmTz0+wyUnaBNKW8+O1JXnkBqpWNrfRrs9 ryZA== 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:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=oLJOMlIFZtVhICtL6Tsn1aIlTij9Q+4UPGYXmgnXJgI=; b=ehphBN6pKwh8nmWl31qb16fw27Kao9wbZvYc2wANps9Bm5dpWDua/QYD3Q8Ke6JjyP 7+FzAWL7u5vW6pJNteH2g+ozOlO0JumEVUr2beFXRRB/JwouE9MPiWHVFJFyiRSSdXPl kf+Hd7YA5dwuIJUazJOVZxU279BtLjBLmp6FsTYFEWurAbeNDwGxyB8K17yJZsb69T1h 6G+vLKIswULJbz6km6s7cbfrUqu775gdLHfLd9v8tTn6d5gWQEtnIAC3jl3wN9dHmEY3 WsmmOSw01b1Yepq0N7LF+jqR7ofpbxteJU2XKgXWZY7BdE9ivPaNcT7ryGmPyw7fxlPi BSPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=gxZetrbu; 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=kernel.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id e26-v6si12801976wra.250.2018.07.25.10.30.52; Wed, 25 Jul 2018 10:30:52 -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=@sirena.org.uk header.s=20170815-heliosphere header.b=gxZetrbu; 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=kernel.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 77F0726774B; Wed, 25 Jul 2018 19:30:48 +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 9BB52267750; Wed, 25 Jul 2018 19:30:45 +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.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id DDA0226774A for ; Wed, 25 Jul 2018 19:30:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=vVlkOGmqN+isN7YEKS//R0qE7APW7MsivWUQ459hrCo=; b=gxZetrbua6nx 29oXJt9jaJOORPBq9HwZs43HxbzL2jrcjgPympNolMO3OaFN0+8mO104iSy15oL8yiKPItQmULwVX 54f/+QM2lMe53Y4JbdU/HO8GCa/WpzsF23wt1c1vk7iShxB6ASSwOf1CA1CUSUMoSuNbGRtkizy/8 ICgfg=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1fiNcT-0006nq-NP; Wed, 25 Jul 2018 17:30:37 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id 5C87D1123B08; Wed, 25 Jul 2018 18:30:37 +0100 (BST) From: Mark Brown To: Akshu Agrawal In-Reply-To: <1532509274-8280-1-git-send-email-akshu.agrawal@amd.com> Message-Id: <20180725173037.5C87D1123B08@debutante.sirena.org.uk> Date: Wed, 25 Jul 2018 18:30:37 +0100 (BST) Cc: , alsa-devel@alsa-project.org, Kuninori Morimoto , Liam Girdwood , open list , djkurtz@chromium.org, Takashi Iwai , Mark Brown , Wei Yongjun , "Mukunda, , Vijendar" , Alex Deucher , Adam Thomson , akshu.agrawal@amd.com Subject: [alsa-devel] Applied "ASoC: AMD: Add a fix voltage regulator for DA7219 and ADAU7002" to the asoc tree 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 The patch ASoC: AMD: Add a fix voltage regulator for DA7219 and ADAU7002 has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 7b5317aa809f833d017196ad4a34e3b3b7dae101 Mon Sep 17 00:00:00 2001 From: Akshu Agrawal Date: Wed, 25 Jul 2018 17:00:59 +0800 Subject: [PATCH] ASoC: AMD: Add a fix voltage regulator for DA7219 and ADAU7002 DA7219 for our platform need to be configured for 1.8V. Hence, we add a volatge regulator with supplies of 1.8V in the machine driver. Signed-off-by: Adam Thomson Signed-off-by: Akshu Agrawal Signed-off-by: Mark Brown --- sound/soc/amd/Kconfig | 1 + sound/soc/amd/acp-da7219-max98357a.c | 43 ++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) -- 2.18.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/amd/Kconfig b/sound/soc/amd/Kconfig index 6cbf9cf4d1a4..58c1dcb4d255 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 ccddc6650b9c..dfd520206013 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,52 @@ static struct snd_soc_card cz_card = { .num_controls = ARRAY_SIZE(cz_mc_controls), }; +static struct regulator_consumer_supply acp_da7219_supplies[] = { + REGULATOR_SUPPLY("VDD", "i2c-DLGS7219:00"), + REGULATOR_SUPPLY("VDDMIC", "i2c-DLGS7219:00"), + REGULATOR_SUPPLY("VDDIO", "i2c-DLGS7219:00"), + REGULATOR_SUPPLY("IOVDD", "ADAU7002:00"), +}; + +static struct regulator_init_data acp_da7219_data = { + .constraints = { + .always_on = 1, + }, + .num_consumer_supplies = ARRAY_SIZE(acp_da7219_supplies), + .consumer_supplies = acp_da7219_supplies, +}; + +static struct regulator_config acp_da7219_cfg = { + .init_data = &acp_da7219_data, +}; + +static struct regulator_ops acp_da7219_ops = { +}; + +static struct regulator_desc acp_da7219_desc = { + .name = "reg-fixed-1.8V", + .type = REGULATOR_VOLTAGE, + .owner = THIS_MODULE, + .ops = &acp_da7219_ops, + .fixed_uV = 1800000, /* 1.8V */ + .n_voltages = 1, +}; + static int cz_probe(struct platform_device *pdev) { int ret; struct snd_soc_card *card; struct acp_platform_info *machine; + struct regulator_dev *rdev; + + acp_da7219_cfg.dev = &pdev->dev; + rdev = devm_regulator_register(&pdev->dev, &acp_da7219_desc, + &acp_da7219_cfg); + if (IS_ERR(rdev)) { + dev_err(&pdev->dev, "Failed to register regulator: %d\n", + ret); + return -EINVAL; + } machine = devm_kzalloc(&pdev->dev, sizeof(struct acp_platform_info), GFP_KERNEL);