[1] MLD-5.x / Systems / Raspberry PI / gpio pin 26 on mld 5.0
 

Offline koen

  • Newbie
  • *
  • Posts: 4
    • View Profile
gpio pin 26 on mld 5.0
« on: August 10, 2016, 15:04:37 »
I am running MLD linux 5.0 on a raspberry pi 2. The "made in China" case has a built-in lirc receiver on pin 26, so you need to give lirc_rpi an option:

/etc/modprobe.d/custom.conf: options lirc_rpi gpio_in_pin=26

Unfortunately, the lirc_rpi module thinks pin 26 is not a valid gpio pin. From the source:

int valid_gpio_pins[] = { 0, 1, 4, 8, 7, 9, 10, 11, 14, 15, 17, 18, 21, 22, 23, 24, 25 };

The easiest solution is taking a hex editor and edit /lib/modules/3.19.3.177/kernel/drivers/char/lirc_rpi.ko. Search for 0000001800000019 hex and change it to 000000180000001A hex. This adds the value '26' to the valid_gpio_pins[] array in lirc_rpi.c.

Reboot and you get:

[   27.998198] lirc_rpi: driver registered!
[   28.957066] lirc_rpi: auto-detected active low receiver on GPIO pin 26
[   29.528068] input: lircd as /devices/virtual/input/input0


I include the modified lirc_rpi.ko for mld linux 5.0.
« Last Edit: August 18, 2016, 18:07:30 by koen »

[1] MLD-5.x / Systems / Raspberry PI / gpio pin 26 on mld 5.0
 



Users Online Users Online

0 Members and 1 Guest are viewing this topic.