Skip to contentSkip to conversation

hte: tegra194: add GPIOLIB dependency

PATCH In review Arnd Bergmann 3 participants 5 messages Oct 23, 2023 HTE

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hte: tegra194: add GPIOLIB dependency

From: Arnd Bergmann <[email protected]>

The driver started calling into a few interfaces that are part of GPIOLIB and don't have stub implementations otherwise:

drivers/hte/hte-tegra194.c: In function 'tegra_hte_line_xlate':
drivers/hte/hte-tegra194.c:424:48: error: implicit declaration of function 'gpio_device_get_base'; did you mean 'gpio_device_get_desc'? [-Werror=implicit-function-declaration]

  424 |                 line_id = desc->attr.line_id - gpio_device_get_base(gs->gdev);
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                gpio_device_get_desc

Add a Kconfig dependency to only allow building when this is defined.

Fixes dc850faa28ee0 ("hte: tegra194: don't access struct gpio_chip")
---
 drivers/hte/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hte/Kconfig +1 -0
index 083e67492bf2e..641af722b555d 100644
@@ -17,6 +17,7 @@ if HTE
 config HTE_TEGRA194
 	tristate "NVIDIA Tegra194 HTE Support"
 	depends on (ARCH_TEGRA_194_SOC || COMPILE_TEST)
+	depends on GPIOLIB
 	help
 	  Enable this option for integrated hardware timestamping engine also
 	  known as generic timestamping engine (GTE) support on NVIDIA Tegra194
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 33 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The driver started calling into a few interfaces that are part of GPIOLIB and don't have stub implementations otherwise:

drivers/hte/hte-tegra194.c: In function 'tegra_hte_line_xlate':
drivers/hte/hte-tegra194.c:424:48: error: implicit declaration of function 'gpio_device_get_base'; did you mean 'gpio_device_get_desc'? [-Werror=implicit-function-declaration]

  424 |                 line_id = desc->attr.line_id - gpio_device_get_base(gs->gdev);
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                gpio_device_get_desc

Add a Kconfig dependency to only allow building when this is defined.

Fixes dc850faa28ee0 ("hte: tegra194: don't access struct gpio_chip")
---
 drivers/hte/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hte/Kconfig +1 -1
index 083e67492bf2e..641af722b555d 100644
@@ -17,6 +17,7 @@ if HTE
 config HTE_TEGRA194
        tristate "NVIDIA Tegra194 HTE Support"
        depends on (ARCH_TEGRA_194_SOC || COMPILE_TEST)
+       depends on GPIOLIB
        help
          Enable this option for integrated hardware timestamping engine also
          known as generic timestamping engine (GTE) support on NVIDIA Tegra194
--
Quoted 2 lines

2.39.2

Thanks. None of the new interfaces are "consumer" APIs and are not meant to have stubs so depending on GPIOLIB is correct here.

#2 lore raw
Quoted 41 lines · Bartosz Golaszewski
Quoted 33 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The driver started calling into a few interfaces that are part of GPIOLIB and don't have stub implementations otherwise:

drivers/hte/hte-tegra194.c: In function 'tegra_hte_line_xlate':
drivers/hte/hte-tegra194.c:424:48: error: implicit declaration of function 'gpio_device_get_base'; did you mean 'gpio_device_get_desc'? [-Werror=implicit-function-declaration]

  424 |                 line_id = desc->attr.line_id - gpio_device_get_base(gs->gdev);
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                gpio_device_get_desc

Add a Kconfig dependency to only allow building when this is defined.

Fixes dc850faa28ee0 ("hte: tegra194: don't access struct gpio_chip")
---
 drivers/hte/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hte/Kconfig +1 -1
index 083e67492bf2e..641af722b555d 100644
@@ -17,6 +17,7 @@ if HTE
 config HTE_TEGRA194
        tristate "NVIDIA Tegra194 HTE Support"
        depends on (ARCH_TEGRA_194_SOC || COMPILE_TEST)
+       depends on GPIOLIB
        help
          Enable this option for integrated hardware timestamping engine also
          known as generic timestamping engine (GTE) support on NVIDIA Tegra194
--
Quoted 2 lines

2.39.2

Thanks. None of the new interfaces are "consumer" APIs and are not meant to have stubs so depending on GPIOLIB is correct here.

Quoted 1 line

Ah, this goes on top of the patch that is in my tree so I'll wait for Dipen's Ack and apply it.

Bart

maintainer Acked-by
#3 lore raw
Quoted 42 lines · Bartosz Golaszewski
Quoted 41 lines · Bartosz Golaszewski
Quoted 33 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The driver started calling into a few interfaces that are part of GPIOLIB and don't have stub implementations otherwise:

drivers/hte/hte-tegra194.c: In function 'tegra_hte_line_xlate':
drivers/hte/hte-tegra194.c:424:48: error: implicit declaration of function 'gpio_device_get_base'; did you mean 'gpio_device_get_desc'? [-Werror=implicit-function-declaration]

  424 |                 line_id = desc->attr.line_id - gpio_device_get_base(gs->gdev);
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                gpio_device_get_desc

Add a Kconfig dependency to only allow building when this is defined.

Fixes dc850faa28ee0 ("hte: tegra194: don't access struct gpio_chip")
---
 drivers/hte/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hte/Kconfig +1 -1
index 083e67492bf2e..641af722b555d 100644
@@ -17,6 +17,7 @@ if HTE
 config HTE_TEGRA194
        tristate "NVIDIA Tegra194 HTE Support"
        depends on (ARCH_TEGRA_194_SOC || COMPILE_TEST)
+       depends on GPIOLIB
        help
          Enable this option for integrated hardware timestamping engine also
          known as generic timestamping engine (GTE) support on NVIDIA Tegra194
--
Quoted 2 lines

2.39.2

Thanks. None of the new interfaces are "consumer" APIs and are not meant to have stubs so depending on GPIOLIB is correct here.

Quoted 4 lines
Quoted 1 line

Ah, this goes on top of the patch that is in my tree so I'll wait for Dipen's Ack and apply it.

Quoted 2 lines

Bart

#4 lore raw
Quoted 44 lines · Dipen Patel
Quoted 42 lines · Bartosz Golaszewski
Quoted 41 lines · Bartosz Golaszewski
Quoted 33 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The driver started calling into a few interfaces that are part of GPIOLIB and don't have stub implementations otherwise:

drivers/hte/hte-tegra194.c: In function 'tegra_hte_line_xlate':
drivers/hte/hte-tegra194.c:424:48: error: implicit declaration of function 'gpio_device_get_base'; did you mean 'gpio_device_get_desc'? [-Werror=implicit-function-declaration]

  424 |                 line_id = desc->attr.line_id - gpio_device_get_base(gs->gdev);
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                gpio_device_get_desc

Add a Kconfig dependency to only allow building when this is defined.

Fixes dc850faa28ee0 ("hte: tegra194: don't access struct gpio_chip")
---
 drivers/hte/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hte/Kconfig +1 -1
index 083e67492bf2e..641af722b555d 100644
@@ -17,6 +17,7 @@ if HTE
 config HTE_TEGRA194
        tristate "NVIDIA Tegra194 HTE Support"
        depends on (ARCH_TEGRA_194_SOC || COMPILE_TEST)
+       depends on GPIOLIB
        help
          Enable this option for integrated hardware timestamping engine also
          known as generic timestamping engine (GTE) support on NVIDIA Tegra194
--
Quoted 2 lines

2.39.2

Thanks. None of the new interfaces are "consumer" APIs and are not meant to have stubs so depending on GPIOLIB is correct here.

Quoted 9 lines
Quoted 4 lines
Quoted 1 line

Ah, this goes on top of the patch that is in my tree so I'll wait for Dipen's Ack and apply it.

Quoted 2 lines

Bart

I queued it. There's a trivial conflict with your HTE branch, Stephen should be able to resolve it.

Bart