dm: Add additional bus functionality
Get series with b4
b4 am [email protected]Versions newest first
- v3 Latest5 of 26 patches 0 repliesNew
5 of 26 patches are in this archive. The cover letter announces 26.
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 6/26 | dm: core: Allocate platform data when binding a device | +0 | 1 reply | |
| 7/26 | dm: core: Allow parents to have platform data for their children | +0 | 1 reply | |
| 10/26 | dm: core: Add a function to get a device's uclass ID | +0 | 1 reply | |
| 12/26 | dm: core: Allow uclasses to specify private data for a device's children | +0 | 1 reply | |
| 19/26 | dm: i2c: Move slave details to child platdata | +0 | 1 reply |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Masahiro Yamada |
|---|---|
| 6/26 | R-b |
| 7/26 | R-b |
| 10/26 | R-b |
| 12/26 | R-b |
| 19/26 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [U-Boot] [PATCH v3 0/26] dm: Add additional bus functionality
Hi Simon,
Quoted 48 lines · On Sun, 25 Jan 2015 08:26:54 -0700 Simon Glass <[email protected]> wrote:
The current bus implementation is simple but leaves some things to drivers which are better handled in the uclass.
At present uclasses cannot provide a common way of dealing with children (i.e. devices on the bus), so we have duplication in the drivers. The same code is repeated in each driver when it would be better to put it in the uclass.
Secondly, we don't have the concept of per-child platform data for devices on the bus. Instead the per-child data can only exist when the child is actually probed. This is not really suitable. Examples of things we want to know before a child is probed are:
- chip address (for I2C)
- chip select (for SPI)
- device address (for PCI)These things are static and do not change when the device is probed and removed. In some cases (such as SPI mode and maximum speed), the data may be copied to run-time data when the device is probed. It may then be changed while the driver is active, but the original platform data is never changed by drivers once it is set up.
To address these issues, additional functions are added:
- per-child platform data, which can be defined by the uclass and (if necessary) overriden by the bus driver. This allows the bus's uclass to provide some consistency here
- per-child post-bind and pre-probe methods in the uclass. These allow the bus uclass to set up the per-child platform data, and also to do any last-minute adjustments before the child is probed.With these changes, some code can be removed from the existing I2C and SPI drivers and this has been done as part of this series.
With this series I2C and SPI are tested on:
- jetson-tk1 (Tegra 124)
- beaver (Tegra 30)
- seaboard (Tegra 20, I2C only)
- trimslice (Tegra 20, SPI only)
- snow (Exynos 5250)
- pit (Exynos 5420, note I2C probe is previously broken)
- link (x86)
- sandboxNote: Some of these changes were previously included in the DM PCI RFC. This series is available at u-boot-dm/i2c-working.
Quoted 8 lines
Changes in v3:
- Add missing 'static' to two functions
- Change variable name fromparent_drvtouc_drv
- Fix comment to say 'node references' instead of 'phandles'
- Fix stale comment indevice_probe_child()
- Fix typo in commit subject
- Remove unnecessary check thatdev->parent_platdatais NULL
- Remove unnecessaryper_child_auto_alloc_sizevalue
I issued my Reviewed-by to some rest of the patches.
V3 looks good enough to be applied. Thank you!
Best Regards
Masahiro Yamada