Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1474206 > unrolled thread
| Started by | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| First post | 2016-09-01 11:30 +0200 |
| Last post | 2016-09-01 13:20 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 5/6] ARM: dts: s3c2416: Use macros for pinctrl configuration Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-09-01 11:30 +0200
Re: [PATCH 5/6] ARM: dts: s3c2416: Use macros for pinctrl configuration Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2016-09-01 13:10 +0200
Re: [PATCH 5/6] ARM: dts: s3c2416: Use macros for pinctrl configuration Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-09-01 13:20 +0200
Re: [PATCH 5/6] ARM: dts: s3c2416: Use macros for pinctrl configuration Arnd Bergmann <arnd@arndb.de> - 2016-09-01 13:20 +0200
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Date | 2016-09-01 11:30 +0200 |
| Subject | [PATCH 5/6] ARM: dts: s3c2416: Use macros for pinctrl configuration |
| Message-ID | <scwtP-81r-1@gated-at.bofh.it> |
Usage of DTS macros instead of hard-coded numbers makes code easier
to read. One does not have to remember which value means pull-up/down
or specific driver strength.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
arch/arm/boot/dts/s3c2416-pinctrl.dtsi | 38 ++++++++++++++++++----------------
1 file changed, 20 insertions(+), 18 deletions(-)
diff --git a/arch/arm/boot/dts/s3c2416-pinctrl.dtsi b/arch/arm/boot/dts/s3c2416-pinctrl.dtsi
index 527e3193817f..6274359fb323 100644
--- a/arch/arm/boot/dts/s3c2416-pinctrl.dtsi
+++ b/arch/arm/boot/dts/s3c2416-pinctrl.dtsi
@@ -8,6 +8,8 @@
* published by the Free Software Foundation.
*/
+#include <dt-bindings/pinctrl/samsung.h>
+
&pinctrl_0 {
/*
* Pin banks
@@ -83,91 +85,91 @@
uart0_data: uart0-data {
samsung,pins = "gph-0", "gph-1";
- samsung,pin-function = <2>;
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
};
uart0_fctl: uart0-fctl {
samsung,pins = "gph-8", "gph-9";
- samsung,pin-function = <2>;
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
};
uart1_data: uart1-data {
samsung,pins = "gph-2", "gph-3";
- samsung,pin-function = <2>;
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
};
uart1_fctl: uart1-fctl {
samsung,pins = "gph-10", "gph-11";
- samsung,pin-function = <2>;
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
};
uart2_data: uart2-data {
samsung,pins = "gph-4", "gph-5";
- samsung,pin-function = <2>;
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
};
uart2_fctl: uart2-fctl {
samsung,pins = "gph-6", "gph-7";
- samsung,pin-function = <2>;
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
};
uart3_data: uart3-data {
samsung,pins = "gph-6", "gph-7";
- samsung,pin-function = <2>;
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
};
extuart_clk: extuart-clk {
samsung,pins = "gph-12";
- samsung,pin-function = <2>;
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
};
i2c0_bus: i2c0-bus {
samsung,pins = "gpe-14", "gpe-15";
- samsung,pin-function = <2>;
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
};
spi0_bus: spi0-bus {
samsung,pins = "gpe-11", "gpe-12", "gpe-13";
- samsung,pin-function = <2>;
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
};
sd0_clk: sd0-clk {
samsung,pins = "gpe-5";
- samsung,pin-function = <2>;
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
};
sd0_cmd: sd0-cmd {
samsung,pins = "gpe-6";
- samsung,pin-function = <2>;
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
};
sd0_bus1: sd0-bus1 {
samsung,pins = "gpe-7";
- samsung,pin-function = <2>;
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
};
sd0_bus4: sd0-bus4 {
samsung,pins = "gpe-8", "gpe-9", "gpe-10";
- samsung,pin-function = <2>;
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
};
sd1_cmd: sd1-cmd {
samsung,pins = "gpl-8";
- samsung,pin-function = <2>;
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
};
sd1_clk: sd1-clk {
samsung,pins = "gpl-9";
- samsung,pin-function = <2>;
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
};
sd1_bus1: sd1-bus1 {
samsung,pins = "gpl-0";
- samsung,pin-function = <2>;
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
};
sd1_bus4: sd1-bus4 {
samsung,pins = "gpl-1", "gpl-2", "gpl-3";
- samsung,pin-function = <2>;
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
};
};
--
1.9.1
[toc] | [next] | [standalone]
| From | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> |
|---|---|
| Date | 2016-09-01 13:10 +0200 |
| Message-ID | <scy2C-11X-25@gated-at.bofh.it> |
| In reply to | #1474206 |
Hi,
On Thursday, September 01, 2016 11:21:54 AM Krzysztof Kozlowski wrote:
> Usage of DTS macros instead of hard-coded numbers makes code easier
> to read. One does not have to remember which value means pull-up/down
> or specific driver strength.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> ---
> arch/arm/boot/dts/s3c2416-pinctrl.dtsi | 38 ++++++++++++++++++----------------
> 1 file changed, 20 insertions(+), 18 deletions(-)
>
> diff --git a/arch/arm/boot/dts/s3c2416-pinctrl.dtsi b/arch/arm/boot/dts/s3c2416-pinctrl.dtsi
> index 527e3193817f..6274359fb323 100644
> --- a/arch/arm/boot/dts/s3c2416-pinctrl.dtsi
> +++ b/arch/arm/boot/dts/s3c2416-pinctrl.dtsi
> @@ -8,6 +8,8 @@
> * published by the Free Software Foundation.
> */
>
> +#include <dt-bindings/pinctrl/samsung.h>
> +
> &pinctrl_0 {
> /*
> * Pin banks
> @@ -83,91 +85,91 @@
>
> uart0_data: uart0-data {
> samsung,pins = "gph-0", "gph-1";
> - samsung,pin-function = <2>;
> + samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
Shouldn't macros that are also used by s3c* be named as
SAMSUNG_PIN_FUNC_2 etc. (s3c* SoCs are not Exynos)?
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
[toc] | [prev] | [next] | [standalone]
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Date | 2016-09-01 13:20 +0200 |
| Message-ID | <scych-16c-3@gated-at.bofh.it> |
| In reply to | #1474287 |
On 09/01/2016 12:59 PM, Bartlomiej Zolnierkiewicz wrote:
>
> Hi,
>
> On Thursday, September 01, 2016 11:21:54 AM Krzysztof Kozlowski wrote:
>> Usage of DTS macros instead of hard-coded numbers makes code easier
>> to read. One does not have to remember which value means pull-up/down
>> or specific driver strength.
>>
>> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
>> ---
>> arch/arm/boot/dts/s3c2416-pinctrl.dtsi | 38 ++++++++++++++++++----------------
>> 1 file changed, 20 insertions(+), 18 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/s3c2416-pinctrl.dtsi b/arch/arm/boot/dts/s3c2416-pinctrl.dtsi
>> index 527e3193817f..6274359fb323 100644
>> --- a/arch/arm/boot/dts/s3c2416-pinctrl.dtsi
>> +++ b/arch/arm/boot/dts/s3c2416-pinctrl.dtsi
>> @@ -8,6 +8,8 @@
>> * published by the Free Software Foundation.
>> */
>>
>> +#include <dt-bindings/pinctrl/samsung.h>
>> +
>> &pinctrl_0 {
>> /*
>> * Pin banks
>> @@ -83,91 +85,91 @@
>>
>> uart0_data: uart0-data {
>> samsung,pins = "gph-0", "gph-1";
>> - samsung,pin-function = <2>;
>> + samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
>
> Shouldn't macros that are also used by s3c* be named as
> SAMSUNG_PIN_FUNC_2 etc. (s3c* SoCs are not Exynos)?
Right, this is the inconsistency. The problem with "samsung" prefix is
that there is no guarantee it will be like that for newer SoCs. How
about one of:
1. using the oldest prefix (S3C24XX in this case),
2. duplicating them per SoC family (so S3C24XX, S3C64XX, EXYNOS).
?
Best regards,
Krzysztof
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-09-01 13:20 +0200 |
| Message-ID | <scych-16c-23@gated-at.bofh.it> |
| In reply to | #1474291 |
On Thursday, September 1, 2016 1:12:18 PM CEST Krzysztof Kozlowski wrote: > > > > Shouldn't macros that are also used by s3c* be named as > > SAMSUNG_PIN_FUNC_2 etc. (s3c* SoCs are not Exynos)? > > Right, this is the inconsistency. The problem with "samsung" prefix is > that there is no guarantee it will be like that for newer SoCs. How > about one of: > 1. using the oldest prefix (S3C24XX in this case), > 2. duplicating them per SoC family (so S3C24XX, S3C64XX, EXYNOS). > ? I'd suggest living with the inconsistency and using EXYNOS as the prefix, as that is the most common one these days, even if the other ones predate it. Arnd
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web