From patchwork Fri Jun 12 17:13:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 187852 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp586414ilo; Fri, 12 Jun 2020 10:14:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQkJtRpboYPbi6X/fuwor6Ku+mhGZxo/x9niYA2yCDPRbAsNluyv3Zy59EScu8MbJG2fM2 X-Received: by 2002:a17:906:1ed2:: with SMTP id m18mr1593603ejj.529.1591982089676; Fri, 12 Jun 2020 10:14:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591982089; cv=none; d=google.com; s=arc-20160816; b=GeZIwJp6346kXfQ+Gsa0+ETrIyy5nfBbapoW14WUnS3cZFhXFa2EfoqOWdiNj3W3mg TOCYUEO3BY6C1UfI9Ku7w1DDD2pDVMEAOP7AgBVffst6fpssohTnD5AaeE221ir2WVJt WDJ9Wl1JntHjcJmXq54f0CRVkfZz3Rfur2Onz/fRkAxaD+G+wYONlFcrhKcHpfDYEFcZ 1BqZFenXWT4mme/VvaIgO+qaENYv+4ZKy83zexV+PUqgVzSarorr4xfJgV1emIWl16pM Ygn3+x7hQOC4iuvC877/OeNy6ps6puX7NIWyYFb7wd1YqyRJhb+do/KlGHCkgp+9VhSV aaSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Eh9UAOjUzWioaZG3am18FwLSncclY2ToXxZVUuvMnBA=; b=nrxEkL+chpZ2BJUW87fpkYriH55pCmMskUtBidlZYKKlgycu/RuRdRs2U6ugDPlOum UR+tVwJmxvw8mcyT15NDFEfFLapDMPECfrTWP4biLXU+NTPzNR890+BSwJu1lf2ksf/c OMXzMUWCKNtvTWqV/FiHm6w8dbHr90LOECNmF4uhbudYdvH1+B737hZzhCVpSFYgSYWZ TfypeDMsev7fiIRHFbEl9c7CR24o27/CWNf8H+sfMUBsSpFG1mtUKo4nGg75Du1H7Gw0 rc4k0ClNxXips9zPkekrcF6yv9Fiq2ogJVPupG7KjeoYsDsATwcUpwVhMCBab94mhibu /Ylw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hJLaWsgF; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n18si4148160ejh.52.2020.06.12.10.14.49; Fri, 12 Jun 2020 10:14:49 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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=@ti.com header.s=ti-com-17Q1 header.b=hJLaWsgF; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726602AbgFLROr (ORCPT + 6 others); Fri, 12 Jun 2020 13:14:47 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:36358 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726590AbgFLROq (ORCPT ); Fri, 12 Jun 2020 13:14:46 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 05CHDnO8017540; Fri, 12 Jun 2020 12:13:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1591982029; bh=Eh9UAOjUzWioaZG3am18FwLSncclY2ToXxZVUuvMnBA=; h=From:To:CC:Subject:Date; b=hJLaWsgFf6I92X2hrkEQ03u/3R4RuAl7yB+WHRRIjObdUIpCngLXlxk0248vtM4bz rCeBSRwFzNM0KihxUZbe8mFyn/XzzXCLoeGfmshk/AzdtNx5/MLfs+2gdPopBqteve fMqVJHo3lLkd3ALQu8gegdfsO5YM3mna11XiWVMg= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 05CHDn0t093355; Fri, 12 Jun 2020 12:13:49 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Fri, 12 Jun 2020 12:13:48 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Fri, 12 Jun 2020 12:13:48 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 05CHDm7X123904; Fri, 12 Jun 2020 12:13:48 -0500 From: Dan Murphy To: , , , , , CC: , , , Dan Murphy Subject: [PATCH 1/2] dt-bindings: tas2770: Convert tas2770 binding to yaml Date: Fri, 12 Jun 2020 12:13:41 -0500 Message-ID: <20200612171342.25364-1-dmurphy@ti.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert the tas2770 binding to yaml format. Add in the reset-gpio to the binding as it is in the code but not documented in the binding. Signed-off-by: Dan Murphy --- .../devicetree/bindings/sound/tas2770.txt | 37 --------- .../devicetree/bindings/sound/tas2770.yaml | 76 +++++++++++++++++++ 2 files changed, 76 insertions(+), 37 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/tas2770.txt create mode 100644 Documentation/devicetree/bindings/sound/tas2770.yaml -- 2.26.2 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/sound/tas2770.txt b/Documentation/devicetree/bindings/sound/tas2770.txt deleted file mode 100644 index ede6bb3d9637..000000000000 --- a/Documentation/devicetree/bindings/sound/tas2770.txt +++ /dev/null @@ -1,37 +0,0 @@ -Texas Instruments TAS2770 Smart PA - -The TAS2770 is a mono, digital input Class-D audio amplifier optimized for -efficiently driving high peak power into small loudspeakers. -Integrated speaker voltage and current sense provides for -real time monitoring of loudspeaker behavior. - -Required properties: - - - compatible: - Should contain "ti,tas2770". - - reg: - The i2c address. Should contain <0x4c>, <0x4d>,<0x4e>, or <0x4f>. - - #address-cells - Should be <1>. - - #size-cells - Should be <0>. - - ti,asi-format: - Sets TDM RX capture edge. 0->Rising; 1->Falling. - - ti,imon-slot-no:- TDM TX current sense time slot. - - ti,vmon-slot-no:- TDM TX voltage sense time slot. - -Optional properties: - -- interrupt-parent: the phandle to the interrupt controller which provides - the interrupt. -- interrupts: interrupt specification for data-ready. - -Examples: - - tas2770@4c { - compatible = "ti,tas2770"; - reg = <0x4c>; - #address-cells = <1>; - #size-cells = <0>; - interrupt-parent = <&msm_gpio>; - interrupts = <97 0>; - ti,asi-format = <0>; - ti,imon-slot-no = <0>; - ti,vmon-slot-no = <2>; - }; - diff --git a/Documentation/devicetree/bindings/sound/tas2770.yaml b/Documentation/devicetree/bindings/sound/tas2770.yaml new file mode 100644 index 000000000000..8c667fd37a57 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/tas2770.yaml @@ -0,0 +1,76 @@ +# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause) +# Copyright (C) 2019-20 Texas Instruments Incorporated +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/sound/tas2770.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Texas Instruments TAS2770 Smart PA + +maintainers: + - Shi Fu + +description: | + The TAS2770 is a mono, digital input Class-D audio amplifier optimized for + efficiently driving high peak power into small loudspeakers. + Integrated speaker voltage and current sense provides for + real time monitoring of loudspeaker behavior. + +properties: + compatible: + enum: + - ti,tas2770 + + reg: + maxItems: 1 + description: | + I2C address of the device can be one of these 0x4c, 0x4d, 0x4e or 0x4f + + reset-gpio: + description: GPIO used to reset the device. + + interrupts: + maxItems: 1 + + ti,imon-slot-no: + $ref: /schemas/types.yaml#/definitions/uint32 + description: TDM TX current sense time slot. + + ti,vmon-slot-no: + $ref: /schemas/types.yaml#/definitions/uint32 + description: TDM TX voltage sense time slot. + + ti,asi-format: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Sets TDM RX capture edge. + enum: + - 0 # Rising edge + - 1 # Falling edge + + '#sound-dai-cells': + const: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + i2c0 { + #address-cells = <1>; + #size-cells = <0>; + codec: codec@4c { + compatible = "ti,tas2770"; + reg = <0x4c>; + #sound-dai-cells = <1>; + interrupt-parent = <&gpio1>; + interrupts = <14>; + reset-gpio = <&gpio1 15 0>; + ti,imon-slot-no = <0>; + ti,vmon-slot-no = <2>; + }; + }; + From patchwork Fri Jun 12 17:13:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 187851 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp585944ilo; Fri, 12 Jun 2020 10:14:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbWC45F6ucb7Cg+Cc9wmoZ92exB+kjwTLGnMX78IGnLJFu2vkn9Cs6io31bgJINrFw7kF6 X-Received: by 2002:a17:906:924c:: with SMTP id c12mr15214202ejx.457.1591982055302; Fri, 12 Jun 2020 10:14:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591982055; cv=none; d=google.com; s=arc-20160816; b=tHmJ2pUX2gWKYg2j5T0FPU9jcLJySoIBq3jaA0lcacu1vQutJqDM2P6cVCc/JHrSam VSiy+D/xAgvFF/zEKri0hR7eZbejTfDdxgSHhviCqWEIp//M1HZURSr1tvpETWQwKT9e YBJq2Jw1Cwdi6ydpgEAFpOWXY+JsFFQVaD9Bm/N0wlL75FFWvzEHbaXWEqgaS4vt3LyQ AVc2RA6fM19oIw7yuHtVUGkIWj/kTe5vDx4AslgcM1zrzG4gBaXCzUmIxr1QbObCXHr5 Iz85RPZ7VGsdmUMM+ANv+o1LwoGRC7zp0zqyed/KDtx4He8z+MXQA5Dlhxg9yxek4ZNN NrAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GG9bfFkMnnGI+ZtZozpFxp/t1KnmDeQXwtoe0ZVYcrk=; b=ohazp9LB+LJWt/+ykRaiOvbmKqIkb2waSllS7sNF0YIUZ1V9iLx+H6YPKyeyhVQ7Pf 8+Je25NxHX6DFNoTJQ5BdMV72M3PkgucDhBT/ysv/aKg65z2ULdH7gyhdldMxo+XDJxc hFxAx3IyhYAfVJUMRtBumynZOQ6YgS60qMpGx01bDKK3/pB81BUpomdMGTmgYbouPxdE KaywCFI8CdW28HM6IN6xSG5PWOrSpEziF++FUS1244aAY6064FZtiDps0yjvPoNJPT7U EGtRC0b1a/CUCv9dshbqnyYg1AysqlquL8RFpM63Jdivzh6UDfC2N/6zh75jyK5YKp9E ZjCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=VD1O0gZ9; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b22si3634285edx.194.2020.06.12.10.14.15; Fri, 12 Jun 2020 10:14:15 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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=@ti.com header.s=ti-com-17Q1 header.b=VD1O0gZ9; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726524AbgFLROJ (ORCPT + 6 others); Fri, 12 Jun 2020 13:14:09 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:50770 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726448AbgFLROI (ORCPT ); Fri, 12 Jun 2020 13:14:08 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 05CHDnst022579; Fri, 12 Jun 2020 12:13:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1591982029; bh=GG9bfFkMnnGI+ZtZozpFxp/t1KnmDeQXwtoe0ZVYcrk=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=VD1O0gZ9RR1+8esRq5D7M9dWeTQBn43Cw4GWsCT1oGUwLLSes5hd1rnK/r2gvYgOd pQFn/Q4+XPavYghv1mSOdeBt/ExVYVTkCoeNvLBVy5Nz1en9Vn26NnvqaQt0tWu9YX R5YmJA09o5zDhjOZq/qe0V362uc5lAoUlBPrs55Q= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 05CHDnim081191 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 12 Jun 2020 12:13:49 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Fri, 12 Jun 2020 12:13:49 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Fri, 12 Jun 2020 12:13:49 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 05CHDmIS039818; Fri, 12 Jun 2020 12:13:48 -0500 From: Dan Murphy To: , , , , , CC: , , , Dan Murphy Subject: [PATCH 2/2] ASoC: tas2770: Fix reset gpio property name Date: Fri, 12 Jun 2020 12:13:42 -0500 Message-ID: <20200612171342.25364-2-dmurphy@ti.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200612171342.25364-1-dmurphy@ti.com> References: <20200612171342.25364-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Fix the reset property name when allocating the GPIO descriptor. The gpiod_get_optional appends either the -gpio or -gpios suffix to the name. Fixes: 1a476abc723e6 ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Dan Murphy --- sound/soc/codecs/tas2770.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.26.2 diff --git a/sound/soc/codecs/tas2770.c b/sound/soc/codecs/tas2770.c index 54c8135fe43c..cf071121c839 100644 --- a/sound/soc/codecs/tas2770.c +++ b/sound/soc/codecs/tas2770.c @@ -758,8 +758,7 @@ static int tas2770_i2c_probe(struct i2c_client *client, } } - tas2770->reset_gpio = devm_gpiod_get_optional(tas2770->dev, - "reset-gpio", + tas2770->reset_gpio = devm_gpiod_get_optional(tas2770->dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(tas2770->reset_gpio)) { if (PTR_ERR(tas2770->reset_gpio) == -EPROBE_DEFER) {