Re: [PATCH] I2C: ocores can add I2C devices to the bus

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

 



On Fri, 05 Jun 2009 09:12:57 +0200, Richard Röjfors wrote:
> Jean Delvare wrote:
> > 
> > I am now convinced your proposed implementation makes sense for your
> > specific need (which is relatively rare, which is why i2c-core doesn't
> > handle it.) And contrary to what I first wrote, this doesn't need to be
> > moved to i2c-core: this is specific enough that I'd rather let the code
> > live in the bus driver (i2c-ocores) for now, and only if at least two
> > other bus drivers need the same, consider moving it to i2c-core.
> > 
> > So if you fix the minor objection Ben had about your patch and resend
> > it, I think we can merge that.
> 
> Will do.
> 
> > Oh, and I also believe your driver
> > should call i2c_unregister_device() on removal, for symmetry.
> 
> Isn't better to leave that to i2c_del_adapter? Otherwise we need to store a list
> of the I2C-clients returned by i2c_new_device.

Err, you're right. I tend to forget that the parameters passed to
i2c_unregister_device() differ from those passed to i2c_new_device().
Maybe we'd need i2c_unregister_device_by_addr() or something. In the
meantime, yes, just leave it to i2c_del_adapter() to clean up the
remaining clients.

-- 
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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