Vinod Koul | 2f52a51 | 2017-12-14 11:19:41 +0530 | [diff] [blame^] | 1 | // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) |
| 2 | // Copyright(c) 2015-17 Intel Corporation. |
| 3 | |
| 4 | #ifndef __SDW_CADENCE_H |
| 5 | #define __SDW_CADENCE_H |
| 6 | |
| 7 | /** |
| 8 | * struct sdw_cdns - Cadence driver context |
| 9 | * @dev: Linux device |
| 10 | * @bus: Bus handle |
| 11 | * @instance: instance number |
| 12 | * @registers: Cadence registers |
| 13 | * @link_up: Link status |
| 14 | */ |
| 15 | struct sdw_cdns { |
| 16 | struct device *dev; |
| 17 | struct sdw_bus bus; |
| 18 | unsigned int instance; |
| 19 | |
| 20 | void __iomem *registers; |
| 21 | |
| 22 | bool link_up; |
| 23 | }; |
| 24 | |
| 25 | #define bus_to_cdns(_bus) container_of(_bus, struct sdw_cdns, bus) |
| 26 | |
| 27 | /* Exported symbols */ |
| 28 | |
| 29 | irqreturn_t sdw_cdns_irq(int irq, void *dev_id); |
| 30 | irqreturn_t sdw_cdns_thread(int irq, void *dev_id); |
| 31 | |
| 32 | int sdw_cdns_init(struct sdw_cdns *cdns); |
| 33 | |
| 34 | #endif /* __SDW_CADENCE_H */ |