From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751336AbdAQVVI (ORCPT ); Tue, 17 Jan 2017 16:21:08 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:36906 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750888AbdAQVVG (ORCPT ); Tue, 17 Jan 2017 16:21:06 -0500 Date: Wed, 18 Jan 2017 08:20:34 +1100 From: Thomas Petazzoni To: Icenowy Zheng Cc: =?UTF-8?B?TXlsw6huZQ==?= Josserand , mturquette@baylibre.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, sboyd@codeaurora.org, maxime.ripard@free-electrons.com, tiwai@suse.com, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, alexandre.belloni@free-electrons.com, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, wens@csie.org, robh+dt@kernel.org Subject: Re: [PATCH v2 03/10] dt-bindings: sound: Add new reset compatible for sun4i-i2s Message-ID: <20170118082034.62a6be25@free-electrons.com> In-Reply-To: <20170117201016.A5fiHT0P@smtp2p.mail.yandex.net> References: <20170117201016.A5fiHT0P@smtp2p.mail.yandex.net> Organization: Free Electrons X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Wed, 18 Jan 2017 01:10:00 +0800, Icenowy Zheng wrote: > > Add a new compatible for sun4i-i2s driver to handle some > > SoCs that have a reset line that must be asserted/deasserted. > > > > This new compatible, "allwinner,sun6i-a31-i2s", requires two > > properties: > > - resets: phandle to the reset line > > - reset-names: the name of the reset line ("rst"). > > Except these differences, the compatible is identical to previous one > > which will not handle a reset line. > > But I think the IP block is identical, right? > > Should a new compatible be added only for reset-line? Having a different compatible in this case allows to make some stricter error checking: the driver can make sure that if the compatible string is sun6i-a31-i2s there *IS* a reset line specified in the DT. Without a separate compatible value, such a check is not possible, and the reset line is just optional. This can lead to people being confused if they forget to specify the reset line. Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Subject: Re: [PATCH v2 03/10] dt-bindings: sound: Add new reset compatible for sun4i-i2s Date: Wed, 18 Jan 2017 08:20:34 +1100 Message-ID: <20170118082034.62a6be25@free-electrons.com> References: <20170117201016.A5fiHT0P@smtp2p.mail.yandex.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20170117201016.A5fiHT0P@smtp2p.mail.yandex.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Icenowy Zheng Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, wens@csie.org, linux-kernel@vger.kernel.org, mturquette@baylibre.com, tiwai@suse.com, sboyd@codeaurora.org, lgirdwood@gmail.com, robh+dt@kernel.org, perex@perex.cz, linux-sunxi@googlegroups.com, broonie@kernel.org, alexandre.belloni@free-electrons.com, maxime.ripard@free-electrons.com, =?UTF-8?B?TXlsw6huZQ==?= Josserand , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org List-Id: devicetree@vger.kernel.org Hello, On Wed, 18 Jan 2017 01:10:00 +0800, Icenowy Zheng wrote: > > Add a new compatible for sun4i-i2s driver to handle some > > SoCs that have a reset line that must be asserted/deasserted. > > > > This new compatible, "allwinner,sun6i-a31-i2s", requires two > > properties: > > - resets: phandle to the reset line > > - reset-names: the name of the reset line ("rst"). > > Except these differences, the compatible is identical to previous one > > which will not handle a reset line. > > But I think the IP block is identical, right? > > Should a new compatible be added only for reset-line? Having a different compatible in this case allows to make some stricter error checking: the driver can make sure that if the compatible string is sun6i-a31-i2s there *IS* a reset line specified in the DT. Without a separate compatible value, such a check is not possible, and the reset line is just optional. This can lead to people being confused if they forget to specify the reset line. Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni) Date: Wed, 18 Jan 2017 08:20:34 +1100 Subject: [PATCH v2 03/10] dt-bindings: sound: Add new reset compatible for sun4i-i2s In-Reply-To: <20170117201016.A5fiHT0P@smtp2p.mail.yandex.net> References: <20170117201016.A5fiHT0P@smtp2p.mail.yandex.net> Message-ID: <20170118082034.62a6be25@free-electrons.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hello, On Wed, 18 Jan 2017 01:10:00 +0800, Icenowy Zheng wrote: > > Add a new compatible for sun4i-i2s driver to handle some > > SoCs that have a reset line that must be asserted/deasserted. > > > > This new compatible, "allwinner,sun6i-a31-i2s", requires two > > properties: > > - resets: phandle to the reset line > > - reset-names: the name of the reset line ("rst"). > > Except these differences, the compatible is identical to previous one > > which will not handle a reset line. > > But I think the IP block is identical, right? > > Should a new compatible be added only for reset-line? Having a different compatible in this case allows to make some stricter error checking: the driver can make sure that if the compatible string is sun6i-a31-i2s there *IS* a reset line specified in the DT. Without a separate compatible value, such a check is not possible, and the reset line is just optional. This can lead to people being confused if they forget to specify the reset line. Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com