Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

It looks like they changed the CONFIG_ARCH_ name on newer kernels #12

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

Conversation

hamishcoleman
Copy link

I only patched the gpio_keys_device.c because that is the only tool I tested

@notro
Copy link
Owner

notro commented May 30, 2017

I'm not sure what to do with this, because it will only work on Pi1 always setting #define BCM2708_PERI_BASE 0x20000000. Compiled for a Pi2/3 it will use the wrong address.
From 4.9 on only CONFIG_ARCH_BCM2835 exists and the Device Tree tells which model it is.

The preferred way to use gpiokeys now is to use a Device Tree overlay. Here's an example: https://github.com/raspberrypi/linux/blob/rpi-4.9.y/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts

@hamishcoleman
Copy link
Author

Yeah - once I had found the code and saw what the fix was, I started looking for some simple device-tree answer.

While I can see that a device tree overlay is the 'right' answer, it is surely a much more annoying answer to use to stuff around with various options.

If I get a chance, I will look further for a different patch that uses something like of_find_node_by_name() to get the defined gpio base address.

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

Successfully merging this pull request may close these issues.

2 participants