Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3753449imu; Sun, 11 Nov 2018 23:07:57 -0800 (PST) X-Google-Smtp-Source: AJdET5eVrvV67NdJOlVkm6W5hCy23Zo+9lkByO3NZOqEVlvxY6nH/I5Dzp5sRjDVglpiDbmQDjEO X-Received: by 2002:a17:902:d705:: with SMTP id w5-v6mr18209264ply.11.1542006477197; Sun, 11 Nov 2018 23:07:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542006477; cv=none; d=google.com; s=arc-20160816; b=ubR6tgV2JbosvROx4STg6fx6pkovkrrNEqQH7Pre9mt26HEDmXqi5peAUu816CR3kT tbFsEaKzwSEAmgmvFVv3faHG2xqOrrm8qgeKGfUsf73S4HBmJDn/9BpZ35/j0qxehdJz ynA6lnTtFeibAGN17tfZxf1G7hZwxGtOdJ6H0LhHw7+ozdiAvcoCUY6ZSgLOONwDPnyz oFL2zkP+roHL5PuBsHyt29NTmQaggezOGP771G6AMNo4+xHnGZUjgNxmTSJ/vv/hARpT jfT4dNzo0dfmfK7fxzoWY5rD8EpChlahNd1fZerTSrXpvd7Xywji/ourVOG+FF2F9A/R S1YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=whYD6MxC+aJt0lLAkurxqD0uuCnoZcibs2tNJ2nqJwU=; b=LqdlRobVwV/aT+104Bk9HG7aACZ3NqdJLky9S9OntzPBcC8JDEsR0HPR1tvp5++ck/ Ihwsx3rT8p2c5Umg9j33zCVHd0II3G3qfwfdBF437aWn76xEizX75MGtzzpCZLNBN0BR rr13ce1Su0dkWywaKETyYMcOX3rMuud7/iMlrdbju/GGuNlZkUw7pWW/XbLfQ1DKWBZh 3iLsfWme+uYS6C711RvIcL1FvR7bwzt7aX+f9OJj2OPnnY3hz8mwTawmkAPgY1chwwoG Oz2FBgg5YExJGM40SlGu9gJQwl5dP8twRPIZTTIPrXpKSXuHkSpKlJfFPwE7S0dLtWEA Y1zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@birdec.tech header.s=default header.b=rJKFQUQ3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m14si15288721pgd.326.2018.11.11.23.07.34; Sun, 11 Nov 2018 23:07:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@birdec.tech header.s=default header.b=rJKFQUQ3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732025AbeKLQ7H (ORCPT + 99 others); Mon, 12 Nov 2018 11:59:07 -0500 Received: from host.euro-space.net ([87.117.239.2]:53354 "EHLO host.euro-space.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729816AbeKLQ7G (ORCPT ); Mon, 12 Nov 2018 11:59:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=birdec.tech ; s=default; h=References:In-Reply-To:Message-Id:Date: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:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=whYD6MxC+aJt0lLAkurxqD0uuCnoZcibs2tNJ2nqJwU=; b=rJKFQUQ3MaSQzzdLLQyRnHZzKv W1pKOsWUqdE1uFJCd3+9Hsrv3fzre2LWKYKl8doeJDccWURrbn/1v8x5yp8/AZiAoblE9KXxXC2Wc aKbLUApLJyezd2429P9U80IqCJa8U5VEIX16Mhu/EW9C2E7UZjDooNZuXjMxAjUi9n5IDa9h07N1a vkadABoDvimTtGSsG/bvWdeWRY/SeoKZwzpeBhA+RUCO9a53eYbJNQ5aO2xtwxILtS8GNWhJMC8NB 7+Ja8Z1Vlcw+IAg6xgGsrZxEoDT1J57PYeK+cTEL0q4MgHlzjsgSbOKpPBHWD3t6kR+KGBKcn5MUs j4maKaNQ==; Received: from x4e33ae63.dyn.telefonica.de ([78.51.174.99]:51016 helo=gentoo0.localdomain) by host.euro-space.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1gM6JR-0002vg-MN; Mon, 12 Nov 2018 07:07:09 +0000 From: Kirill Marinushkin To: Mark Brown Cc: Takashi Iwai , Liam Girdwood , Jaroslav Kysela , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Kirill Marinushkin Subject: [PATCH v2 2/3] ASoC: pcm3060: Add DT property for single-ended output Date: Mon, 12 Nov 2018 08:08:33 +0100 Message-Id: <20181112070834.16979-2-kmarinushkin@birdec.tech> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20181112070834.16979-1-kmarinushkin@birdec.tech> References: <20181105112036.GC5365@sirena.org.uk> <20181112070834.16979-1-kmarinushkin@birdec.tech> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.euro-space.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - birdec.tech X-Get-Message-Sender-Via: host.euro-space.net: authenticated_id: kmarinushkin@birdec.tech X-Authenticated-Sender: host.euro-space.net: kmarinushkin@birdec.tech X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DAC output may be differential (default) or single-ended. Signed-off-by: Kirill Marinushkin --- sound/soc/codecs/pcm3060.c | 14 ++++++++++++++ sound/soc/codecs/pcm3060.h | 1 + 2 files changed, 15 insertions(+) diff --git a/sound/soc/codecs/pcm3060.c b/sound/soc/codecs/pcm3060.c index 494d9d662be8..5f479aa61097 100644 --- a/sound/soc/codecs/pcm3060.c +++ b/sound/soc/codecs/pcm3060.c @@ -274,9 +274,23 @@ EXPORT_SYMBOL(pcm3060_regmap); /* device */ +static void pcm3060_parse_dt(const struct device_node *np, + struct pcm3060_priv *priv) +{ + priv->out_se = of_property_read_bool(np, "ti,out-single-ended"); +} + int pcm3060_probe(struct device *dev) { int rc; + struct pcm3060_priv *priv = dev_get_drvdata(dev); + + if (dev->of_node) + pcm3060_parse_dt(dev->of_node, priv); + + if (priv->out_se) + regmap_update_bits(priv->regmap, PCM3060_REG64, + PCM3060_REG_SE, PCM3060_REG_SE); rc = devm_snd_soc_register_component(dev, &pcm3060_soc_comp_driver, pcm3060_dai, diff --git a/sound/soc/codecs/pcm3060.h b/sound/soc/codecs/pcm3060.h index fd89a68aa8a7..c895cf40ee10 100644 --- a/sound/soc/codecs/pcm3060.h +++ b/sound/soc/codecs/pcm3060.h @@ -25,6 +25,7 @@ struct pcm3060_priv_dai { struct pcm3060_priv { struct regmap *regmap; struct pcm3060_priv_dai dai[PCM3060_DAI_IDS_NUM]; + u8 out_se: 1; }; int pcm3060_probe(struct device *dev); -- 2.13.6