Products > Programming

Linux: stop using /sys/class/gpio!

<< < (4/5) > >>

DiTBho:

--- Quote from: Nominal Animal on May 03, 2023, 03:15:38 am ---I've suggested submitting the kernel patches in PMs.

--- End quote ---

I asked a developer what he thinks and he said the "hacks" don't deserve attention since in my case a better thing to do would be to fix the voltage regulator && the device tree part && the gpio-specific part of the Mediatek SoC.


--- Code: ---        reg_usb_vbus: reg_usb_vbus
        {
                compatible = "regulator-fixed";
                regulator-name = "usb_vbus";
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
                //gpio = <&gpio 12 GPIO_ACTIVE_HIGH>; <---- commented, handled by phy-en
                enable-active-high;
                regulator-boot-on;
                regulator-always-on;
        };

--- End code ---
(this part of device-tree is correct  but the kernel driver doesn't correctly handle it)

So, okey ... mine is not a "patch" but rather a "hack"  :o :o :o

DiTBho:
oh, back to reason why I opened this topic: need to learn chardev-gpio? good examples in the link  :D

5U4GB:

--- Quote from: Monkeh on May 01, 2023, 07:52:40 pm ---That's quite new compared to many embedded devices. Pretty sure some vendors are still shipping SDKs and binary drivers for 2.6.

--- End quote ---

2.6.2x is the forever kernel.  There are essentially two versions of Linux that you need to deal with, $latest_release and 2.6.2x.

DiTBho:

--- Quote from: 5U4GB on May 03, 2023, 10:42:43 am ---2.6.2x is the forever kernel.  There are essentially two versions of Linux that you need to deal with, $latest_release and 2.6.2x.

--- End quote ---

yup, when you talk with devs, they are usually to say "kernel_next", which means $latest_release
         git clone https://git.kernel.org/pub/... something
but, sometimes you still find it useful to deal with the simplicity of kernel  v2.4

kernel v2.4 have simpler PCI code for example, and the kernel tree embeds most of the initializations that kernels >2.6 expect to be performed by the firmware

Monkeh:

--- Quote from: 5U4GB on May 03, 2023, 10:42:43 am ---
--- Quote from: Monkeh on May 01, 2023, 07:52:40 pm ---That's quite new compared to many embedded devices. Pretty sure some vendors are still shipping SDKs and binary drivers for 2.6.

--- End quote ---

2.6.2x is the forever kernel.  There are essentially two versions of Linux that you need to deal with, $latest_release and 2.6.2x.

--- End quote ---

That's what they'd like, but no, I actively refuse to have anything to do with such.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod