Received: by 10.223.176.5 with SMTP id f5csp4078904wra; Tue, 30 Jan 2018 01:39:31 -0800 (PST) X-Google-Smtp-Source: AH8x2272QIvjg7BltK6kSjyR6oHbzYrwxwLBOdNpwsLxmYuezjIbFnTlriuCQIbUw83w01xDGLpC X-Received: by 2002:a17:902:36a:: with SMTP id 97-v6mr25364829pld.365.1517305171470; Tue, 30 Jan 2018 01:39:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517305171; cv=none; d=google.com; s=arc-20160816; b=HMJGGCkLolyRc8IkKnMWiI060OZQMGjUUeuNEQZoBikKv608DMW7BK5WQnu5TLV8pM CjwSyKHyd63MQKh/XdFPL4Nh5Y0ahUU6LBVot4oyqsvZVoqahdOkzXDEtwNyAyo7MSbZ 8Rkyge0lc63jV1qBtu4nE/DbB2igZvpGsTp+bUX1OOm+cigtwFqhLVn1W4NafF9ju1Tr yT5Ki6yDAkU7wQ+pjhrLeVhO4QY8cF+8dhkJbK3gWkgb5LQfnQ+pgnJQ9Qivj+OlxCjX MXvPvs3v6RWNBu/U0G3CXQgy0v/MaQUmthmX6suA4Ww0WL7itS67Gvfc98uus38+H+Vy 8pSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=NNfqH2/OiIoGbiH/DRiy7xmKlZKyJRePo2P5EdPLZXc=; b=sQ49/T0fKA5udwX8d4UtRBgAv24Kmyeljv9pvonkBwuJS+7VFeDYc4oIzm/ia7l7Z4 aW/g77+NgZcNWWoXYVzMX8UTRhjkjZjWxQgvM8LxyGOLWM5EwmqRppd/k3uEiHIfzUOK U+RKq5b6Iv/7QtWZ3F4TC7h/wmirVNNmR8u8RZAn88ZF6Pcn84Z5700NB2hy2He2SEc1 hGJzGWqfCo7pulVorXStU+JIpWMrdeRylNDicsFeJHWJgUcIcV2fpqU+Puv8pv8oZEIx Vij232mZWwLy29S74zN+hokbAsmvVciwDjaWfxpYJzaspOH2+4GFXLI2XeFGZtH4csZE Oj5Q== ARC-Authentication-Results: i=1; mx.google.com; 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 b6-v6si1567197plx.696.2018.01.30.01.39.16; Tue, 30 Jan 2018 01:39:31 -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; 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 S1751642AbeA3Jir (ORCPT + 99 others); Tue, 30 Jan 2018 04:38:47 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:42754 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751398AbeA3Jin (ORCPT ); Tue, 30 Jan 2018 04:38:43 -0500 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23994720AbeA3JikjG7Qj (ORCPT + 2 others); Tue, 30 Jan 2018 10:38:40 +0100 Date: Tue, 30 Jan 2018 10:38:38 +0100 From: Ladislav Michl To: Filip =?iso-8859-2?Q?Matijevi=E6?= Cc: Pavel Machek , lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, perex@perex.cz, tiwai@suse.com, bhumirks@gmail.com, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, pali.rohar@gmail.com, sre@kernel.org, linux-arm-kernel , linux-omap@vger.kernel.org, tony@atomide.com, khilman@kernel.org, aaro.koskinen@iki.fi, ivo.g.dimitrov.75@gmail.com, patrikbachan@gmail.com, serge@hallyn.com, abcloriens@gmail.com, clayton@craftyguy.net, martijn@brixit.nl, sakari.ailus@linux.intel.com Subject: Re: [PATCH] sound/tlv320dac33: Add device tree support Message-ID: <20180130093838.GA15195@lenoch> References: <20180129230539.GA18280@amd> <20180129232031.GA7695@lenoch> <20180129233301.GA18104@amd> <20180130083446.GA13498@lenoch> <20180130085314.GA4585@amd> <1141b126-b883-a246-85ad-c5a69acb90bb@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1141b126-b883-a246-85ad-c5a69acb90bb@gmail.com> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 30, 2018 at 10:11:02AM +0100, Filip Matijevi? wrote: > Hi, > > On 01/30/2018 09:53 AM, Pavel Machek wrote: > > On Tue 2018-01-30 09:34:46, Ladislav Michl wrote: > >> On Tue, Jan 30, 2018 at 12:33:01AM +0100, Pavel Machek wrote: > >>> On Tue 2018-01-30 00:20:31, Ladislav Michl wrote: > >>>> On Tue, Jan 30, 2018 at 12:05:39AM +0100, Pavel Machek wrote: > >>>>> > >>>>> This adds device tree support to tlv320dac33.c. > >>>>> > >>>>> Signed-off-by: Pavel Machek > >>>>> > >>>>> diff --git a/Documentation/devicetree/bindings/sound/tlv320dac33.txt b/Documentation/devicetree/bindings/sound/tlv320dac33.txt > >>>>> new file mode 100644 > >>>>> index 0000000..6cbd311 > >>>>> --- /dev/null > >>>>> +++ b/Documentation/devicetree/bindings/sound/tlv320dac33.txt > >>>>> @@ -0,0 +1,32 @@ > >>>>> +Texas Instruments - tlv320dac33 Codec module > >>>>> + > >>>>> +The tlv320dac33 serial control bus communicates through I2C protocols. > >>>>> + > >>>>> +Required properties: > >>>>> + > >>>>> +- compatible - "ti,tlv320dac33" > >>>>> +- reg - I2C slave address > >>>>> + > >>>>> +Optional properties: > >>>>> + > >>>>> +- power-gpios - gpio pin to power the device, active high > >>>> > >>>> While driver used gpio in platform data, isn't it more likely > >>>> regulator which powers device? > >>> > >>> power-gpios = <&gpio2 28 0>; /* gpio_60 */ > >>> > >>> Looks like GPIO to me -- example is from Nokia N9. So this appears to > >>> be correct. > >> > >> Device datasheet doesn't list any pin which looks like "power-gpio" > >> http://www.ti.com/lit/ds/symlink/tlv320dac32.pdf > >> Unfortunately I do not know much about N9, but was able to find Nokia 5610 > >> scheme to get clue how could be tlv320dac33 hardwired (see page 2): > >> http://mastermobile.spb.ru/service/nokia_5610_rm-242_service_schematics.pdf > >> Here AVDD is powered by LP3985 voltage regulator which is enabled using > >> VEN pin which might be connected to gpio. Or there could be completely > >> different voltage regulator with different controls. And since Linux > >> already has voltage regulator class, lets not limit ourselves to gpio > >> pins. > > > > Well, notice I'm converting existing driver to device tree. And that > > one already has GPIO dependency. It is possible that more work needs > > to be done there, but that should not be a reason to delay this. Feel > > free to help. Adding DT properties that need to be maintained for compatibility reasons is a bad idea and very good reason to delay merging unfinished stuff. And meanwhile it turned out it is not power-gpio :) > According to N9 schematics > http://www.s-manuals.com/manuals/phone/nokia/nokia_n9_rm-696_service_schematics_v1.pdf > it's in fact GPIO pin that is connected to reset line (labeled > CODEC_RST). So calling it "power" might be misleading, but the driver > code is quite clear as it labels that GPIO as "tlv320dac33 reset" Thanks a lot! So now it is clear that gpio is connected to codec's nRESET pin, therefore "reset-gpios" property seems reasonable here. ladis