Skip to contentSkip to conversation

ARM: EXYNOS: Update CONFIG_ARCH_NR_GPIO for Exynos

PATCH Superseded Sachin Kamat 5 participants 11 messages Jun 24, 2013 – Jul 24, 2013

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: EXYNOS: Update CONFIG_ARCH_NR_GPIO for Exynos

With the recent cleanup in Exynos platform code notably commits 17859bec ("ARM: EXYNOS: Do not select legacy Kconfig symbols any more") and b9222210 ("ARM: EXYNOS: Remove mach/gpio.h"), the definition of ARCH_NR_GPIOS got removed. This started causing problems on SoCs like Exynos4412 which have more (285) than the default number of GPIOs (255). Thus define this number in Kconfig file. Without this patch we get the following errors during boot:

gpiochip_add: gpios 251..258 (gpv0) failed to register samsung-pinctrl 106e0000.pinctrl: failed to register gpio_chip gpv0, error code: -22
samsung-pinctrl: probe of 106e0000.pinctrl failed with error -22

---
Based on Kukjin's for-next tree.

---
 arch/arm/Kconfig |    1 +
 1 file changed, 1 insertion(+)
arch/arm/Kconfig +1 -0
index ddf2667..380a53b 100644
@@ -1578,6 +1578,7 @@ config ARCH_NR_GPIO
 	default 512 if SOC_OMAP5
 	default 392 if ARCH_U8500
 	default 352 if ARCH_VT8500
+	default 288 if ARCH_EXYNOS
 	default 288 if ARCH_SUNXI
 	default 264 if MACH_H4700
 	default 0
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 ARM: EXYNOS: Update CONFIG_ARCH_NR_GPIO for Exynos

Quoted 34 lines · Sachin Kamat

With the recent cleanup in Exynos platform code notably commits 17859bec ("ARM: EXYNOS: Do not select legacy Kconfig symbols any more") and b9222210 ("ARM: EXYNOS: Remove mach/gpio.h"), the definition of ARCH_NR_GPIOS got removed. This started causing problems on SoCs like Exynos4412 which have more (285) than the default number of GPIOs (255). Thus define this number in Kconfig file. Without this patch we get the following errors during boot:

gpiochip_add: gpios 251..258 (gpv0) failed to register samsung-pinctrl 106e0000.pinctrl: failed to register gpio_chip gpv0, error code: -22
samsung-pinctrl: probe of 106e0000.pinctrl failed with error -22

---
Based on Kukjin's for-next tree.

---
 arch/arm/Kconfig |    1 +
 1 file changed, 1 insertion(+)
arch/arm/Kconfig +1 -1
index ddf2667..380a53b 100644
@@ -1578,6 +1578,7 @@ config ARCH_NR_GPIO
        default 512 if SOC_OMAP5
        default 392 if ARCH_U8500
        default 352 if ARCH_VT8500
+       default 288 if ARCH_EXYNOS
        default 288 if ARCH_SUNXI
        default 264 if MACH_H4700
        default 0
--
Quoted 2 lines

1.7.9.5

Kukjin,

Now that 3.11-rc1 is out, can you please queue this up for 3.11-rc2 as without this patch
gpio support on 4412 boards is broken.

Signature · 2 lines
With warm regards,
Sachin
#2 lore raw

PATCH 1/1 ARM: EXYNOS: Update CONFIG_ARCH_NR_GPIO for Exynos

Ping Kukjin.

Quoted 48 lines · Sachin Kamat
Quoted 34 lines · Sachin Kamat

With the recent cleanup in Exynos platform code notably commits 17859bec ("ARM: EXYNOS: Do not select legacy Kconfig symbols any more") and b9222210 ("ARM: EXYNOS: Remove mach/gpio.h"), the definition of ARCH_NR_GPIOS got removed. This started causing problems on SoCs like Exynos4412 which have more (285) than the default number of GPIOs (255). Thus define this number in Kconfig file. Without this patch we get the following errors during boot:

gpiochip_add: gpios 251..258 (gpv0) failed to register samsung-pinctrl 106e0000.pinctrl: failed to register gpio_chip gpv0, error code: -22
samsung-pinctrl: probe of 106e0000.pinctrl failed with error -22

---
Based on Kukjin's for-next tree.

---
 arch/arm/Kconfig |    1 +
 1 file changed, 1 insertion(+)
arch/arm/Kconfig +1 -1
index ddf2667..380a53b 100644
@@ -1578,6 +1578,7 @@ config ARCH_NR_GPIO
        default 512 if SOC_OMAP5
        default 392 if ARCH_U8500
        default 352 if ARCH_VT8500
+       default 288 if ARCH_EXYNOS
        default 288 if ARCH_SUNXI
        default 264 if MACH_H4700
        default 0
--
Quoted 2 lines

1.7.9.5

Kukjin,

Now that 3.11-rc1 is out, can you please queue this up for 3.11-rc2 as without this patch
gpio support on 4412 boards is broken.

--
With warm regards,
Sachin

Signature · 2 lines
With warm regards,
Sachin
#3 lore raw

PATCH 1/1 ARM: EXYNOS: Update CONFIG_ARCH_NR_GPIO for Exynos

In reply to Sachin Kamat
Quoted 35 lines · Sachin Kamat

With the recent cleanup in Exynos platform code notably commits 17859bec ("ARM: EXYNOS: Do not select legacy Kconfig symbols any more") and b9222210 ("ARM: EXYNOS: Remove mach/gpio.h"), the definition of ARCH_NR_GPIOS got removed. This started causing problems on SoCs like Exynos4412 which have more (285) than the default number of GPIOs (255). Thus define this number in Kconfig file. Without this patch we get the following errors during boot:

gpiochip_add: gpios 251..258 (gpv0) failed to register samsung-pinctrl 106e0000.pinctrl: failed to register gpio_chip gpv0, error code: -22
samsung-pinctrl: probe of 106e0000.pinctrl failed with error -22

---
Based on Kukjin's for-next tree.

---
 arch/arm/Kconfig |    1 +
 1 file changed, 1 insertion(+)
arch/arm/Kconfig +1 -1
index ddf2667..380a53b 100644
@@ -1578,6 +1578,7 @@ config ARCH_NR_GPIO
 	default 512 if SOC_OMAP5
 	default 392 if ARCH_U8500
 	default 352 if ARCH_VT8500
+	default 288 if ARCH_EXYNOS
 	default 288 if ARCH_SUNXI
 	default 264 if MACH_H4700
 	default 0
--
Quoted 1 line

1.7.9.5

Hmm, BTW, I'm wondering why it is 288 not 285 or other specific number...

Thanks,
- Kukjin

#4 lore raw

PATCH 1/1 ARM: EXYNOS: Update CONFIG_ARCH_NR_GPIO for Exynos

Quoted 23 lines · Kukjin Kim
Quoted 22 lines · Sachin Kamat

With the recent cleanup in Exynos platform code notably commits 17859bec ("ARM: EXYNOS: Do not select legacy Kconfig symbols any more") and b9222210 ("ARM: EXYNOS: Remove mach/gpio.h"), the definition of ARCH_NR_GPIOS got removed. This started causing problems on SoCs like Exynos4412 which have more (285) than the default number of GPIOs (255). Thus define this number in Kconfig file. Without this patch we get the following errors during boot:

gpiochip_add: gpios 251..258 (gpv0) failed to register samsung-pinctrl 106e0000.pinctrl: failed to register gpio_chip gpv0, error code: -22
samsung-pinctrl: probe of 106e0000.pinctrl failed with error -22

---
Based on Kukjin's for-next tree.

---
 arch/arm/Kconfig |    1 +
 1 file changed, 1 insertion(+)
Quoted 16 lines
Quoted 13 lines
arch/arm/Kconfig +1 -1
index ddf2667..380a53b 100644
@@ -1578,6 +1578,7 @@ config ARCH_NR_GPIO
      default 512 if SOC_OMAP5
      default 392 if ARCH_U8500
      default 352 if ARCH_VT8500
+     default 288 if ARCH_EXYNOS
      default 288 if ARCH_SUNXI
      default 264 if MACH_H4700
      default 0
--
Quoted 1 line

1.7.9.5

Hmm, BTW, I'm wondering why it is 288 not 285 or other specific number...

I wasn't really sure if we can have any number there. I chose the closest one (288) which was already used by other platform. If there is no problem to use 285 itself then I can resend with that number. Please let me know.

Signature · 2 lines
With warm regards,
Sachin
#5 lore raw

PATCH 1/1 ARM: EXYNOS: Update CONFIG_ARCH_NR_GPIO for Exynos

Quoted 10 lines · Sachin Kamat
Quoted 6 lines · Kukjin Kim
Quoted 5 lines · Sachin Kamat

With the recent cleanup in Exynos platform code notably commits 17859bec ("ARM: EXYNOS: Do not select legacy Kconfig symbols any more") and b9222210 ("ARM: EXYNOS: Remove mach/gpio.h"), the definition of ARCH_NR_GPIOS got removed. This started causing problems on SoCs

like

Quoted 1 line
Quoted 1 line

Exynos4412 which have more (285) than the default number of GPIOs

(255).

Quoted 16 lines
Quoted 16 lines
Quoted 16 lines

Thus define this number in Kconfig file. Without this patch we get the following errors during boot:

gpiochip_add: gpios 251..258 (gpv0) failed to register samsung-pinctrl 106e0000.pinctrl: failed to register gpio_chip gpv0, error code: -22
samsung-pinctrl: probe of 106e0000.pinctrl failed with error -22

---
Based on Kukjin's for-next tree.

---
 arch/arm/Kconfig |    1 +
 1 file changed, 1 insertion(+)
Quoted 16 lines
Quoted 8 lines
Quoted 8 lines
arch/arm/Kconfig +0 -0
index ddf2667..380a53b 100644
@@ -1578,6 +1578,7 @@ config ARCH_NR_GPIO
      default 512 if SOC_OMAP5
      default 392 if ARCH_U8500
      default 352 if ARCH_VT8500
Quoted 8 lines
Quoted 6 lines
arch/arm/Kconfig +1 -1
+     default 288 if ARCH_EXYNOS
      default 288 if ARCH_SUNXI
      default 264 if MACH_H4700
      default 0
--

1.7.9.5

Hmm, BTW, I'm wondering why it is 288 not 285 or other specific

number...

Quoted 6 lines

I wasn't really sure if we can have any number there. I chose the closest one (288) which was already used by other platform. If there is no problem to use 285 itself then I can resend with that number. Please let me know.

If there is no reason, please don't use bigger value than necessary one.

Thanks,
Kukjin

#6 lore raw

PATCH 1/1 ARM: EXYNOS: Update CONFIG_ARCH_NR_GPIO for Exynos

Quoted 44 lines · Kukjin Kim
Quoted 10 lines · Sachin Kamat
Quoted 6 lines · Kukjin Kim
Quoted 5 lines · Sachin Kamat

With the recent cleanup in Exynos platform code notably commits 17859bec ("ARM: EXYNOS: Do not select legacy Kconfig symbols any more") and b9222210 ("ARM: EXYNOS: Remove mach/gpio.h"), the definition of ARCH_NR_GPIOS got removed. This started causing problems on SoCs

like

Quoted 1 line
Quoted 1 line

Exynos4412 which have more (285) than the default number of GPIOs

(255).

Quoted 16 lines
Quoted 16 lines
Quoted 16 lines

Thus define this number in Kconfig file. Without this patch we get the following errors during boot:

gpiochip_add: gpios 251..258 (gpv0) failed to register samsung-pinctrl 106e0000.pinctrl: failed to register gpio_chip gpv0, error code: -22
samsung-pinctrl: probe of 106e0000.pinctrl failed with error -22

---
Based on Kukjin's for-next tree.

---
 arch/arm/Kconfig |    1 +
 1 file changed, 1 insertion(+)
Quoted 16 lines
Quoted 8 lines
Quoted 8 lines
arch/arm/Kconfig +0 -0
index ddf2667..380a53b 100644
@@ -1578,6 +1578,7 @@ config ARCH_NR_GPIO
      default 512 if SOC_OMAP5
      default 392 if ARCH_U8500
      default 352 if ARCH_VT8500
Quoted 8 lines
Quoted 6 lines
arch/arm/Kconfig +1 -1
+     default 288 if ARCH_EXYNOS
      default 288 if ARCH_SUNXI
      default 264 if MACH_H4700
      default 0
--

1.7.9.5

Hmm, BTW, I'm wondering why it is 288 not 285 or other specific

Quoted 8 lines

number...

Quoted 6 lines

I wasn't really sure if we can have any number there. I chose the closest one (288) which was already used by other platform. If there is no problem to use 285 itself then I can resend with that number. Please let me know.

If there is no reason, please don't use bigger value than necessary one.

Ok, I will resend this with exact value.
Thanks Kukjin.

Signature · 2 lines
With warm regards,
Sachin
#7 lore raw

PATCH 1/1 ARM: EXYNOS: Update CONFIG_ARCH_NR_GPIO for Exynos

In reply to Kukjin Kim
Quoted 54 lines · On Monday 22 of July 2013 12:37:52 Kukjin Kim wrote:
Quoted 11 lines · Sachin Kamat
Quoted 6 lines · Kukjin Kim
Quoted 5 lines · Sachin Kamat

With the recent cleanup in Exynos platform code notably commits 17859bec ("ARM: EXYNOS: Do not select legacy Kconfig symbols any more") and b9222210 ("ARM: EXYNOS: Remove mach/gpio.h"), the definition
of ARCH_NR_GPIOS got removed. This started causing problems on SoCs

like

Quoted 1 line
Quoted 1 line

Exynos4412 which have more (285) than the default number of GPIOs

(255).

Quoted 30 lines
Quoted 30 lines
Quoted 30 lines

Thus define this number in Kconfig file. Without this patch we get the
following errors during boot:

gpiochip_add: gpios 251..258 (gpv0) failed to register samsung-pinctrl 106e0000.pinctrl: failed to register gpio_chip gpv0, error code: -22
samsung-pinctrl: probe of 106e0000.pinctrl failed with error -22

---
Based on Kukjin's for-next tree.
---

 arch/arm/Kconfig |    1 +
 1 file changed, 1 insertion(+)
arch/arm/Kconfig +1 -0
index ddf2667..380a53b 100644
@@ -1578,6 +1578,7 @@ config ARCH_NR_GPIO
 
      default 512 if SOC_OMAP5
      default 392 if ARCH_U8500
      default 352 if ARCH_VT8500
 
+     default 288 if ARCH_EXYNOS
 
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines

default 288 if ARCH_SUNXI
default 264 if MACH_H4700
default 0

--
1.7.9.5

Hmm, BTW, I'm wondering why it is 288 not 285 or other specific

Quoted 8 lines

number...

Quoted 4 lines

I wasn't really sure if we can have any number there. I chose the closest one (288) which was already used by other platform. If there is no problem to use 285 itself then I can resend with that number. Please let me know.

If there is no reason, please don't use bigger value than necessary one.

Hmm, what about some GPIO expanders that would require bigger GPIO address space? I would reserve some space just in case, i.e. define this value to be the highest number of GPIOs on all Exynos SoCs + some extra, like 32 or 64.

Best regards,
Tomasz

#8 lore raw

PATCH 1/1 ARM: EXYNOS: Update CONFIG_ARCH_NR_GPIO for Exynos

Quoted 62 lines · Tomasz Figa
Quoted 61 lines · On Monday 22 of July 2013 12:37:52 Kukjin Kim wrote:
Quoted 11 lines · Sachin Kamat
Quoted 6 lines · Kukjin Kim
Quoted 5 lines · Sachin Kamat

With the recent cleanup in Exynos platform code notably commits 17859bec ("ARM: EXYNOS: Do not select legacy Kconfig symbols any more") and b9222210 ("ARM: EXYNOS: Remove mach/gpio.h"), the definition
of ARCH_NR_GPIOS got removed. This started causing problems on SoCs

like

Quoted 1 line
Quoted 1 line

Exynos4412 which have more (285) than the default number of GPIOs

(255).

Quoted 30 lines
Quoted 30 lines
Quoted 30 lines

Thus define this number in Kconfig file. Without this patch we get the
following errors during boot:

gpiochip_add: gpios 251..258 (gpv0) failed to register samsung-pinctrl 106e0000.pinctrl: failed to register gpio_chip gpv0, error code: -22
samsung-pinctrl: probe of 106e0000.pinctrl failed with error -22

---
Based on Kukjin's for-next tree.
---

  arch/arm/Kconfig |    1 +
  1 file changed, 1 insertion(+)
arch/arm/Kconfig +1 -0
index ddf2667..380a53b 100644
@@ -1578,6 +1578,7 @@ config ARCH_NR_GPIO
 
       default 512 if SOC_OMAP5
       default 392 if ARCH_U8500
       default 352 if ARCH_VT8500
 
+     default 288 if ARCH_EXYNOS
 
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines

default 288 if ARCH_SUNXI
default 264 if MACH_H4700
default 0

--
1.7.9.5

Hmm, BTW, I'm wondering why it is 288 not 285 or other specific

number...

Quoted 4 lines

I wasn't really sure if we can have any number there. I chose the closest one (288) which was already used by other platform. If there is no problem to use 285 itself then I can resend with that number. Please let me know.

Quoted 5 lines
Quoted 1 line

If there is no reason, please don't use bigger value than necessary one.

Hmm, what about some GPIO expanders that would require bigger GPIO address space? I would reserve some space just in case, i.e. define this value to be the highest number of GPIOs on all Exynos SoCs + some extra, like 32 or 64.

That sounds like a good idea. IIRC I once had to increase ARCH_NR_GPIO to make the wm8994 GPIO controller working. The wm8994 driver also handles WM1811 audio codec that some Exynos development boards are shipped with.

--
Regards,
Sylwester

#9 lore raw

PATCH 1/1 ARM: EXYNOS: Update CONFIG_ARCH_NR_GPIO for Exynos

Quoted 83 lines · Sylwester Nawrocki
Quoted 72 lines · Tomasz Figa
Quoted 70 lines · On Monday 22 of July 2013 12:37:52 Kukjin Kim wrote:
Quoted 5 lines · Sachin Kamat
Quoted 3 lines · Kukjin Kim
Quoted 1 line · Sachin Kamat
Quoted 10 lines
Quoted 5 lines
Quoted 5 lines

With the recent cleanup in Exynos platform code notably commits 17859bec ("ARM: EXYNOS: Do not select legacy Kconfig symbols any more") and b9222210 ("ARM: EXYNOS: Remove mach/gpio.h"), the definition
of ARCH_NR_GPIOS got removed. This started causing problems on SoCs

like

Quoted 1 line
Quoted 1 line

Exynos4412 which have more (285) than the default number of GPIOs

(255).

Quoted 34 lines
Quoted 34 lines
Quoted 34 lines

Thus define this number in Kconfig file. Without this patch we get the
following errors during boot:

gpiochip_add: gpios 251..258 (gpv0) failed to register samsung-pinctrl 106e0000.pinctrl: failed to register gpio_chip gpv0, error code: -22
samsung-pinctrl: probe of 106e0000.pinctrl failed with error -22

---
Based on Kukjin's for-next tree.
---

  arch/arm/Kconfig |    1 +
  1 file changed, 1 insertion(+)
arch/arm/Kconfig +1 -0
index ddf2667..380a53b 100644
@@ -1578,6 +1578,7 @@ config ARCH_NR_GPIO
 
       default 512 if SOC_OMAP5
       default 392 if ARCH_U8500
       default 352 if ARCH_VT8500
 
+     default 288 if ARCH_EXYNOS
 

default 288 if ARCH_SUNXI
default 264 if MACH_H4700
default 0

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

--
1.7.9.5

Hmm, BTW, I'm wondering why it is 288 not 285 or other specific

number...

Quoted 4 lines

I wasn't really sure if we can have any number there. I chose the closest one (288) which was already used by other platform. If there is no problem to use 285 itself then I can resend with that number. Please let me know.

Quoted 8 lines
Quoted 1 line

If there is no reason, please don't use bigger value than necessary one.

Hmm, what about some GPIO expanders that would require bigger GPIO address space? I would reserve some space just in case, i.e. define this value to be
the highest number of GPIOs on all Exynos SoCs + some extra, like 32 or 64.

Quoted 3 lines

That sounds like a good idea. IIRC I once had to increase ARCH_NR_GPIO to make the wm8994 GPIO controller working. The wm8994 driver also handles WM1811 audio codec that some Exynos development boards are shipped with.

Looks like a valid point.

Kukjin,
Let me know your opinion about this before I respin the patch.

Signature · 2 lines
With warm regards,
Sachin
#10 lore raw

PATCH 1/1 ARM: EXYNOS: Update CONFIG_ARCH_NR_GPIO for Exynos

Sachin Kamat wrote:

[...]

Quoted 25 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line

Hmm, BTW, I'm wondering why it is 288 not 285 or other specific

number...

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines

I wasn't really sure if we can have any number there. I chose the closest one (288) which was already used by other platform. If there is no problem to use 285 itself then I can resend with that number. Please let me know.

If there is no reason, please don't use bigger value than necessary

one.

Quoted 3 lines
Quoted 3 lines

Hmm, what about some GPIO expanders that would require bigger GPIO

address

Quoted 1 line
Quoted 1 line

space? I would reserve some space just in case, i.e. define this value

to

Quoted 6 lines
Quoted 3 lines

be
the highest number of GPIOs on all Exynos SoCs + some extra, like 32 or 64.

That sounds like a good idea. IIRC I once had to increase ARCH_NR_GPIO

Quoted 9 lines

to

Quoted 2 lines

make the wm8994 GPIO controller working. The wm8994 driver also handles WM1811 audio codec that some Exynos development boards are shipped with.

Looks like a valid point.

Kukjin,
Let me know your opinion about this before I respin the patch.

Agreed, let's use 512 including some extras, I'm not sure what value for some GPIO expanders is reasonable at this moment, though. It should be fine on current EXYNOS platforms.

Thanks,
Kukjin