Pea
Pea

Reputation: 1

Access /sys/bus/w1/ from kernel module

I am new to kernel device driver development(or Linux development). I currently have a 1-wire memory device that shows up in /sys/bus/w1/devices/w1_bus_master1/. There I can read the eeprom and other features. But now I would like to create a module that could be accessed from userspace that decodes the contents from that memory.

So basically my goal is: W1 Device driver <--> DS24xxx <--> My module > User space application.

I tried already with filp_open() but I am not able to read. I am using a kernel v6.1. Is this the right way to do what I want to achieve or is there a better approach? I read that is not recommended to perform file IO operations in kernel. Would appreciate any guidance.

Upvotes: 0

Views: 48

Answers (0)

Related Questions