Message ID | 1617197790-30627-1-git-send-email-yangyicong@hisilicon.com |
---|---|
Headers | show |
Series | Add support for HiSilicon I2C controller | expand |
On Wed, Mar 31, 2021 at 09:36:26PM +0800, Yicong Yang wrote: > Some I2C controller drivers will only unregister the I2C > adapter in their .remove() callback, which can be done > by simply using a managed variant to add the I2C adapter. > > So add the managed functions for adding the I2C adapter. Yes, I think we can do this. We just need to pay attention that people make sure interrupts are disabled and/or freed when the adapter gets removed. But this is also true for the current situation. I.e. removing the adapter manually in remove() and then relying on devm_ to free the interrupt is a bit dangerous. > + return devm_add_action_or_reset(dev, devm_i2c_del_adapter, adapter); Cool, I didn't know this function.
On Wed, Mar 31, 2021 at 09:36:25PM +0800, Yicong Yang wrote: > Add driver and MAINTAINERS for HiSilicon I2C controller on Kunpeng SoC. Also > provide the devm_*() variants for adding the I2C adapters. Add a public > api to provide I2C frequency mode strings and convert designware driver > to use it. Thanks, this series is in a very good condition. One question about patch 2, the rest are minor nits (see the patches themselves). It will make it for 5.13.