Commit aae1cf3
i2c: expose adapter probe and remove probed functions
Publicly expose functions for detecting devices and removing detected
devices.
Currently an i2c adapter only probes/detects new devices when the adapter
is added or when a new i2c driver is added. This adds a new function,
i2c_adapter_probe(), that allows detecting sensors at any time.
Furthermore, the function i2c_adapter_remove_probed() is added to remove
the devices added by i2c_adapter_probe() at any time.
The intended use of these functions is for LEGO MINDSTORMS sensors. These
are hot-plugable I2C devices. When a sensor is connected, i2c_adapter_probe()
is called to automatically configure the sensor. When the sensor is
disconnected, i2c_adapter_remove_probed() is called to remove the
automatically configured device.
Signed-off-by: David Lechner <[email protected]>1 parent b0c9351 commit aae1cf3
2 files changed
+41
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1505 | 1505 | | |
1506 | 1506 | | |
1507 | 1507 | | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
1508 | 1525 | | |
1509 | 1526 | | |
1510 | 1527 | | |
| |||
1587 | 1604 | | |
1588 | 1605 | | |
1589 | 1606 | | |
1590 | | - | |
1591 | | - | |
1592 | | - | |
| 1607 | + | |
1593 | 1608 | | |
1594 | 1609 | | |
1595 | 1610 | | |
| |||
1735 | 1750 | | |
1736 | 1751 | | |
1737 | 1752 | | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
1738 | 1772 | | |
1739 | 1773 | | |
1740 | 1774 | | |
| |||
1759 | 1793 | | |
1760 | 1794 | | |
1761 | 1795 | | |
1762 | | - | |
1763 | | - | |
1764 | | - | |
1765 | | - | |
| 1796 | + | |
1766 | 1797 | | |
1767 | 1798 | | |
1768 | 1799 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
890 | 890 | | |
891 | 891 | | |
892 | 892 | | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
893 | 896 | | |
894 | 897 | | |
895 | 898 | | |
| |||
0 commit comments