1 // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
2 // Copyright(c) 2015-17 Intel Corporation.
4 #ifndef __SDW_CADENCE_H
5 #define __SDW_CADENCE_H
8 * struct sdw_cdns - Cadence driver context
11 * @instance: instance number
12 * @response_buf: SoundWire response buffer
13 * @tx_complete: Tx completion
14 * @defer: Defer pointer
15 * @registers: Cadence registers
16 * @link_up: Link status
17 * @msg_count: Messages sent on bus
22 unsigned int instance
;
24 u32 response_buf
[0x80];
25 struct completion tx_complete
;
26 struct sdw_defer
*defer
;
28 void __iomem
*registers
;
31 unsigned int msg_count
;
34 #define bus_to_cdns(_bus) container_of(_bus, struct sdw_cdns, bus)
36 /* Exported symbols */
38 int sdw_cdns_probe(struct sdw_cdns
*cdns
);
39 extern struct sdw_master_ops sdw_cdns_master_ops
;
41 irqreturn_t
sdw_cdns_irq(int irq
, void *dev_id
);
42 irqreturn_t
sdw_cdns_thread(int irq
, void *dev_id
);
44 int sdw_cdns_init(struct sdw_cdns
*cdns
);
45 int sdw_cdns_enable_interrupt(struct sdw_cdns
*cdns
);
48 #endif /* __SDW_CADENCE_H */