Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
missing doc on the Gentoo Wiki: found
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Zazzman
n00b
n00b


Joined: 09 May 2012
Posts: 32

PostPosted: Fri Nov 10, 2017 9:09 pm    Post subject: missing doc on the Gentoo Wiki: found Reply with quote

https://wiki.gentoo.org/wiki/Hardware_detection

see the ??????? for i2c-tools package? the command we're missing is 'i2cdetect'. within that context, the user would probably only need the
Code:
i2cdetect -l
command. It outputs a neat little list of i2c buses, each with a description that should look deeply related to the kernel drivers necessary.

Correct me if I'm wrong, but card0-DP-1 and so on refers to the first DisplayPort (DP) on the first graphics card. and there's plenty more graphics related bit-bus entries to expect.

Note that other uses of the i2cdetect can destroy your hardware, according to the manpage.

So far, it looks like a nice way to probe for the SMBus/etc driver(s) to compile into your kernel, without having to dive deep into lshw, or pull up a desktop for lshw-gtk.
Back to top
View user's profile Send private message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Tue Jan 09, 2018 7:13 pm    Post subject: Re: missing doc on the Gentoo Wiki: found Reply with quote

Code:
i2cdetect -l

outputs nothing.. 8O what does that mean?
Back to top
View user's profile Send private message
kite14
Apprentice
Apprentice


Joined: 07 Nov 2006
Posts: 216
Location: Italy

PostPosted: Tue Jan 09, 2018 8:21 pm    Post subject: Reply with quote

josephg wrote:
Code:
i2cdetect -l

outputs nothing.. 8O what does that mean?

I guess the proper kernel driver is not loaded.
According to the README file that comes with the source tarball, these tools need the "i2c-dev" kernel driver
Quote:

https://www.kernel.org/doc/Documentation/i2c/dev-interface

«Usually, i2c devices are controlled by a kernel driver. But it is also
possible to access all devices on an adapter from userspace, through
the /dev interface. You need to load module i2c-dev for this.

Each registered i2c adapter gets a number, counting from 0. You can
examine /sys/class/i2c-dev/ to see what number corresponds to which adapter.
Alternatively, you can run "i2cdetect -l" to obtain a formatted list of all
i2c adapters present on your system at a given time. i2cdetect is part of
the i2c-tools package.»


To build i2c-dev driver, enable CONFIG_I2C_CHARDEV in kernel config (either "Y" or "M")
Back to top
View user's profile Send private message
kite14
Apprentice
Apprentice


Joined: 07 Nov 2006
Posts: 216
Location: Italy

PostPosted: Tue Jan 09, 2018 8:43 pm    Post subject: Reply with quote

Zazzman,
I edited the wiki page, replacing the "???????" with the appropriate command.
Back to top
View user's profile Send private message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Tue Jan 09, 2018 8:49 pm    Post subject: Reply with quote

kite14 wrote:
I guess the proper kernel driver is not loaded.
According to the README file that comes with the source tarball, these tools need the "i2c-dev" kernel driver

yes thank you. i2c-dev was not loaded. so i modprobe'd it along with all other i2c modules i found. now i have
Code:
$ lsmod | grep i2c
intel_quark_i2c_gpio    12288  0
i2c_slave_eeprom       12288  0
i2c_scmi               12288  0
i2c_ocores             12288  0
i2c_mux_reg            12288  0
i2c_mux_pinctrl        12288  0
i2c_mux_gpio           12288  0
i2c_mux                12288  3 i2c_mux_reg,i2c_mux_pinctrl,i2c_mux_gpio
i2c_ismt               12288  0
i2c_isch               12288  0
i2c_gpio               12288  0
i2c_dev                12288  0
i2c_algo_bit           12288  2 i2c_gpio,i915
i2c_i801               24576  0
i2c_smbus              12288  1 i2c_i801
mfd_core               12288  2 lpc_ich,intel_quark_i2c_gpio


Code:
# i2cdetect -l
i2c-3   i2c             i915 gmbus panel                        I2C adapter
i2c-1   i2c             i915 gmbus ssc                          I2C adapter
i2c-6   i2c             i915 gmbus dpd                          I2C adapter
i2c-4   i2c             i915 gmbus dpc                          I2C adapter
i2c-2   i2c             i915 gmbus vga                          I2C adapter
i2c-0   smbus           SMBus I801 adapter at 5000              SMBus adapter
i2c-7   i2c             DPDDC-D                                 I2C adapter
i2c-5   i2c             i915 gmbus dpb                          I2C adapter


if i sort it, it looks even better
Code:
# i2cdetect -l | sort
i2c-0   smbus           SMBus I801 adapter at 5000              SMBus adapter
i2c-1   i2c             i915 gmbus ssc                          I2C adapter
i2c-2   i2c             i915 gmbus vga                          I2C adapter
i2c-3   i2c             i915 gmbus panel                        I2C adapter
i2c-4   i2c             i915 gmbus dpc                          I2C adapter
i2c-5   i2c             i915 gmbus dpb                          I2C adapter
i2c-6   i2c             i915 gmbus dpd                          I2C adapter
i2c-7   i2c             DPDDC-D                                 I2C adapter


Zazzman wrote:
It outputs a neat little list of i2c buses, each with a description that should look deeply related to the kernel drivers necessary.

how would i relate this to my kernel config? i can only find an i2c_smbus in my kernel config.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum