Re: [PATCH v4 1/1] i2c: keba: Add KEBA I2C controller support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Gerhard,

...

> > > +		unsigned short const addr_list[2] = { info[i].addr,
> > > +						      I2C_CLIENT_END };
> > > +
> > > +		client = i2c_new_scanned_device(&ki2c->adapter, &info[i],
> > > +						addr_list, NULL);
> > 
> > so this comes with a known client's list. Stupid question, have
> > you checked the address range is OK for this use?
> 
> Yes, the addresses are 0x4c (EMC1403) and 0x50 to 0x56 (EEPROMs).
> All between 0x08 and 0x77. All devices are working/found.

just making sure :-)

> > > +			ki2c_unregister_devices(ki2c);
> > 
> > ...
> > 
> > > +	/* reset bus before probing I2C devices */
> > > +	ret = ki2c_reset_bus(ki2c);
> > > +	if (ret)
> > > +		goto out;
> > 
> > We can still have the enabling and the reset at the end, I don't
> > seen any interaction with the hardware.
> 
> At least ki2c_register_device() does interact with the hardware. It uses
> i2c_new_scanned_device() which probes the devices.
> 
> IMHO the device shall be ready to operate when devm_i2c_add_adapter()
> is called. Because the user space can trigger I2C action as soon as
> devm_i2c_add_adapter() is done. So enabling and reset after
> devm_i2c_add_adapter() would be a potential race against user space I2C
> actions. Is that correct?

It's OK! Thanks.

Andi




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux