Skip to contentSkip to conversation

ARM: Samsung S5P: Move the common Samsung S5P series GPIO level type

PATCH In review Kyungmin Park 3 participants 5 messages Aug 30, 2010 – Sep 1, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 ARM: Samsung S5P: Move the common Samsung S5P series GPIO level type

From: Kyungmin Park <[email protected]>

Samsung S5P series has common level type. It's different from S3C series.

---
 arch/arm/plat-samsung/include/plat/gpio-core.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/plat-samsung/include/plat/gpio-core.h +6 -0
index e358c7d..c8681e0 100644
@@ -14,6 +14,12 @@
 #define GPIOCON_OFF	(0x00)
 #define GPIODAT_OFF	(0x04)
 
+#define S5P_GPIO_LEVEL_LOW		(0x00)
+#define S5P_GPIO_LEVEL_HIGH		(0x01)
+#define S5P_GPIO_EDGE_FALLING		(0x02)
+#define S5P_GPIO_EDGE_RISING		(0x03)
+#define S5P_GPIO_EDGE_BOTH		(0x04)
+
 #define con_4bit_shift(__off) ((__off) * 4)
 
 /* Define the core gpiolib support functions that the s3c platforms may
Signature · 1 line
1.5.3.3
#1 lore raw

Hello.

Quoted 5 lines · Kyungmin Park

From: Kyungmin Park <[email protected]>

Samsung S5P series has common level type. It's different from S3C series.

[...]

arch/arm/plat-samsung/include/plat/gpio-core.h line 21

Quoted 13 lines
arch/arm/plat-samsung/include/plat/gpio-core.h +5 -0
index e358c7d..c8681e0 100644
@@ -14,6 +14,12 @@
 #define GPIOCON_OFF	(0x00)
 #define GPIODAT_OFF	(0x04)
 
+#define S5P_GPIO_LEVEL_LOW		(0x00)
+#define S5P_GPIO_LEVEL_HIGH		(0x01)
+#define S5P_GPIO_EDGE_FALLING		(0x02)
+#define S5P_GPIO_EDGE_RISING		(0x03)
+#define S5P_GPIO_EDGE_BOTH		(0x04)

The parens are useless here.

WBR, Sergei

#2 lore raw
In reply to Kyungmin Park

Review

Quoted 11 lines · Kyungmin Park

From: Kyungmin Park <[email protected]>

Samsung S5P series has common level type. It's different from S3C series.

---
 arch/arm/plat-samsung/include/plat/gpio-core.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/arch/arm/plat-

arch/arm/plat-samsung/include/plat/gpio-core.h line 21

Quoted 13 lines

samsung/include/plat/gpio-core.h
index e358c7d..c8681e0 100644

arch/arm/plat-samsung/include/plat/gpio-core.h +5 -0
@@ -14,6 +14,12 @@
 #define GPIOCON_OFF	(0x00)
 #define GPIODAT_OFF	(0x04)
 
+#define S5P_GPIO_LEVEL_LOW		(0x00)
+#define S5P_GPIO_LEVEL_HIGH		(0x01)
+#define S5P_GPIO_EDGE_FALLING		(0x02)
+#define S5P_GPIO_EDGE_RISING		(0x03)
+#define S5P_GPIO_EDGE_BOTH		(0x04)

Why should we change the name of definition from S5P_EXTINT_XXX? If we use that, we don't need to change other files.

arch/arm/plat-samsung/include/plat/gpio-core.h

Quoted 5 lines
arch/arm/plat-samsung/include/plat/gpio-core.h +1 -1
+
 #define con_4bit_shift(__off) ((__off) * 4)
 
 /* Define the core gpiolib support functions that the s3c platforms may
--

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#3 lore raw
Quoted 21 lines · Kukjin Kim

Review

Quoted 11 lines · Kyungmin Park

From: Kyungmin Park <[email protected]>

Samsung S5P series has common level type. It's different from S3C series.

---
?arch/arm/plat-samsung/include/plat/gpio-core.h | ? ?6 ++++++ ?1 files changed, 6 insertions(+), 0 deletions(-)

(quoted diff) +0 -0

b/arch/arm/plat-

Quoted 8 lines

samsung/include/plat/gpio-core.h
index e358c7d..c8681e0 100644

arch/arm/plat-samsung/include/plat/gpio-core.h +0 -0
@@ -14,6 +14,12 @@
 ?#define GPIOCON_OFF ?(0x00)
 ?#define GPIODAT_OFF ?(0x04)
 
Quoted 8 lines

arch/arm/plat-samsung/include/plat/gpio-core.h line 21

Quoted 5 lines
arch/arm/plat-samsung/include/plat/gpio-core.h +5 -0
+#define S5P_GPIO_LEVEL_LOW ? ? ? ? ? (0x00)
+#define S5P_GPIO_LEVEL_HIGH ? ? ? ? ?(0x01)
+#define S5P_GPIO_EDGE_FALLING ? ? ? ? ? ? ? ?(0x02)
+#define S5P_GPIO_EDGE_RISING ? ? ? ? (0x03)
+#define S5P_GPIO_EDGE_BOTH ? ? ? ? ? (0x04)

Why should we change the name of definition from S5P_EXTINT_XXX? If we use that, we don't need to change other files.

External interrupt is one of GPIOs. and it's used for GPIO interrupt. Do you want to use the EXTINT at generic gpio function?

Also change the name format as IRQ_TYPE_* style.

Thank you,
Kyungmin Park

Quoted 16 lines
Quoted 6 lines
arch/arm/plat-samsung/include/plat/gpio-core.h +1 -0
+
 ?#define con_4bit_shift(__off) ((__off) * 4)
 

?/* Define the core gpiolib support functions that the s3c platforms may --

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#4 lore raw
Quoted 7 lines · Kyungmin Park
Quoted 5 lines · Kukjin Kim
Quoted 4 lines · Kyungmin Park

From: Kyungmin Park <[email protected]>

Samsung S5P series has common level type. It's different from S3C

series.

Quoted 25 lines
Quoted 16 lines

Review

Quoted 7 lines

---
 arch/arm/plat-samsung/include/plat/gpio-core.h |    6 ++++++

 1 files changed, 6 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/arch/arm/plat-

Quoted 8 lines

samsung/include/plat/gpio-core.h
index e358c7d..c8681e0 100644

arch/arm/plat-samsung/include/plat/gpio-core.h +0 -0
@@ -14,6 +14,12 @@
  #define GPIOCON_OFF  (0x00)
  #define GPIODAT_OFF  (0x04)
 
Quoted 8 lines

arch/arm/plat-samsung/include/plat/gpio-core.h line 21

Quoted 5 lines
arch/arm/plat-samsung/include/plat/gpio-core.h +5 -0
+#define S5P_GPIO_LEVEL_LOW           (0x00)
+#define S5P_GPIO_LEVEL_HIGH          (0x01)
+#define S5P_GPIO_EDGE_FALLING                (0x02)
+#define S5P_GPIO_EDGE_RISING         (0x03)
+#define S5P_GPIO_EDGE_BOTH           (0x04)

Why should we change the name of definition from S5P_EXTINT_XXX? If we use that, we don't need to change other files.

Quoted 3 lines

External interrupt is one of GPIOs. and it's used for GPIO interrupt. Do you want to use the EXTINT at generic gpio function?

Right, it is one of the GPIO pin's usage.
But it doesn't mean that should be used like/with generic GPIO... Even though the value of their polarity is same.

Anyway,...let's think about that again.

Quoted 2 lines

Also change the name format as IRQ_TYPE_* style.

(snip)

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.