Skip to content
Advertisement

Tag: linux-device-driver

When using PF_PACKET type of socket, what does PACKET_ADD_MEMBERSHIP?

When using a PF_PACKET type of socket with protocol type ETH_P_IP, the man packet documentation talks about a socket option for multicast. The socket option is PACKET_ADD_MEMBERSHIP. Assuming you use PACKET_ADD_MEMBERSHIP socket option on a PF_PACKET socket correctly, what features and benefits and use cases is this socket option for? Right now I receive all incoming IP packets so I

ALSA vs PulseAudio – Latency Concerns

Good day, I have been debating some details with a colleague about ALSA vs PulseAudio, and need some help coming to a conclusion with it. It’s to my understanding that ALSA is relatively low-level, and talks directly to the hardware, while PulseAudio sits on top of ALSA as a service. Additionally, it’s to my understanding that ALSA is tied to

What’s the CONFIG_OF in linux?

I see that it is being widely used at many places but could not understand in what scenarios I need to use it. What is CONFIG_OF? What is the full name of “OF”? Answer Open Firmware. This was invented long time ago when Apple was producing laptops based on PowerPC CPUs and Sun Microsystems workstations were still popular. Open Firmware

__builtin_return_address returns null for index >0?

I want to get the return address of the caller function. I’m using __builtin_return_address() funtion, but if I give index value greater than 0 it is returning NULL. Please help me with this or tell me any other function to get the same. Answer See this answer to a related question. __builtin_return_address is GCC and processor specific (also available in

Difference between spi_driver.id_table and spi_driver.driver.of_match_table

I’m currently trying to understand how linux drivers work. As far as I know, A driver’s probe/init function is called when the kernel parses the corresponding .compatible string in the device tree. However, in the arizona-spi driver it looks like there are multiple compatible strings referenced in different members: This is an excerpt from here. So what is the difference

difference between device file and device driver

I am currently reading the Linux Module Programming Guide and I have stumbled onto two terms that have confused a bit – device files and device driver. Upon goggling these terms I have come across the following- A device driver is a piece of software that operates or controls a particular type of device. A device file is an interface

Where do I store dynamically allocated memory on a platform device (without using globals)?

I want to make the platform driver I’m writing reentrant: where do I store memory dynamically assigned during the probe and/or open calls (int probe(struct platform_device*)/int open(struct inode *inode, struct file *)) The driver can be instantiated on multiple pieces of in-system hardware, with each of them being accessed concurrently from user space. Can I use the private_data field from

how to find Linux module path

in the linux, lsmod lists a lot of modules. but how can we find where those module loaded from. for some modules,linux command “modprobe -l” shows a path but some are not. edited i also tried “find” and “locate”. both of them lists all kind of versions Answer You can use “locate” or “find” command on these modules to find

Advertisement