i2c: Get rid of the legacy binding model
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | i2c: Kill client_register and client_unregister methodsDocumentation/ drivers/ include/ | +2 | 0 replies | |
| 2/6 | i2c: Get rid of the legacy binding modelDocumentation/ Documentation/ drivers/ +1 more | +18 | 2 replies | |
| 3/6 | i2c: Drop i2c_probe functiondrivers/ include/ | +0 | 0 replies | |
| 4/6 | i2c: Merge i2c_attach_client into i2c_new_devicedrivers/ | +41 | 0 replies | |
| 5/6 | i2c: Kill is_newstyle_driverdrivers/ include/ | +1 | 0 replies | |
| 6/6 | i2c: Kill the redundant client listdrivers/ include/ | +0 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/6] i2c: Get rid of the legacy binding model
As the last few remaining legacy i2c drivers are being converted, we can finally get rid of the legacy binding model supporting code in i2c-core. Here come 6 patches which do exactly that:
[1/6] i2c: Kill client_register and client_unregister methods [2/6] i2c: Get rid of the legacy binding model [3/6] i2c: Drop i2c_probe function
[4/6] i2c: Merge i2c_attach_client into i2c_new_device [5/6] i2c: Kill is_newstyle_driver
[6/6] i2c: Kill the redundant client list
As one would expect, the size reduction is very significant:
Documentation/feature-removal-schedule.txt | 10 - Documentation/i2c/writing-clients | 16 - drivers/i2c/i2c-core.c | 366 +++-------------------------- include/linux/i2c.h | 57 +---- 4 files changed, 48 insertions(+), 401 deletions(-)
Quoted 1 line
From a binary perspective, "size" announces an 18% shrink.
There are two things which should still be investigated.
1* In i2c_device_uevent() there is the following piece of code:
/* by definition, legacy drivers can't hotplug */ if (dev->driver) return 0;
David, I presume this can go away?
2* Core locking should be checked. I am not completely sure what core_lock was supposed to protect, nor what it should protect now. I think it should protect at least i2c_adapter_idr, driver->detect() calls (which may add a device to the driver->clients list) and driver->attach_adapter() calls (for the same reason), although for the latter two, a per-driver lock may be more appropriate.
At the moment, we also hold the lock for all of i2c_register_adapter(), i2c_del_adapter() and i2c_del_driver(), but not i2c_register_driver(), which seems a little inconsistent. David, do you know if we need to serialize the calls to device_register() and device_unregister(), or if the driver core takes care of this for us?
Anything else needs to be protected?
Signature · 1 line
Jean Delvare