blob: f723c3395c0f77d8b58df9438a368e44b326428e [file] [log] [blame]
Vinod Koul2f52a512017-12-14 11:19:41 +05301// 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 */
15struct 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
29irqreturn_t sdw_cdns_irq(int irq, void *dev_id);
30irqreturn_t sdw_cdns_thread(int irq, void *dev_id);
31
32int sdw_cdns_init(struct sdw_cdns *cdns);
33
34#endif /* __SDW_CADENCE_H */