linux-device-driver

How to do a "kill_proc()" in Linux Kernel 2.6.31.5

Hi, Trying this free forum for developers. I am migrating a serial driver to kernel 2.6.31.5. I have used various books and articles to solve problems going from 2.4 Now I have a couple of kill_proc that is not supported anymore in kernel 2.6.31.5 What would be the fastest way to migrate this into the kernel 2.6.31.5 way of killing a ...

How to keep asm output from Linux kernel module build

I'm working on a Linux kernel module for a 2.6.x kernel and I need to view the assembly output, though it's currently being done as a temporary file an deleted afterwords. I'd like to have the assembly output mixed with my C source file so I can easily trace where my problem lies. This is for an ARMv6 core and apparently objdump doesn'...

Linux: Ways to communicate with kernel module from user space.

Hello, What are the ways to communicate with a kernel module from user space? By communication i mean sending information and commands between the module and a user space process. I currently know of two way: open/close/read/write/ioctl on published device node. read/write on exported and hooked /proc file. More specifically, can ...

Linux: how do i know the module that exports a device node?

Hello, If a have a /dev device node and its major/minor numbers how do i know the kernel module name that exported this node? ...

Can class of linux device be NULL?

Can I pass NULL pointer to the first argument of device_create function? I'm using device_create() to create character device file in sysfs. This file don't represent any physical device (it is used to provide an access to a set of devices connected to various buses). What class should I use with device_create() to create such a file? ...

What is the sequence followed by the Linux kernel to configure a device?

As I understood after reading the chapter related to The Linux Device Model in the Linux Device Drivers 3rd Edition, when a new device is configured, the kernel (2.6) follows more or less this sequence: The Device is registered in the driver core (device_register(), what includes device initialization) A kobject is registered in the de...

Problem calling linux C code from FIQ handler

I'm working on an armv6 core and have an FIQ hander that works great when I do all of my work in it. However I need to branch to some additional code that's too large for the FIQ memory area. The FIQ handler gets copied from fiq_start to fiq_end to 0xFFFF001C when registered static void test_fiq_handler(void) { asm volatile("\ ...

What does a linux device need to be seen by Hal?

I'm trying to learn about device drivers on Linux Kernel, for that I've created three modules with: A bus type A device driver A fake device that does nothing now, only is registered Everything works fine, I can load the bus, the driver and the module that creates the device. Everything appears on sysfs, including the link between th...

How to make an existing socket fail?

OK. So, this is exactly the opposite of what everyone asks about in network programming. Usually, people ask how to make a broken socket work. I, on the other hand am looking for the opposite. I currently have sockets working fine, and want them to break to re-create this problem we are seeing. I am not sure how to go about intent...

What register state is saved on a context switch in Linux?

Where in Linux would you look to find out what registers are saved on a context switch? I'm wondering, for example, if it is safe to use FP or vector registers in kernel-mode driver code (mostly interested in x86-64 and ARM, but I'm hoping for an architecture-independent answer). ...

Probe problem when writing a I2C device driver...

Hi all, I am a newbie in writing linux device driver, forgive me if anything stupid a asked and my poor English^^ I am trying to write a driver for a touch panel, which communicate with CPU via I2C. I tried to add a device driver into linux platform, and the register was success, I mean the driver was loaded, but the probe function did...

How to implement/debug a sensor driver in ANDROID

Does anyone know of a walk-through or any examples of any code to setup sensors in android. I have the drivers available to me. Also i have implemented the sensors library as instructed in the Android-Reference along the sensors.h template. I am still unable to get any response at the apps level. How do i trace this issue? what might...

linux usb driver: probing already plugged devices

hello, im writing a Usb driver and i have an issue. when i insmod the driver with the device already plugged in before, the probe function is not called. it is only called after i disconnect the device and plug it again. i wanna make it work when i start my pc with the device plugged in. could someone please help me? best regards, jacob....

How do you pronounce FUSE(File System in Userspace)?

How do you pronounce FUSE? Let me know the pronunciation. Thanks. ...

Linux driver phys_mem_access_prot undefined

I have a loadable module that is throwing a warning about phys_mem_access_prot when built under Ubuntu 9.10 (Linux 2.6.31-22-server). [664] make -C /lib/modules/`uname -r`/build M=`pwd` make: Entering directory `/usr/src/linux-headers-2.6.31-22-server' LD /home/chuck/dev/svd/built-in.o CC [M] /home/chuck/dev/svd/svd.o LD [M...

Ethernet switch device driver

Hi We're designing a network device based around SoC, which contains MIPS core and 5-ports switch core, connected to the CPU via internal MII port. Device driver provided by a chip vendor represents 5-port switch as a single inteface from the OS perspective; the driver also supports VLAN and currently it splits 5 ports in two VLAN grou...

How to see changelogs for a particular module in kernel

Hello, I want to know how to see the changelogs or commit messages for a module in the kernel. Actually i modified virtio_net in kernel2.6.26. Now the virtio_net in 2.6.34 seems to be lot different from the one in 2.6.26. There should be some git commit messages or changelogs for the different versions of virtio_net. I want to know the...

Linux kernel driver: what model for NVRAM access?

I just wrote a RTC driver for an NXP RTC chip on my board, it works great. This chip also has some battery backed RAM that I'd like to make available to a user space application. The RTC framework doesn't support this. It's only 512 bytes but I'm tossed between doing a seekable CHAR driver or a full blown BLOCK driver. I've never don...

"FATAL: Module not found error" using modprobe

Hello, i have an problem with modprobe command...i compiled the hello world module and inserted using "insmod" command...and its working..when i see "lsmod" its in that list...but when i insert this module using "modprobe" i am getting the FATAL error....that is root@okapi:/home/ravi# modprobe ./hello.ko FATAL: Module ./hello.ko not f...

Linux - mounting a user space file system(mimicking one :-) ) as a FileSystem

Hi Guys, I have a piece of C code which with a chunk of memory(static array) can mimic file operations (It has APIs similar to fopen/fclose etc). So, any code that is compiled with this mimicking FileSystem can use these APIs as a FileSystem for all their needs :) But I was wondering, if its possible somehow to register these APIs with...