Commit 4fb92bd
serial: sc16is7xx: hardware reset chip if reset-gpios is defined in DT
Some boards connect a GPIO to the reset pin, and the reset pin needs
to be set up correctly before accessing the chip.
Add a function to handle the chip reset. If the reset-gpios is defined
in the DT, do hardware reset through this GPIO, otherwise do software
reset as before.
Reviewed-by: Lech Perczak <[email protected]>
Tested-by: Hugo Villeneuve <[email protected]>
Reviewed-by: Hugo Villeneuve <[email protected]>
Signed-off-by: Hui Wang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent a9411ef commit 4fb92bd
1 file changed
+28
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
1467 | 1468 | | |
1468 | 1469 | | |
1469 | 1470 | | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
1470 | 1494 | | |
1471 | 1495 | | |
1472 | 1496 | | |
| |||
1536 | 1560 | | |
1537 | 1561 | | |
1538 | 1562 | | |
1539 | | - | |
1540 | | - | |
1541 | | - | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
1542 | 1566 | | |
1543 | 1567 | | |
1544 | 1568 | | |
| |||
1663 | 1687 | | |
1664 | 1688 | | |
1665 | 1689 | | |
| 1690 | + | |
1666 | 1691 | | |
1667 | 1692 | | |
1668 | 1693 | | |
| |||
0 commit comments