Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp278344pxx; Wed, 28 Oct 2020 04:51:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLxD/VWU/WlMwTZT4QNIXxB47RE6wybB7s1yVwFePkrx7Tr66VuPCfpdd7zfJBvFE9WLFw X-Received: by 2002:a50:8c24:: with SMTP id p33mr7294317edp.330.1603885864858; Wed, 28 Oct 2020 04:51:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603885864; cv=none; d=google.com; s=arc-20160816; b=Qtfr+qeEUnQUiR5FuQ2qNoxiLXrdAZESZ2idRaSx1jBysKhFaosaTJrl2xnICyrGV2 vb43S4Zx6o8t4NIqzDG5zJP1s/qreh7ya5i76htpDf21HyBA0+Fmr96VrO1aHlqyPujx EUhOGnlhs/+mAFuMCBj2C3jvFE4mHxVIdPQfpW3Dq4DART9tFdO30NXRh6oyZf7aLn90 S8gIzWLg3hk7kTyF0Q1mQFd3OXE5HsFiH0WKl2OxwEhXZWJGLGr/Eyto0USKwGCCFrs0 LY4YRs+brLQpNGttBZrRTz5L3QiumV5aZt+oMCXzrIYhPad62Tq9P9YvQ4669Tt0iT+g JleQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lKbvOtsKnxtencI9edR0PAzUtZHvE1ZGVQn71NgZ1J0=; b=XolLzP7Cp7KrQlV5jQet6TiSdZZgyts9bLnzUJNYrTH3s1y3A0dVLQLvC035sHma4X JGffErl05DyrJkCA5SywqZ5UC2qhYK5YYpQvnpZzo5VFj/dLAwfMl142BiGr8bE13R6/ Wp3axo6wu5VIqswQ3ttnOhpfWZBERSUJLmnf4YA9K0aPrkUUML4+ILkbW15+b+9INNsr rduhk8H1YazySRu1OrmlUnNKV+UB07j2EGnZI6MsNdyzeEiOaCOM+5zJBWYbmloT6z56 F7Fg0fNfJHzNLUkU6+2L5RxBbk2olnUx3y3jMoK1HCs5MGEmshuIi+qhe8kdfAIfZQh/ nOag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ynm3FIkB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b29si2827715edn.354.2020.10.28.04.50.42; Wed, 28 Oct 2020 04:51:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ynm3FIkB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1794624AbgJ0PMn (ORCPT + 99 others); Tue, 27 Oct 2020 11:12:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:33750 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1788787AbgJ0PAg (ORCPT ); Tue, 27 Oct 2020 11:00:36 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 238AF20714; Tue, 27 Oct 2020 15:00:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810834; bh=c3eVX2rW9IL+JatQCuUpN638FaBb3LtCewNoITz+JtE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ynm3FIkBDefFKppmueML7B7wk+fJA4mHa0cPzu9fIH2E6FWfjVcHk2wqhSAm1Ud0d PdQEKBaMTT0L55Gvg2tJXUUHy5PE2/+4+s9NQHkGpWMkxw1IjF1nxkZ99n6amp94CB jmDhmI7u8VAsIjRNNTZQkGEWGaGHf5v5DBqVoOGw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Murphy , Mark Brown , Sasha Levin Subject: [PATCH 5.8 248/633] ASoC: tas2770: Fix required DT properties in the code Date: Tue, 27 Oct 2020 14:49:51 +0100 Message-Id: <20201027135534.312845190@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Murphy [ Upstream commit 4b8ab8a7761fe2ba1c4e741703a848cb8f390f79 ] The devicetree binding indicates that the ti,asi-format, ti,imon-slot-no and ti,vmon-slot-no are not required but the driver requires them or it fails to probe. Honor the binding and allow these entries to be optional and set the corresponding values to the default values for each as defined in the data sheet. Fixes: 1a476abc723e6 ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200918190548.12598-4-dmurphy@ti.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/tas2770.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/sound/soc/codecs/tas2770.c b/sound/soc/codecs/tas2770.c index 4d67b1c160380..f6c3c5aaab653 100644 --- a/sound/soc/codecs/tas2770.c +++ b/sound/soc/codecs/tas2770.c @@ -707,29 +707,28 @@ static int tas2770_parse_dt(struct device *dev, struct tas2770_priv *tas2770) rc = fwnode_property_read_u32(dev->fwnode, "ti,asi-format", &tas2770->asi_format); if (rc) { - dev_err(tas2770->dev, "Looking up %s property failed %d\n", - "ti,asi-format", rc); - goto end; + dev_info(tas2770->dev, "Property %s is missing setting default slot\n", + "ti,asi-format"); + tas2770->asi_format = 0; } rc = fwnode_property_read_u32(dev->fwnode, "ti,imon-slot-no", &tas2770->i_sense_slot); if (rc) { - dev_err(tas2770->dev, "Looking up %s property failed %d\n", - "ti,imon-slot-no", rc); - goto end; + dev_info(tas2770->dev, "Property %s is missing setting default slot\n", + "ti,imon-slot-no"); + tas2770->i_sense_slot = 0; } rc = fwnode_property_read_u32(dev->fwnode, "ti,vmon-slot-no", &tas2770->v_sense_slot); if (rc) { - dev_err(tas2770->dev, "Looking up %s property failed %d\n", - "ti,vmon-slot-no", rc); - goto end; + dev_info(tas2770->dev, "Property %s is missing setting default slot\n", + "ti,vmon-slot-no"); + tas2770->v_sense_slot = 2; } -end: - return rc; + return 0; } static int tas2770_i2c_probe(struct i2c_client *client, -- 2.25.1