From patchwork Thu Jul 26 13:10:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 142968 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp442561ljj; Thu, 26 Jul 2018 06:11:13 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfoVR/ArRysAkAV4W3JbFr3DvD2IkQMcVd0QN93Q5JFDMbyXFp8NMMtryAFZIUy1gz9/Ls1 X-Received: by 2002:a1c:ea9c:: with SMTP id g28-v6mr1544671wmi.65.1532610672975; Thu, 26 Jul 2018 06:11:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532610672; cv=none; d=google.com; s=arc-20160816; b=Y/EsS8Fd/etBYwavSVvsLDQE+wpsDuZeo5ee0OVDbbK3q9OLHmoNa03vwg6W9uTHGh RMEDEw/+cmoj59dzAf6gG06oVrKcRDLeX+qp3DHnV+erXaPjdINtVuFpftP9nuHJbtV8 TybvU1gRY1NIj5uJyZPDleqZHexI4luecMcyeD3CJuyTKPWuYMHjB9roxuFV+JX0YGln 0O0tna/aPc8K8YF8JKvtW6Bud49yL51g71QjzIecmsrmQlA1dTJJemi2XNzdVcJDA54V RGt+NAMAEcwC2ASZw+60DgwfCZdF+5E9/3KeCqCBpBaxenSJzg1UzQXJThJrA/kP3MTa aqKA== 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=LFs85D0wzSqNAJYaFKXSzb3vJWlj9c2QQgWXS8jbw3Y=; b=ykL1yamah1pR6aNz8Y5UV3ZXGpqh2irpBt8GN6NKGJVXmSuKYQ78+CjiNhxW9Pnxva PFFQt97oOF13CZmItJz2IeJVVGuaFNVfcUFpMaZKYZAKUd36eMMwPY6V1tGDY8KojiaQ kersP0gdwE3HDWymjJSFANufzAawdzPT92oURPePgnWgyT3XxQRfQ72RO1nul7lgpS8O QLhkJ1z+F8ONcWRSSgBvuFULLcEwHAza4e33mkIw2aL91qRGKZdCvcNSgVKGURHK2OvZ PPfwLpKt/+7AognPKgAWdMcOeUbKMtyAsvCIwLJiva9RoT5pw5ua0xE6vId6zuYmuQru k1Mw== 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=fOaBH1L5; 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 g18-v6si1105099wrs.292.2018.07.26.06.11.09; Thu, 26 Jul 2018 06:11:12 -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=fOaBH1L5; 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 5155A267783; Thu, 26 Jul 2018 15:11:07 +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 BFE95267784; Thu, 26 Jul 2018 15:11:04 +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 960ED26776E for ; Thu, 26 Jul 2018 15:11:00 +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=U93c6PjDdUOJaY3DvRv4EIJgjchvO7EYvWM40guxJ8w=; b=fOaBH1L5tJgi pOaG/a18+DfHCWxzissYQfakJIhtEiY5RKI7TJxjN/DOuJCaZAwbmtHdCcseuZL2idlMn+BVqZuZC p2FWWUAhh2LE4oeo1JEjvJvSBlOG/VhjDQK/BInuE/IXokFrFqGkdFSE3yAuGRMYDOme7DkV0bOGU FJaCE=; Received: from 92.40.249.3.threembb.co.uk ([92.40.249.3] helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fig2j-0007c6-G5; Thu, 26 Jul 2018 13:10:57 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id B4661440078; Thu, 26 Jul 2018 14:10:56 +0100 (BST) From: Mark Brown To: Akshu Agrawal In-Reply-To: Message-Id: <20180726131056.B4661440078@finisterre.ee.mobilebroadband> Date: Thu, 26 Jul 2018 14:10:56 +0100 (BST) Cc: Adam Thomson , Mark Brown , alsa-devel@alsa-project.org 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 c183fec10ae6b3d1dfb77471d4158e576f6b43ae 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 f42606e5879e..cd3cf6e691a9 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 @@ -320,11 +322,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);