From mboxrd@z Thu Jan 1 00:00:00 1970
From: Philipp Zabel
Subject: Re: [PATCH v7 05/15] dt-bindings: Document the STM32 reset bindings
Date: Tue, 05 May 2015 17:42:37 +0200
Message-ID: <1430840557.3035.60.camel@pengutronix.de>
References: <1430410844-16062-1-git-send-email-mcoquelin.stm32@gmail.com>
<1430410844-16062-6-git-send-email-mcoquelin.stm32@gmail.com>
<55433467.2010603@linaro.org>
<5544A069.5000808@linaro.org>
<5548CEA2.8020807@linaro.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Return-path:
In-Reply-To:
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: Maxime Coquelin
Cc: Mark Rutland , "linux-doc@vger.kernel.org" , Linus Walleij , Will Deacon , Stefan Agner , Nikolay Borisov , Peter Meerwald , "linux-api@vger.kernel.org" , Jiri Slaby , Mauro Carvalho Chehab , Linux-Arch , Daniel Thompson , Russell King , Pawel Moll , Jonathan Corbet , Lee Jones , Daniel Lezcano , Chanwoo Choi , Andy Shevchenko , Antti Palosaari , Geert Uytterhoeven "linux-serial@vger.kernel.org"
List-Id: linux-arch.vger.kernel.org
Am Dienstag, den 05.05.2015, 17:19 +0200 schrieb Maxime Coquelin:
> >> For example, includes/dt-bindings/mfd/stm32f4-rcc.h would look like:
> >>
> >> #define GPIOA 0
> >> #define GPIOB 1
> >> ...
> >> #define LTDC 186
That looks a bit fragile.
At least the defines for the indices should be properly namespaced,
check out include/dt-bindings/gpio/tegra-gpio.h for a similar case.
> >> #define STM32F4_RESET(x) (x + 128)
> >> #define STM32F4_CLOCK(x) (x + 384)
> >>
> >> Then, in DT, a reset would be described like this:
> >>
> >> timer2 {
> >> resets = <&rcc STM32F4_RESET(TIM2)>;
> >> };
> >>
> >> Phillip, Daniel, does that look acceptable to you?
> >
> >
> > Doesn't look unreasonable.
> >
> > I am a little uneasy simply because there are very few similar header files
> > in that directory but I haven't thought of a better idea.
>
> Since this file will be shared by both clock and reset drivers, I
> don't see better option.
> I will implement it in v8 if Philipp agrees.
Are the device tree maintainers happy with this idiom spreading?
Except for the point above, I think this is acceptable.
regards
Philipp
From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
Received: from metis.ext.pengutronix.de ([92.198.50.35]:44190 "EHLO
metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S2993451AbbEEPoP (ORCPT
); Tue, 5 May 2015 11:44:15 -0400
Message-ID: <1430840557.3035.60.camel@pengutronix.de>
Subject: Re: [PATCH v7 05/15] dt-bindings: Document the STM32 reset bindings
From: Philipp Zabel
Date: Tue, 05 May 2015 17:42:37 +0200
In-Reply-To:
References: <1430410844-16062-1-git-send-email-mcoquelin.stm32@gmail.com>
<1430410844-16062-6-git-send-email-mcoquelin.stm32@gmail.com>
<55433467.2010603@linaro.org>
<5544A069.5000808@linaro.org>
<5548CEA2.8020807@linaro.org>
Content-Type: text/plain; charset="UTF-8"
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
Sender: linux-arch-owner@vger.kernel.org
List-ID:
To: Maxime Coquelin
Cc: Daniel Thompson , Uwe =?ISO-8859-1?Q?Kleine-K=F6nig?= , Andreas =?ISO-8859-1?Q?F=E4rber?= , Geert Uytterhoeven , Rob Herring , Linus Walleij , Arnd Bergmann , Stefan Agner , Peter Meerwald , Paul Bolle , Peter Hurley , Andy Shevchenko , Chanwoo Choi , Russell King , Daniel Lezcano , Joe Perches , Vladimir Zapolskiy , Jonathan Corbet , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Thomas Gleixner , Greg Kroah-Hartman , Jiri Slaby , Andrew Morton , "David S. Miller" , Mauro Carvalho Chehab , Antti Palosaari , Tejun Heo , Will Deacon , Nikolay Borisov , Rusty Russell , Kees Cook , Michal Marek , "linux-doc@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-gpio@vger.kernel.org" , "linux-serial@vger.kernel.org" , Linux-Arch , "linux-api@vger.kernel.org" , Nicolae Rosia , Kamil Lulko , Lee Jones
Message-ID: <20150505154237.0qeKp7ko84idbLGCSw-StRFagHMHupeT6VXAvCwMZow@z>
Am Dienstag, den 05.05.2015, 17:19 +0200 schrieb Maxime Coquelin:
> >> For example, includes/dt-bindings/mfd/stm32f4-rcc.h would look like:
> >>
> >> #define GPIOA 0
> >> #define GPIOB 1
> >> ...
> >> #define LTDC 186
That looks a bit fragile.
At least the defines for the indices should be properly namespaced,
check out include/dt-bindings/gpio/tegra-gpio.h for a similar case.
> >> #define STM32F4_RESET(x) (x + 128)
> >> #define STM32F4_CLOCK(x) (x + 384)
> >>
> >> Then, in DT, a reset would be described like this:
> >>
> >> timer2 {
> >> resets = <&rcc STM32F4_RESET(TIM2)>;
> >> };
> >>
> >> Phillip, Daniel, does that look acceptable to you?
> >
> >
> > Doesn't look unreasonable.
> >
> > I am a little uneasy simply because there are very few similar header files
> > in that directory but I haven't thought of a better idea.
>
> Since this file will be shared by both clock and reset drivers, I
> don't see better option.
> I will implement it in v8 if Philipp agrees.
Are the device tree maintainers happy with this idiom spreading?
Except for the point above, I think this is acceptable.
regards
Philipp