Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iio: apple-ib-als: remove usage of iio_priv_to_dev() helper #52

Open
wants to merge 1 commit into
base: mbp15
Choose a base branch
from

Conversation

marcosfad
Copy link

Update for Kernel 5.9

@marc-git
Copy link

marc-git commented Nov 14, 2020

Getting the following error on 5.9.0-2:

DKMS make.log for apple-ibridge-0.1 for kernel 5.9.0-2-amd64 (x86_64)
Sat 14 Nov 15:22:44 CET 2020
make -C /lib/modules/5.9.0-2-amd64/build M=/var/lib/dkms/apple-ibridge/0.1/build modules
make[1]: Entering directory '/usr/src/linux-headers-5.9.0-2-amd64'
  CC [M]  /var/lib/dkms/apple-ibridge/0.1/build/apple-ibridge.o
  CC [M]  /var/lib/dkms/apple-ibridge/0.1/build/apple-ib-tb.o
  CC [M]  /var/lib/dkms/apple-ibridge/0.1/build/apple-ib-als.o
/var/lib/dkms/apple-ibridge/0.1/build/apple-ib-als.c: In function ‘appleals_config_iio’:
/var/lib/dkms/apple-ibridge/0.1/build/apple-ib-als.c:468:28: error: implicit declaration of function ‘iio_priv_to_dev’ [-Werror=implicit-function-declaration]
  468 |  struct iio_dev *iio_dev = iio_priv_to_dev(als_dev);
      |                            ^~~~~~~~~~~~~~~
/var/lib/dkms/apple-ibridge/0.1/build/apple-ib-als.c:468:28: warning: initialization of ‘struct iio_dev *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-5.9.0-2-common/scripts/Makefile.build:288: /var/lib/dkms/apple-ibridge/0.1/build/apple-ib-als.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/usr/src/linux-headers-5.9.0-2-common/Makefile:1796: /var/lib/dkms/apple-ibridge/0.1/build] Error 2
make[1]: *** [/usr/src/linux-headers-5.9.0-2-common/Makefile:185: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.9.0-2-amd64'
make: *** [Makefile:13: all] Error 2

... when I didn't use your patch!
Then when I used it compiled correctly... but I have no touchbar on MBP 14,3

@marc-git
Copy link

Here is the output of :
`sudo cat /var/log/kern.log | grep 'apple'


Nov 12 12:04:14 mbpdeddy kernel: [    1.433534] applespi spi-APP000D:00: modeswitch done.
Nov 12 12:04:14 mbpdeddy kernel: [   59.993591] apple_gmux: Found gmux version 4.0.29 [indexed]
Nov 12 12:04:14 mbpdeddy kernel: [   60.262241] usbcore: registered new device driver apple-mfi-fastcharge
Nov 12 12:04:14 mbpdeddy kernel: [   60.961186] applesmc: key=902 fan=2 temp=46 index=45 acc=0 lux=0 kbd=0
Nov 12 12:04:14 mbpdeddy kernel: [   60.961277] applesmc applesmc.768: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
Nov 12 14:55:57 mbpdeddy kernel: [    1.381123] applespi spi-APP000D:00: Received corrupted packet (crc mismatch)
Nov 12 14:55:57 mbpdeddy kernel: [    1.381876] applespi spi-APP000D:00: modeswitch done.
Nov 12 14:55:57 mbpdeddy kernel: [   28.485867] apple_gmux: Found gmux version 4.0.29 [indexed]
Nov 12 14:55:57 mbpdeddy kernel: [   28.645316] usbcore: registered new device driver apple-mfi-fastcharge
Nov 12 14:55:57 mbpdeddy kernel: [   29.260918] applesmc: key=902 fan=2 temp=46 index=45 acc=0 lux=0 kbd=0
Nov 12 14:55:57 mbpdeddy kernel: [   29.261067] applesmc applesmc.768: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
Nov 12 15:10:39 mbpdeddy kernel: [    1.361709] applespi spi-APP000D:00: modeswitch done.
Nov 12 15:10:39 mbpdeddy kernel: [  484.275512] apple_gmux: Found gmux version 4.0.29 [indexed]
Nov 12 15:10:39 mbpdeddy kernel: [  484.506697] usbcore: registered new device driver apple-mfi-fastcharge
Nov 12 15:10:39 mbpdeddy kernel: [  485.021942] applesmc: key=902 fan=2 temp=46 index=45 acc=0 lux=0 kbd=0
Nov 12 15:10:39 mbpdeddy kernel: [  485.022017] applesmc applesmc.768: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
Nov 12 15:14:31 mbpdeddy kernel: [    1.365705] applespi spi-APP000D:00: modeswitch done.
Nov 12 15:14:31 mbpdeddy kernel: [   24.460255] apple_gmux: Found gmux version 4.0.29 [indexed]
Nov 12 15:14:31 mbpdeddy kernel: [   24.741363] usbcore: registered new device driver apple-mfi-fastcharge
Nov 12 15:14:31 mbpdeddy kernel: [   25.180830] applesmc: key=902 fan=2 temp=46 index=45 acc=0 lux=0 kbd=0
Nov 12 15:14:31 mbpdeddy kernel: [   25.180923] applesmc applesmc.768: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
Nov 13 09:25:44 mbpdeddy kernel: [    1.377546] applespi spi-APP000D:00: modeswitch done.
Nov 13 09:25:44 mbpdeddy kernel: [   17.458271] apple_gmux: Found gmux version 4.0.29 [indexed]
Nov 13 09:25:44 mbpdeddy kernel: [   17.654163] usbcore: registered new device driver apple-mfi-fastcharge
Nov 13 09:25:44 mbpdeddy kernel: [   18.192528] applesmc: key=902 fan=2 temp=46 index=45 acc=0 lux=0 kbd=0
Nov 13 09:25:44 mbpdeddy kernel: [   18.192628] applesmc applesmc.768: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
Nov 13 10:30:12 mbpdeddy kernel: [    1.318076] applespi spi-APP000D:00: Received corrupted packet (crc mismatch)
Nov 13 10:30:12 mbpdeddy kernel: [   14.298494] apple_gmux: Found gmux version 4.0.29 [indexed]
Nov 13 10:30:12 mbpdeddy kernel: [   14.428523] usbcore: registered new device driver apple-mfi-fastcharge
Nov 13 10:30:12 mbpdeddy kernel: [   15.053309] applesmc: key=902 fan=2 temp=46 index=45 acc=0 lux=0 kbd=0
Nov 13 10:30:12 mbpdeddy kernel: [   15.053407] applesmc applesmc.768: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
Nov 13 16:36:52 mbpdeddy kernel: [    1.306264] applespi spi-APP000D:00: modeswitch done.
Nov 13 16:36:52 mbpdeddy kernel: [   28.059867] apple_gmux: Found gmux version 4.0.29 [indexed]
Nov 13 16:36:52 mbpdeddy kernel: [   28.112896] usbcore: registered new device driver apple-mfi-fastcharge
Nov 13 16:36:52 mbpdeddy kernel: [   28.814649] applesmc: key=902 fan=2 temp=46 index=45 acc=0 lux=0 kbd=0
Nov 13 16:36:52 mbpdeddy kernel: [   28.814721] applesmc applesmc.768: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
Nov 13 16:40:17 mbpdeddy kernel: [  233.699959] apple-mfi-fastcharge 1-5: USB disconnect, device number 3
Nov 14 14:46:55 mbpdeddy kernel: [    1.342262] applespi spi-APP000D:00: modeswitch done.
Nov 14 14:46:55 mbpdeddy kernel: [  104.729299] apple_gmux: Found gmux version 4.0.29 [indexed]
Nov 14 14:46:55 mbpdeddy kernel: [  104.914734] usbcore: registered new device driver apple-mfi-fastcharge
Nov 14 14:46:56 mbpdeddy kernel: [  105.523516] applesmc: key=902 fan=2 temp=46 index=45 acc=0 lux=0 kbd=0
Nov 14 14:46:56 mbpdeddy kernel: [  105.523750] applesmc applesmc.768: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
Nov 14 15:33:51 mbpdeddy kernel: [ 2920.947297] apple_ibridge: loading out-of-tree module taints kernel.
Nov 14 15:33:51 mbpdeddy kernel: [ 2920.947313] apple_ibridge: module verification failed: signature and/or required key missing - tainting kernel
Nov 14 15:35:32 mbpdeddy kernel: [    1.457439] applespi spi-APP000D:00: Received corrupted packet (crc mismatch)
Nov 14 15:35:32 mbpdeddy kernel: [    1.458253] applespi spi-APP000D:00: modeswitch done.
Nov 14 15:35:32 mbpdeddy kernel: [   13.705849] apple_ibridge: loading out-of-tree module taints kernel.
Nov 14 15:35:32 mbpdeddy kernel: [   13.715497] apple_ibridge: module verification failed: signature and/or required key missing - tainting kernel
Nov 14 15:35:32 mbpdeddy kernel: [   13.716154] apple_gmux: Found gmux version 4.0.29 [indexed]
Nov 14 15:35:32 mbpdeddy kernel: [   13.879040] usbcore: registered new device driver apple-mfi-fastcharge
Nov 14 15:35:33 mbpdeddy kernel: [   14.550099] applesmc: key=902 fan=2 temp=46 index=45 acc=0 lux=0 kbd=0
Nov 14 15:35:33 mbpdeddy kernel: [   14.550284] applesmc applesmc.768: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
Nov 14 16:11:48 mbpdeddy kernel: [    1.405903] applespi spi-APP000D:00: modeswitch done.
Nov 14 16:11:48 mbpdeddy kernel: [   11.439336] apple_ibridge: loading out-of-tree module taints kernel.
Nov 14 16:11:48 mbpdeddy kernel: [   11.449680] apple_ibridge: module verification failed: signature and/or required key missing - tainting kernel
Nov 14 16:11:48 mbpdeddy kernel: [   11.450391] apple_gmux: Found gmux version 4.0.29 [indexed]
Nov 14 16:11:48 mbpdeddy kernel: [   11.552762] usbcore: registered new device driver apple-mfi-fastcharge
Nov 14 16:11:48 mbpdeddy kernel: [   12.331961] applesmc: key=902 fan=2 temp=46 index=45 acc=0 lux=0 kbd=0
Nov 14 16:11:48 mbpdeddy kernel: [   12.332133] applesmc applesmc.768: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().

```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants