Skip to content
Advertisement

Tag: gpio

Purpose and usage of GPIO-Hog declaration

Questions What is the purpose and use-case of the gpio-hog declaration? Can a ‘hogged’ gpio pin be interfaced with from Userspace? If a ‘hogged’ gpio pin cannot be interfaced with from Userspace, then is there any mechanism to configure GPIO pins in the dts file for Userspace interaction? Background I am trying to configure many (10+) GPIOs to speak with

Example device-tree-aware i2c gpio driver for Linux?

Is there a good example device-tree-aware i2c gpio driver for Linux? I’ve been looking at gpio-pcf857x but it has a header file containing struct pcf857x_platform_data which is used in board files. I am looking for a similar example, but where the i2c id is defined-in/retrieved-from the device tree. Answer Take a look at max732x.c driver (code). As for I2C ID

ARM linux userspace gpio operations using mmap /dev/mem approach (able to write to GPIO registers, but fail to read from them)

Kernel version 3.12.30-AM335x-PD15.1.1 by PHYTEC. If I use the /sys/class/gpio way, I can see that the button input pin (gpio103 of AM3359) value changes from 0 to 1. Following the this exercise http://elinux.org/EBC_Exercise_11b_gpio_via_mmap and executing the below command for reading gpio pins usig /dev/mem approach: (base of gpio bank 3 which is 0x481ae000 + 0x13c dataout offset) I get the

No access to /dev/mem. Try running as root

I’m a newbie! I have python files code to turn on the light: i tried here and here and here here on forum i chmod pi for /dev , adduser group file 1 file 2 access GPIO: Error occurs here. “No access to /dev/mem. Try running as root!” i have try here and here and here here on forum and

Periodic task in a Linux kernel module

Currently I am developing GPIO kernel module for friendlyarm Linux 2.6.32.2 (mini2440). I am from electronics background and new to Linux. The kernel module loaded at start-up and the related device file is located in /dev as gpiofreq. At first time writing to device file, GPIO pin toggles continuously at 50kHz. At second time writing it stop toggling. At third

Advertisement