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

addpkg(root/libgpiod): add v2.2 #22689

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

Conversation

Grimler91
Copy link
Member

@Grimler91 Grimler91 commented Dec 26, 2024

libgpiod allows for checking and setting different GPIO pins in the device, if kernel is new enough.

@Grimler91 Grimler91 requested a review from TomJo2000 as a code owner December 26, 2024 17:47
libgpiod allows for checking and setting different GPIO pins in the
device, if kernel is new enough (>= v4.6).
@Biswa96
Copy link
Member

Biswa96 commented Dec 26, 2024

I have tested the package. gpioinfo does not show expected output for some reason.

# /data/data/com.termux/files/usr/bin/gpiodetect
gpiochip0 [1000000.pinctrl] (134 lines)
gpiochip1 [200f000.qcom,spmi:qcom,pm8937@0] (5 lines)
gpiochip2 [200f000.qcom,spmi:qcom,pmi8950@] (2 lines)
gpiochip3 [200f000.qcom,spmi:qcom,pm8937@0] (4 lines)
gpiochip4 [200f000.qcom,spmi:qcom,pmi8950@] (4 lines)

# /data/data/com.termux/files/usr/bin/gpioinfo
/data/data/com.termux/files/usr/bin/gpioinfo: unable to read info for line 0 from gpiochip0: Invalid argument

But /system/bin/gpioinfo works as expected. Probably, it's device specific quirk.

ioctl(3, GPIO_GET_CHIPINFO_IOCTL, 0x7fd11480f4) = 0
ioctl(3, _IOC(_IOC_READ|_IOC_WRITE, 0xb4, 0x5, 0x100), 0x7fd1148038) = -1 EINVAL (Invalid argument)

@Grimler91
Copy link
Member Author

@Biswa96 interesting, thanks for testing! What device are you using? I can ask on the libgpiod if error is expected on (some) android kernels.. Also intersting that you have a /system/bin/gpioinfo, I do not on my fairphone 4

@Biswa96
Copy link
Member

Biswa96 commented Dec 27, 2024

I am using Linux kernel 4.19.318 https://github.com/LineageOS/android_kernel_xiaomi_msm8937. The /system/bin/gpioinfo is from toybox.

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