Gnanasekar Loganathan | 8 Dec 2010 09:20
Picon

i2c device scan/list

Hi All,

Is there any command to list or scan the i2c devices attached in the
NetBSD5 kernel?

Thanks,
Gnana

Jukka Ruohonen | 20 Dec 2010 10:18
Picon
Picon
Favicon

Re: i2c device scan/list

On Wed, Dec 08, 2010 at 01:50:14PM +0530, Gnanasekar Loganathan wrote:
> Is there any command to list or scan the i2c devices attached in the
> NetBSD5 kernel?

The iic(4) manual page lists quite a few devices, although it is not
entirely comprehensive.[*]

But if you mean whether it is possible to scan the I2C devices possibly
available on the machine, I believe no such functionality exists, at least
by default. However, if you take a peek at iic(9) and 'src/sys/dev/i2c/i2c.c',
there is a #ifdef I2C_SCAN. I haven't tried it, so I do not know how well it
works.

- Jukka.

[*] Apparently that page is only available on -current; here see
    http://netbsd.gw.com/cgi-bin/man-cgi?iic++NetBSD-current

Paul Goyette | 20 Dec 2010 10:23

Re: i2c device scan/list

I use 'options I2C_SCAN' all the time with no problem.  However, there 
are devices that can hang the bus when probed.  See the warning on the 
options(4) man page.

On Mon, 20 Dec 2010, Jukka Ruohonen wrote:

> On Wed, Dec 08, 2010 at 01:50:14PM +0530, Gnanasekar Loganathan wrote:
>> Is there any command to list or scan the i2c devices attached in the
>> NetBSD5 kernel?
>
> The iic(4) manual page lists quite a few devices, although it is not
> entirely comprehensive.[*]
>
> But if you mean whether it is possible to scan the I2C devices possibly
> available on the machine, I believe no such functionality exists, at least
> by default. However, if you take a peek at iic(9) and 'src/sys/dev/i2c/i2c.c',
> there is a #ifdef I2C_SCAN. I haven't tried it, so I do not know how well it
> works.
>
> - Jukka.
>
> [*] Apparently that page is only available on -current; here see
>    http://netbsd.gw.com/cgi-bin/man-cgi?iic++NetBSD-current
>
> !DSPAM:4d0f1f802367187616971!
>
>
>

-------------------------------------------------------------------------
(Continue reading)


Gmane