Skip to contentSkip to conversation

backports: include gpio consumer.h

PATCH In review Stefan Assmann 3 participants 6 messages Jul 10, 2014 – Jul 19, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 backports: include gpio consumer.h

While doing a make allmodconfig I noticed the following:
CC [M] /dev/shm/backports-next/drivers/media/i2c/adv7604.o
/dev/shm/backports-next/drivers/media/i2c/adv7604.c:31:33: fatal error: linux/gpio/consumer.h: No such file or directory

Including the header fixes the error.

---
 copy-list | 4 ++++
 1 file changed, 4 insertions(+)
copy-list +4 -0
index 7ad8972..b52e9f2 100644
@@ -107,6 +107,10 @@ drivers/net/ethernet/intel/Kconfig
 drivers/net/ethernet/intel/Makefile
 drivers/net/ethernet/intel/igb/
 
+# gpio
+include/linux/gpio/
+include/linux/gpio/consumer.h
+
 # wwan drivers
 include/uapi/linux/usb/cdc.h
 include/uapi/linux/usb/cdc-wdm.h
Signature · 1 line
1.9.3
#1 lore raw
Quoted 7 lines · Stefan Assmann

While doing a make allmodconfig I noticed the following:
CC [M] /dev/shm/backports-next/drivers/media/i2c/adv7604.o
/dev/shm/backports-next/drivers/media/i2c/adv7604.c:31:33: fatal error: linux/gpio/consumer.h: No such file or directory

Including the header fixes the error.

Applied and pushed, thanks!

Luis

#2 lore raw
In reply to Stefan Assmann
Quoted 17 lines · Stefan Assmann

While doing a make allmodconfig I noticed the following:
CC [M] /dev/shm/backports-next/drivers/media/i2c/adv7604.o
/dev/shm/backports-next/drivers/media/i2c/adv7604.c:31:33: fatal error: linux/gpio/consumer.h: No such file or directory

Including the header fixes the error.

---
 copy-list | 4 ++++
 1 file changed, 4 insertions(+)
copy-list +0 -0
index 7ad8972..b52e9f2 100644

copy-list drivers/net/ethernet/intel/Kconfig · line 116

Quoted 10 lines
copy-list +4 -0
@@ -107,6 +107,10 @@ drivers/net/ethernet/intel/Kconfig
 drivers/net/ethernet/intel/Makefile
 drivers/net/ethernet/intel/igb/
 
+# gpio
+include/linux/gpio/
+include/linux/gpio/consumer.h
+
 # wwan drivers
 include/uapi/linux/usb/cdc.h
 include/uapi/linux/usb/cdc-wdm.h

Is this correct? backports does not provide the implementation of the functions in include/linux/gpio/consumer.h and it will result in hard to debug problems with some function signature is different in our version of consumer.h and the version in the kernel.

I am against backporting this and would add an empty version of this header.

Hauke

#3 lore raw
Quoted 33 lines · Hauke Mehrtens
Quoted 17 lines · Stefan Assmann

While doing a make allmodconfig I noticed the following:
CC [M] /dev/shm/backports-next/drivers/media/i2c/adv7604.o
/dev/shm/backports-next/drivers/media/i2c/adv7604.c:31:33: fatal error: linux/gpio/consumer.h: No such file or directory

Including the header fixes the error.

---
 copy-list | 4 ++++
 1 file changed, 4 insertions(+)
copy-list +0 -0
index 7ad8972..b52e9f2 100644

copy-list drivers/net/ethernet/intel/Kconfig · line 116

Quoted 10 lines
copy-list +4 -0
@@ -107,6 +107,10 @@ drivers/net/ethernet/intel/Kconfig
 drivers/net/ethernet/intel/Makefile
 drivers/net/ethernet/intel/igb/
 
+# gpio
+include/linux/gpio/
+include/linux/gpio/consumer.h
+
 # wwan drivers
 include/uapi/linux/usb/cdc.h
 include/uapi/linux/usb/cdc-wdm.h

Is this correct? backports does not provide the implementation of the functions in include/linux/gpio/consumer.h and it will result in hard to debug problems with some function signature is different in our version of consumer.h and the version in the kernel.

Quoted 1 line

I am against backporting this and would add an empty version of this header.

config GPIO_DEVRES
def_bool y
depends on HAS_IOMEM

Indeed, we can't backport this yet as we have no support for in-kernel functionality to be backported yet.

Reverted.

Luis

#4 lore raw
Quoted 36 lines · Luis R. Rodriguez
Quoted 33 lines · Hauke Mehrtens
Quoted 17 lines · Stefan Assmann

While doing a make allmodconfig I noticed the following:

   CC [M]  /dev/shm/backports-next/drivers/media/i2c/adv7604.o

/dev/shm/backports-next/drivers/media/i2c/adv7604.c:31:33: fatal error: linux/gpio/consumer.h: No such file or directory

Including the header fixes the error.

---
  copy-list | 4 ++++
  1 file changed, 4 insertions(+)
copy-list +0 -0
index 7ad8972..b52e9f2 100644

copy-list drivers/net/ethernet/intel/Kconfig · line 116

Quoted 10 lines
copy-list +4 -0
@@ -107,6 +107,10 @@ drivers/net/ethernet/intel/Kconfig
  drivers/net/ethernet/intel/Makefile
  drivers/net/ethernet/intel/igb/
 
+# gpio
+include/linux/gpio/
+include/linux/gpio/consumer.h
+
  # wwan drivers
  include/uapi/linux/usb/cdc.h
  include/uapi/linux/usb/cdc-wdm.h

Is this correct? backports does not provide the implementation of the functions in include/linux/gpio/consumer.h and it will result in hard to debug problems with some function signature is different in our version of consumer.h and the version in the kernel.

Quoted 1 line

I am against backporting this and would add an empty version of this header.

Quoted 8 lines

config GPIO_DEVRES
def_bool y
depends on HAS_IOMEM

Indeed, we can't backport this yet as we have no support for in-kernel functionality to be backported yet.

Reverted.

So, with just an empty header we get:
CC [M] /dev/shm/backports-next/drivers/media/i2c/adv7604.o
/dev/shm/backports-next/drivers/media/i2c/adv7604.c: In function ‘adv7604_set_hpd’:
/dev/shm/backports-next/drivers/media/i2c/adv7604.c:613:3: error: implicit declaration of function ‘gpiod_set_value_cansleep’ [-Werror=implicit-function-declaration]
gpiod_set_value_cansleep(state->hpd_gpio[i], hpd & BIT(i));
^
/dev/shm/backports-next/drivers/media/i2c/adv7604.c: In function ‘adv7604_probe’:
/dev/shm/backports-next/drivers/media/i2c/adv7604.c:2797:4: error: implicit declaration of function ‘devm_gpiod_get_index’ [-Werror=implicit-function-declaration]

    devm_gpiod_get_index(&client->dev, "hpd", i);
    ^
/dev/shm/backports-next/drivers/media/i2c/adv7604.c:2796:22: warning: assignment makes pointer from integer without a cast [enabled by default]
   state->hpd_gpio[i] =
                      ^

/dev/shm/backports-next/drivers/media/i2c/adv7604.c:2801:3: error: implicit declaration of function ‘gpiod_direction_output’ [-Werror=implicit-function-declaration]
gpiod_direction_output(state->hpd_gpio[i], 0);

If we can't backport these, what do we do? Disable the module for now?

Stefan

#5 lore raw
Quoted 68 lines · Stefan Assmann
Quoted 38 lines · Luis R. Rodriguez
Quoted 34 lines · Hauke Mehrtens
Quoted 18 lines · Stefan Assmann

While doing a make allmodconfig I noticed the following:

   CC [M]  /dev/shm/backports-next/drivers/media/i2c/adv7604.o

/dev/shm/backports-next/drivers/media/i2c/adv7604.c:31:33: fatal
error: linux/gpio/consumer.h: No such file or directory

Including the header fixes the error.

---
  copy-list | 4 ++++
  1 file changed, 4 insertions(+)
copy-list +0 -0
index 7ad8972..b52e9f2 100644

copy-list drivers/net/ethernet/intel/Kconfig · line 116

Quoted 10 lines
copy-list +4 -0
@@ -107,6 +107,10 @@ drivers/net/ethernet/intel/Kconfig
  drivers/net/ethernet/intel/Makefile
  drivers/net/ethernet/intel/igb/
 
+# gpio
+include/linux/gpio/
+include/linux/gpio/consumer.h
+
  # wwan drivers
  include/uapi/linux/usb/cdc.h
  include/uapi/linux/usb/cdc-wdm.h

Is this correct? backports does not provide the implementation of the functions in include/linux/gpio/consumer.h and it will result in hard to debug problems with some function signature is different in our version of consumer.h and the version in the kernel.

Quoted 2 lines

I am against backporting this and would add an empty version of this header.

Quoted 8 lines

config GPIO_DEVRES
def_bool y
depends on HAS_IOMEM

Indeed, we can't backport this yet as we have no support for in-kernel functionality to be backported yet.

Reverted.

So, with just an empty header we get:
CC [M] /dev/shm/backports-next/drivers/media/i2c/adv7604.o
/dev/shm/backports-next/drivers/media/i2c/adv7604.c: In function ‘adv7604_set_hpd’:
/dev/shm/backports-next/drivers/media/i2c/adv7604.c:613:3: error:
implicit declaration of function ‘gpiod_set_value_cansleep’ [-Werror=implicit-function-declaration]

   gpiod_set_value_cansleep(state->hpd_gpio[i], hpd & BIT(i));
   ^

/dev/shm/backports-next/drivers/media/i2c/adv7604.c: In function ‘adv7604_probe’:
/dev/shm/backports-next/drivers/media/i2c/adv7604.c:2797:4: error:
implicit declaration of function ‘devm_gpiod_get_index’ [-Werror=implicit-function-declaration]

    devm_gpiod_get_index(&client->dev, "hpd", i);
    ^
/dev/shm/backports-next/drivers/media/i2c/adv7604.c:2796:22: warning:
assignment makes pointer from integer without a cast [enabled by default]
   state->hpd_gpio[i] =
                      ^
Quoted 8 lines

/dev/shm/backports-next/drivers/media/i2c/adv7604.c:2801:3: error:
implicit declaration of function ‘gpiod_direction_output’ [-Werror=implicit-function-declaration]
gpiod_direction_output(state->hpd_gpio[i], 0);

If we can't backport these, what do we do? Disable the module for now?

Stefan

Hi,

if you do not need this driver removing it or make it depend on kernel 3.13 in which the header was added should be fine.

Hauke