diff options
author | Vinod Koul <vinod.koul@intel.com> | 2017-12-14 06:49:41 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-19 11:31:00 +0100 |
commit | 2f52a5177caaa0f6c06934eb5e0bfa2a3ebd0dc7 (patch) | |
tree | 14eb2007c95f4bacbac691068d4dde2cecff7e5e /drivers/soundwire/cadence_master.h | |
parent | soundwire: Add slave status handling (diff) | |
download | linux-2f52a5177caaa0f6c06934eb5e0bfa2a3ebd0dc7.tar.xz linux-2f52a5177caaa0f6c06934eb5e0bfa2a3ebd0dc7.zip |
soundwire: cdns: Add cadence library
Cadence IP implements SoundWire Master. Add base cadence library
initialization and interrupt handling
Signed-off-by: Hardik T Shah <hardik.t.shah@intel.com>
Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Acked-By: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/soundwire/cadence_master.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/soundwire/cadence_master.h b/drivers/soundwire/cadence_master.h new file mode 100644 index 000000000000..f723c3395c0f --- /dev/null +++ b/drivers/soundwire/cadence_master.h @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) +// Copyright(c) 2015-17 Intel Corporation. + +#ifndef __SDW_CADENCE_H +#define __SDW_CADENCE_H + +/** + * struct sdw_cdns - Cadence driver context + * @dev: Linux device + * @bus: Bus handle + * @instance: instance number + * @registers: Cadence registers + * @link_up: Link status + */ +struct sdw_cdns { + struct device *dev; + struct sdw_bus bus; + unsigned int instance; + + void __iomem *registers; + + bool link_up; +}; + +#define bus_to_cdns(_bus) container_of(_bus, struct sdw_cdns, bus) + +/* Exported symbols */ + +irqreturn_t sdw_cdns_irq(int irq, void *dev_id); +irqreturn_t sdw_cdns_thread(int irq, void *dev_id); + +int sdw_cdns_init(struct sdw_cdns *cdns); + +#endif /* __SDW_CADENCE_H */ |