Received: by 10.223.185.116 with SMTP id b49csp2630018wrg; Mon, 5 Mar 2018 06:17:22 -0800 (PST) X-Google-Smtp-Source: AG47ELtfSIMFYUIgj54LUHod12yeVn2UbgkaGNuzyR6VNJiYYmvVs5j4T4p8kUucgGxqNpsG209U X-Received: by 2002:a17:902:14cb:: with SMTP id y11-v6mr13501238plg.209.1520259442635; Mon, 05 Mar 2018 06:17:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520259442; cv=none; d=google.com; s=arc-20160816; b=TFwSLZS7lgkNy6VzwgGp5cvhVEG75M4AP9sZ1Fj42xRTSu90Xk+xSmZn3eEXiP5tQe Sdkd0qw396NEcmSbKRW72tPs+hJvm0ELeVAXTYrfYIAul9LTNETkcSGjKL+Y8PZqwRYc 1BbItzH9SFBY7e8wSdllInAHUXCKxyZf0hTbUsp7tmKkUIpzPC1vtCF6tUHABFKKwrHF GGe0ywHzCvyg+8VPdQXhcjXDO6b8dnoC0eYFibGQmwctO3ozTCYzFeHNhAHnt1FapUbH vIEfETaoTc6l8vJyvXOavlDixpYjSLBaqnfwZoTbF9eWZIGjKJBUE4gzf5JkrijH443Z lgaw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=5Q/QGokpRui4/YCQfkzCWSs31/V6KX9GLHIVrXQ6zmM=; b=uiPp2LauSPcwroZB015E7b6NZSIEhvrotEQU6vRgPu1lxMc3iAxWCyKLk73wSoId3G paIVWuaLrW4okeLLrKEHOtNph/4iVrEKsG+51bOde/GfA5a/E23nvRXMjIt57KtEMmzi YqQCPWHVaIc17yd8q4/ygZXU5h9dPTD0Frf5CGSXxLiB5Hd2/kPVnxLrJdB8Mt83CBI1 PgjavI5Y2O9mhFXfPJ8fJkSr18PGE8VQOtEK/2xUJcMqyqccAX0iZUJXRbpVP9+wBUK7 eSYl8oL4uIjU9E9AdqF1ZSzPBvbzo8GyLrzZV2xmh4alVf/i18d4yZRntSM0zUvLNO3d B/vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=n3UVGtNe; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f11-v6si4870180plj.748.2018.03.05.06.17.08; Mon, 05 Mar 2018 06:17:22 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=n3UVGtNe; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934962AbeCEMxY (ORCPT + 99 others); Mon, 5 Mar 2018 07:53:24 -0500 Received: from fllnx209.ext.ti.com ([198.47.19.16]:10767 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934693AbeCEMxW (ORCPT ); Mon, 5 Mar 2018 07:53:22 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id w25CpMBN014485; Mon, 5 Mar 2018 06:51:22 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1520254282; bh=r1QaZ22ofiBcRbXCJ2T/GhL4WAXUdWX24ZmmZdXfKkA=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=n3UVGtNe71mQ7ZXT2evTSQaqMbXSBPntDFK16CqX5FAYuGdjWlK29aVf4WsXWodpT g/ijzCTy9shdXfsUIq8OkchYOyz+jR4qeRNdPvEKcGpbQAxPskpyZ/vJiUGCLxpbz7 4//diqsD9uUWPYwEcAwwXai1phYgQi4hXYnVD2Z0= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w25CpMSp015150; Mon, 5 Mar 2018 06:51:22 -0600 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 5 Mar 2018 06:51:21 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 5 Mar 2018 06:51:21 -0600 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w25CpFNQ008845; Mon, 5 Mar 2018 06:51:16 -0600 Subject: Re: [PATCHv3] tlv320dac33: Add device tree bindings To: Pavel Machek , Mark Brown CC: , , , , , , , , , , , linux-arm-kernel , , , , , , , , , , , , =?UTF-8?Q?Filip_Matijevi=c4=87?= References: <20180129230539.GA18280@amd> <20180131190112.GA31608@amd> <20b9ff40-a869-a165-07a2-2a103830efb3@ti.com> <20180205082445.GA18274@amd> <20180206121122.GG5681@sirena.org.uk> <20180206134906.GA7842@amd> <20180206152722.GH5681@sirena.org.uk> <20180224205704.GB5132@amd> From: Peter Ujfalusi Message-ID: <3edfbd7c-c8f8-f031-30d2-90b441e63688@ti.com> Date: Mon, 5 Mar 2018 14:52:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180224205704.GB5132@amd> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2018-02-24 22:57, Pavel Machek wrote: > On Tue 2018-02-06 15:27:22, Mark Brown wrote: >> On Tue, Feb 06, 2018 at 02:49:06PM +0100, Pavel Machek wrote: >>> On Tue 2018-02-06 12:11:22, Mark Brown wrote: >> >>>> Please submit patches using subject lines reflecting the style for the >>>> subsystem. This makes it easier for people to identify relevant >>>> patches. Look at what existing commits in the area you're changing are >>>> doing and make sure your subject lines visually resemble what they're >>>> doing. >> >>> AFAICT this goes to Documentation, not sound. >> >> Even if that were the case you're not following the commonly accepted >> practice there either. >> >>> If you have any comments on V1 of this patch, that would be nice, I'd >>> like to get that merged once we are finished with the bindings. >> >> It is the middle of the merge window, please be a bit more patient. > > For the record, patch currently looks like this. If you have some > comments on the code, I'd like to hear them. > > Best regards, > diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c > index 8c71d2f..7302789 100644 > --- a/sound/soc/codecs/tlv320dac33.c > +++ b/sound/soc/codecs/tlv320dac33.c ... > @@ -1511,10 +1509,26 @@ static int dac33_i2c_probe(struct i2c_client *client, > > i2c_set_clientdata(client, dac33); > > - dac33->power_gpio = pdata->power_gpio; > - dac33->burst_bclkdiv = pdata->burst_bclkdiv; > - dac33->keep_bclk = pdata->keep_bclk; > - dac33->mode1_latency = pdata->mode1_latency; > + if (pdata) { > + dac33->power_gpio = pdata->power_gpio; > + dac33->burst_bclkdiv = pdata->burst_bclkdiv; > + dac33->keep_bclk = pdata->keep_bclk; > + dac33->mode1_latency = pdata->mode1_latency; > + } else if (np) { > + ret = of_get_named_gpio(np, "power-gpios", 0); > + if (ret >= 0) > + dac33->power_gpio = ret; > + else > + dac33->power_gpio = -1; the code checks for (dac33->power_gpio >= 0) in live path, I guess you can just skip the power_gpio = -1 in case we don't have GPIO Handling of EPROBE_DEFER might be something we might want for the GPIO. > + > + if (of_property_read_bool(np, "ti,keep-bclk")) > + dac33->keep_bclk = true; > + > + of_property_read_u32(np, "ti,burst-bclkdiv", &dac33->burst_bclkdiv); > + } else { > + dev_err(&client->dev, "Platform data not set\n"); > + return -ENODEV; > + } > if (!dac33->mode1_latency) > dac33->mode1_latency = 10000; /* 10ms */ > dac33->irq = client->irq; > @@ -1580,9 +1594,16 @@ static const struct i2c_device_id tlv320dac33_i2c_id[] = { > }; > MODULE_DEVICE_TABLE(i2c, tlv320dac33_i2c_id); > > +static const struct of_device_id tlv320dac33_of_match[] = { > + { .compatible = "ti,tlv320dac33", }, > + {}, > +}; > +MODULE_DEVICE_TABLE(i2c, tlv320dac33_of_match); > + > static struct i2c_driver tlv320dac33_i2c_driver = { > .driver = { > .name = "tlv320dac33-codec", > + .of_match_table = of_match_ptr(tlv320dac33_of_match), > }, > .probe = dac33_i2c_probe, > .remove = dac33_i2c_remove, > > - P?ter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki