GPIO Kernel Module
#6
(03-14-2020, 10:48 AM)Foxchild Wrote: /proc/config.gz shows quite some LED configs. so those are the modules that are built into the kernel already?
Is it possible to load and unload built-in kernel modules? In other words, would it be possible to write a new LED driver and unload the old one?

The leds-gpio.c driver is probably enabled by CONFIG_LEDS_GPIO. You can verify this by checking in https://elixir.bootlin.com/linux/v5.5.8/...vers/leds/ these files
  • Makefile: maps kernel configs to source files in this directory
  • Kconfig: explains the purpose of kernel configs in this directory
=m are loadable modules
=y are built-in modules

You can't easily remove built-in modules. Maybe there are some tricks. Google.

You can write your own led driver. Both, led-gpio and your driver should be able to co-exist. Nobody will trigger the led-gpio driver to access the gpio controller and even if someone does while your driver is accessing the gpio controller, no harm will be done to the hardware. I doubt you can put the controller in an inconsistent state, either.
  Reply


Messages In This Thread
GPIO Kernel Module - by Foxchild - 03-09-2020, 03:10 PM
RE: GPIO Kernel Module - by Foxchild - 03-09-2020, 05:16 PM
RE: GPIO Kernel Module - by Foxchild - 03-14-2020, 10:48 AM
RE: GPIO Kernel Module - by Der Geist der Maschine - 03-14-2020, 10:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  PSA: WiFi driver is broken - Unload kernel module to save lots of power Trbl 3 5,220 06-23-2021, 02:28 AM
Last Post: Merc
Lightbulb Python3 - GPIO - controlling LED's etc bonce 1 2,874 06-06-2021, 09:43 AM
Last Post: bonce
  Ubports Wifi Module not Returning Networks acohl 4 5,826 04-21-2021, 03:27 AM
Last Post: NinjaDino29
  Mainline kernel repo hns 5 9,009 02-15-2020, 08:47 AM
Last Post: hns

Forum Jump:


Users browsing this thread: 1 Guest(s)