eGalax USB touchscreen issues

Mark Kane mark at kane.mn
Sat May 22 22:07:09 UTC 2021


On 2021-05-22 03:34, Hans Petter Selasky wrote:
> This patch should work:
> 
> https://github.com/hselasky/webcamd/commit/816f17ac38ce32879f6eb5b610305468b1b24de9

Thanks for the diff. That applies cleanly to the 5.10.6.1 port but 
errors during build:

--- obj-media_tree-drivers-input-touchscreen-egalax_ts.o ---
In file included from 
media_tree/drivers/input/touchscreen/egalax_ts.c:27:
In file included from media_tree/include/linux/of_gpio.h:14:
In file included from media_tree/include/linux/gpio/driver.h:8:
media_tree/include/linux/irqchip/chained_irq.h:16:45: warning: 
declaration of 'struct irq_chip' will not be visible outside of this 
function [-Wvisibility]
static inline void chained_irq_enter(struct irq_chip *chip,
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:17:17: warning: 
declaration of 'struct irq_desc' will not be visible outside of this 
function [-Wvisibility]
                                      struct irq_desc *desc)
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:20:10: error: incomplete 
definition of type 'struct irq_chip'
         if (chip->irq_eoi)
             ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:16:45: note: forward 
declaration of 'struct irq_chip'
static inline void chained_irq_enter(struct irq_chip *chip,
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:23:10: error: incomplete 
definition of type 'struct irq_chip'
         if (chip->irq_mask_ack) {
             ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:16:45: note: forward 
declaration of 'struct irq_chip'
static inline void chained_irq_enter(struct irq_chip *chip,
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:24:7: error: incomplete 
definition of type 'struct irq_chip'
                 chip->irq_mask_ack(&desc->irq_data);
                 ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:16:45: note: forward 
declaration of 'struct irq_chip'
static inline void chained_irq_enter(struct irq_chip *chip,
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:24:27: error: incomplete 
definition of type 'struct irq_desc'
                 chip->irq_mask_ack(&desc->irq_data);
                                     ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:17:17: note: forward 
declaration of 'struct irq_desc'
                                      struct irq_desc *desc)
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:26:7: error: incomplete 
definition of type 'struct irq_chip'
                 chip->irq_mask(&desc->irq_data);
                 ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:16:45: note: forward 
declaration of 'struct irq_chip'
static inline void chained_irq_enter(struct irq_chip *chip,
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:26:23: error: incomplete 
definition of type 'struct irq_desc'
                 chip->irq_mask(&desc->irq_data);
                                 ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:17:17: note: forward 
declaration of 'struct irq_desc'
                                      struct irq_desc *desc)
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:27:11: error: incomplete 
definition of type 'struct irq_chip'
                 if (chip->irq_ack)
                     ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:16:45: note: forward 
declaration of 'struct irq_chip'
static inline void chained_irq_enter(struct irq_chip *chip,
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:28:8: error: incomplete 
definition of type 'struct irq_chip'
                         chip->irq_ack(&desc->irq_data);
                         ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:16:45: note: forward 
declaration of 'struct irq_chip'
static inline void chained_irq_enter(struct irq_chip *chip,
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:28:23: error: incomplete 
definition of type 'struct irq_desc'
                         chip->irq_ack(&desc->irq_data);
                                        ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:17:17: note: forward 
declaration of 'struct irq_desc'
                                      struct irq_desc *desc)
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:32:44: warning: 
declaration of 'struct irq_chip' will not be visible outside of this 
function [-Wvisibility]
static inline void chained_irq_exit(struct irq_chip *chip,
                                            ^
media_tree/include/linux/irqchip/chained_irq.h:33:16: warning: 
declaration of 'struct irq_desc' will not be visible outside of this 
function [-Wvisibility]
                                     struct irq_desc *desc)
                                            ^
media_tree/include/linux/irqchip/chained_irq.h:35:10: error: incomplete 
definition of type 'struct irq_chip'
         if (chip->irq_eoi)
             ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:32:44: note: forward 
declaration of 'struct irq_chip'
static inline void chained_irq_exit(struct irq_chip *chip,
                                            ^
media_tree/include/linux/irqchip/chained_irq.h:36:7: error: incomplete 
definition of type 'struct irq_chip'
                 chip->irq_eoi(&desc->irq_data);
                 ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:32:44: note: forward 
declaration of 'struct irq_chip'
static inline void chained_irq_exit(struct irq_chip *chip,
                                            ^
media_tree/include/linux/irqchip/chained_irq.h:36:22: error: incomplete 
definition of type 'struct irq_desc'
                 chip->irq_eoi(&desc->irq_data);
                                ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:33:16: note: forward 
declaration of 'struct irq_desc'
                                     struct irq_desc *desc)
                                            ^
media_tree/include/linux/irqchip/chained_irq.h:38:7: error: incomplete 
definition of type 'struct irq_chip'
                 chip->irq_unmask(&desc->irq_data);
                 ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:32:44: note: forward 
declaration of 'struct irq_chip'
static inline void chained_irq_exit(struct irq_chip *chip,
                                            ^
media_tree/include/linux/irqchip/chained_irq.h:38:25: error: incomplete 
definition of type 'struct irq_desc'
                 chip->irq_unmask(&desc->irq_data);
                                   ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:33:16: note: forward 
declaration of 'struct irq_desc'
                                     struct irq_desc *desc)
                                            ^
In file included from 
media_tree/drivers/input/touchscreen/egalax_ts.c:27:
In file included from media_tree/include/linux/of_gpio.h:14:
media_tree/include/linux/gpio/driver.h:137:2: error: unknown type name 
'irq_flow_handler_t'
         irq_flow_handler_t handler;
         ^
media_tree/include/linux/gpio/driver.h:167:2: error: unknown type name 
'irq_flow_handler_t'
         irq_flow_handler_t parent_handler;
         ^
media_tree/include/linux/gpio/driver.h:248:29: warning: declaration of 
'struct irq_data' will not be visible outside of this function 
[-Wvisibility]
         void            (*irq_enable)(struct irq_data *data);
                                              ^
media_tree/include/linux/gpio/driver.h:255:30: warning: declaration of 
'struct irq_data' will not be visible outside of this function 
[-Wvisibility]
         void            (*irq_disable)(struct irq_data *data);
                                               ^
media_tree/include/linux/gpio/driver.h:261:29: warning: declaration of 
'struct irq_data' will not be visible outside of this function 
[-Wvisibility]
         void            (*irq_unmask)(struct irq_data *data);
                                              ^
media_tree/include/linux/gpio/driver.h:268:27: warning: declaration of 
'struct irq_data' will not be visible outside of this function 
[-Wvisibility]
         void            (*irq_mask)(struct irq_data *data);
                                            ^
media_tree/include/linux/gpio/driver.h:616:8: error: unknown type name 
'irq_hw_number_t'
                      irq_hw_number_t hwirq);
                      ^
media_tree/include/linux/gpio/driver.h:620:13: warning: declaration of 
'struct irq_data' will not be visible outside of this function 
[-Wvisibility]
                                  struct irq_data *data, bool reserve);
                                         ^
media_tree/include/linux/gpio/driver.h:622:16: warning: declaration of 
'struct irq_data' will not be visible outside of this function 
[-Wvisibility]
                                     struct irq_data *data);
                                            ^
media_tree/include/linux/gpio/driver.h:631:9: error: unknown type name 
'irq_flow_handler_t'
                              irq_flow_handler_t handler,
                              ^
media_tree/include/linux/gpio/driver.h:683:12: error: unknown type name 
'irq_flow_handler_t'
                                        irq_flow_handler_t handler,
                                        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
10 warnings and 20 errors generated.
*** [obj-media_tree-drivers-input-touchscreen-egalax_ts.o] Error code 1

make[2]: stopped in /usr/ports/multimedia/webcamd/work/webcamd-5.10.6.1
1 error

make[2]: stopped in /usr/ports/multimedia/webcamd/work/webcamd-5.10.6.1
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure 
to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/multimedia/webcamd
*** Error code 1

Stop.
make: stopped in /usr/ports/multimedia/webcamd
#

---------------------------------------------------

Similar if adapted to the new 5.13.2.2 port:

--- obj-media_tree-drivers-input-touchscreen-egalax_ts.o ---
In file included from 
media_tree/drivers/input/touchscreen/egalax_ts.c:27:
In file included from media_tree/include/linux/of_gpio.h:14:
In file included from media_tree/include/linux/gpio/driver.h:8:
media_tree/include/linux/irqchip/chained_irq.h:16:45: warning: 
declaration of 'struct irq_chip' will not be visible outside of this 
function [-Wvisibility]
static inline void chained_irq_enter(struct irq_chip *chip,
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:17:17: warning: 
declaration of 'struct irq_desc' will not be visible outside of this 
function [-Wvisibility]
                                      struct irq_desc *desc)
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:20:10: error: incomplete 
definition of type 'struct irq_chip'
         if (chip->irq_eoi)
             ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:16:45: note: forward 
declaration of 'struct irq_chip'
static inline void chained_irq_enter(struct irq_chip *chip,
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:23:10: error: incomplete 
definition of type 'struct irq_chip'
         if (chip->irq_mask_ack) {
             ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:16:45: note: forward 
declaration of 'struct irq_chip'
static inline void chained_irq_enter(struct irq_chip *chip,
--- obj-media_tree-drivers-input-touchscreen-sur40.o ---
--- obj-media_tree-drivers-input-touchscreen-egalax_ts.o ---
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:24:7: error: incomplete 
definition of type 'struct irq_chip'
                 chip->irq_mask_ack(&desc->irq_data);
                 ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:16:45: note: forward 
declaration of 'struct irq_chip'
static inline void chained_irq_enter(struct irq_chip *chip,
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:24:27: error: incomplete 
definition of type 'struct irq_desc'
                 chip->irq_mask_ack(&desc->irq_data);
                                     ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:17:17: note: forward 
declaration of 'struct irq_desc'
                                      struct irq_desc *desc)
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:26:7: error: incomplete 
definition of type 'struct irq_chip'
                 chip->irq_mask(&desc->irq_data);
                 ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:16:45: note: forward 
declaration of 'struct irq_chip'
static inline void chained_irq_enter(struct irq_chip *chip,
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:26:23: error: incomplete 
definition of type 'struct irq_desc'
                 chip->irq_mask(&desc->irq_data);
                                 ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:17:17: note: forward 
declaration of 'struct irq_desc'
                                      struct irq_desc *desc)
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:27:11: error: incomplete 
definition of type 'struct irq_chip'
                 if (chip->irq_ack)
                     ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:16:45: note: forward 
declaration of 'struct irq_chip'
static inline void chained_irq_enter(struct irq_chip *chip,
                                             ^
--- obj-media_tree-drivers-input-touchscreen-sur40.o ---
cc -c -DCURR_FILE_NAME=\"sur40\" -O2 -pipe  -fstack-protector-strong 
-fno-strict-aliasing  -D_GNU_SOURCE -DLINUX -Wall -Wno-pointer-sign 
-Wno-unused-variable 
-I/usr/ports/multimedia/webcamd/work/webcamd-5.13.2.2 
-I/usr/ports/multimedia/webcamd/work/webcamd-5.13.2.2/dummy 
-I/usr/ports/multimedia/webcamd/work/webcamd-5.13.2.2/headers 
-Imedia_tree/drivers/media/common 
-Imedia_tree/drivers/media/common/tuners 
-Imedia_tree/drivers/media/dvb/dvb-core 
-Imedia_tree/drivers/media/dvb/dvb-usb 
-Imedia_tree/drivers/media/dvb/frontends 
-Imedia_tree/drivers/media/dvb/ttpci 
-Imedia_tree/drivers/media/video/gspca 
-Imedia_tree/drivers/media/video/hdpvr 
-Imedia_tree/drivers/media/dvb-core -Imedia_tree/drivers/media/dvb-usb 
-Imedia_tree/drivers/media/dvb-frontends 
-Imedia_tree/drivers/media/tuners -Imedia_tree/drivers/media/pci/ttpci 
-Imedia_tree/drivers/media/common/siano 
-Imedia_tree/drivers/media/common/b2c2 
-Imedia_tree/drivers/media/usb/gspca 
-Imedia_tree/drivers/media/usb/dvb-usb 
-Imedia_tree/drivers/media/usb/dvb-usb-v2 --- 
obj-media_tree-drivers-input-touchscreen-egalax_ts.o ---
media_tree/include/linux/irqchip/chained_irq.h:28:8: error: incomplete 
definition of type 'struct irq_chip'
                         chip->irq_ack(&desc->irq_data);
                         ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:16:45: note: forward 
declaration of 'struct irq_chip'
static inline void chained_irq_enter(struct irq_chip *chip,
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:28:23: error: incomplete 
definition of type 'struct irq_desc'
                         chip->irq_ack(&desc->irq_data);
                                        ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:17:17: note: forward 
declaration of 'struct irq_desc'
                                      struct irq_desc *desc)
                                             ^
media_tree/include/linux/irqchip/chained_irq.h:32:44: warning: 
declaration of 'struct irq_chip' will not be visible outside of this 
function [-Wvisibility]
--- obj-media_tree-drivers-input-touchscreen-sur40.o ---
-Imedia_tree/include -Imedia_tree/include/uapi 
-Imedia_tree/include/media -I/usr/local -I/usr/local/include -include 
webcamd_global.h -DCONFIG_DVB_USB_DEBUG -DHAVE_DEBUG -g   -MD  
-MF.depend.obj-media_tree-drivers-input-touchscreen-sur40.o 
-MTobj-media_tree-drivers-input-touchscreen-sur40.o -std=gnu99 
-Wno-format-zero-length -nobuiltininc -idirafter 
/usr/lib/clang/11.0.1/include -fstack-protector-strong    
-Qunused-arguments    -o 
obj-media_tree-drivers-input-touchscreen-sur40.o 
media_tree/drivers/input/touchscreen/sur40.c
--- obj-media_tree-drivers-input-touchscreen-egalax_ts.o ---
static inline void chained_irq_exit(struct irq_chip *chip,
                                            ^
media_tree/include/linux/irqchip/chained_irq.h:33:16: warning: 
declaration of 'struct irq_desc' will not be visible outside of this 
function [-Wvisibility]
                                     struct irq_desc *desc)
                                            ^
media_tree/include/linux/irqchip/chained_irq.h:35:10: error: incomplete 
definition of type 'struct irq_chip'
         if (chip->irq_eoi)
             ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:32:44: note: forward 
declaration of 'struct irq_chip'
static inline void chained_irq_exit(struct irq_chip *chip,
                                            ^
media_tree/include/linux/irqchip/chained_irq.h:36:7: error: incomplete 
definition of type 'struct irq_chip'
                 chip->irq_eoi(&desc->irq_data);
                 ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:32:44: note: forward 
declaration of 'struct irq_chip'
static inline void chained_irq_exit(struct irq_chip *chip,
                                            ^
media_tree/include/linux/irqchip/chained_irq.h:36:22: error: incomplete 
definition of type 'struct irq_desc'
                 chip->irq_eoi(&desc->irq_data);
                                ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:33:16: note: forward 
declaration of 'struct irq_desc'
                                     struct irq_desc *desc)
                                            ^
media_tree/include/linux/irqchip/chained_irq.h:38:7: error: incomplete 
definition of type 'struct irq_chip'
                 chip->irq_unmask(&desc->irq_data);
                 ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:32:44: note: forward 
declaration of 'struct irq_chip'
static inline void chained_irq_exit(struct irq_chip *chip,
                                            ^
media_tree/include/linux/irqchip/chained_irq.h:38:25: error: incomplete 
definition of type 'struct irq_desc'
                 chip->irq_unmask(&desc->irq_data);
                                   ~~~~^
media_tree/include/linux/irqchip/chained_irq.h:33:16: note: forward 
declaration of 'struct irq_desc'
                                     struct irq_desc *desc)
                                            ^
In file included from 
media_tree/drivers/input/touchscreen/egalax_ts.c:27:
In file included from media_tree/include/linux/of_gpio.h:14:
media_tree/include/linux/gpio/driver.h:137:2: error: unknown type name 
'irq_flow_handler_t'
         irq_flow_handler_t handler;
         ^
media_tree/include/linux/gpio/driver.h:167:2: error: unknown type name 
'irq_flow_handler_t'
         irq_flow_handler_t parent_handler;
         ^
media_tree/include/linux/gpio/driver.h:248:29: warning: declaration of 
'struct irq_data' will not be visible outside of this function 
[-Wvisibility]
         void            (*irq_enable)(struct irq_data *data);
                                              ^
media_tree/include/linux/gpio/driver.h:255:30: warning: declaration of 
'struct irq_data' will not be visible outside of this function 
[-Wvisibility]
         void            (*irq_disable)(struct irq_data *data);
                                               ^
media_tree/include/linux/gpio/driver.h:261:29: warning: declaration of 
'struct irq_data' will not be visible outside of this function 
[-Wvisibility]
         void            (*irq_unmask)(struct irq_data *data);
                                              ^
media_tree/include/linux/gpio/driver.h:268:27: warning: declaration of 
'struct irq_data' will not be visible outside of this function 
[-Wvisibility]
         void            (*irq_mask)(struct irq_data *data);
                                            ^
media_tree/include/linux/gpio/driver.h:616:8: error: unknown type name 
'irq_hw_number_t'
                      irq_hw_number_t hwirq);
                      ^
media_tree/include/linux/gpio/driver.h:620:13: warning: declaration of 
'struct irq_data' will not be visible outside of this function 
[-Wvisibility]
                                  struct irq_data *data, bool reserve);
                                         ^
media_tree/include/linux/gpio/driver.h:622:16: warning: declaration of 
'struct irq_data' will not be visible outside of this function 
[-Wvisibility]
                                     struct irq_data *data);
                                            ^
In file included from 
media_tree/drivers/input/touchscreen/egalax_ts.c:27:
media_tree/include/linux/of_gpio.h:103:9: warning: implicit declaration 
of function 'of_count_phandle_with_args' is invalid in C99 
[-Wimplicit-function-declaration]
         return of_count_phandle_with_args(np, propname, "#gpio-cells");
                ^
media_tree/drivers/input/touchscreen/egalax_ts.c:244:6: warning: 
implicit declaration of function 'device_may_wakeup' is invalid in C99 
[-Wimplicit-function-declaration]
         if (device_may_wakeup(dev))
             ^
media_tree/drivers/input/touchscreen/egalax_ts.c:245:10: warning: 
implicit declaration of function 'enable_irq_wake' is invalid in C99 
[-Wimplicit-function-declaration]
                 return enable_irq_wake(client->irq);
                        ^
media_tree/drivers/input/touchscreen/egalax_ts.c:255:6: warning: 
implicit declaration of function 'device_may_wakeup' is invalid in C99 
[-Wimplicit-function-declaration]
         if (device_may_wakeup(dev))
             ^
media_tree/drivers/input/touchscreen/egalax_ts.c:256:10: warning: 
implicit declaration of function 'disable_irq_wake' is invalid in C99 
[-Wimplicit-function-declaration]
                 return disable_irq_wake(client->irq);
                        ^
media_tree/drivers/input/touchscreen/egalax_ts.c:273:21: warning: 
initializing 'void *' with an expression of type 'const struct 
of_device_id [2]' discards qualifiers 
[-Wincompatible-pointer-types-discards-qualifiers]
                 .of_match_table = egalax_ts_dt_ids,
                                   ^~~~~~~~~~~~~~~~
16 warnings and 17 errors generated.
*** [obj-media_tree-drivers-input-touchscreen-egalax_ts.o] Error code 1

make[2]: stopped in /usr/ports/multimedia/webcamd/work/webcamd-5.13.2.2
--- obj-media_tree-drivers-input-tablet-aiptek.o ---
1 warning generated.
1 error

make[2]: stopped in /usr/ports/multimedia/webcamd/work/webcamd-5.13.2.2
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure 
to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/multimedia/webcamd
*** Error code 1

Stop.
make: stopped in /usr/ports/multimedia/webcamd
#


More information about the freebsd-usb mailing list