Accessing i2c in linux: /dev/ vs /sys/class
Hello I'm a novice embedded linux engineer still learning the ropes.

I have previously worked on a project where I had to use the i2c bus to access a peripheral. I did so simply by using the /dev/i2c-1 device file.

I'm am on a new project now where the customer seems to not be using the /dev/ directory for much of anything at all. When I saw that /dev/i2c-1 didn't exist, I assume the kernel wasn't built with i2c support. I asked the customer, and they pointed me towards the directory /sys/class/i2c-dev/i2c-1/.

I don't understand how this is different than the /dev/ file, why they chose to do it this way, or how I can work with it.

This is a relatively open ended question. I guess I'm looking for answers to the above question, and possible to be pointed to some documentation than can broaden my understanding.
Accessing i2c in linux: /dev/ vs /sys/class
===

Hello I'm a novice embedded linux engineer still learning the ropes.

I have previously worked on a project where I had to use the i2c bus to access a peripheral. I did so simply by using the /dev/i2c-1 device file.

I'm am on a new project now where the customer seems to not be using the /dev/ directory for much of anything at all. When I saw that /dev/i2c-1 didn't exist, I assume the kernel wasn't built with i2c support. I asked the customer, and they pointed me towards the directory /sys/class/i2c-dev/i2c-1/.

I don't understand how this is different than the /dev/ file, why they chose to do it this way, or how I can work with it.

This is a relatively open ended question. I guess I'm looking for answers to the above question, and possible to be pointed to some documentation than can broaden my understanding.