mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 10:49:25 +07:00
dd37eed7db
Driver bind to devices based on the engine types & (optional) versions. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Chris Bostic <cbostic@us.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
51 lines
1.2 KiB
C
51 lines
1.2 KiB
C
/* FSI device & driver interfaces
|
|
*
|
|
* Copyright (C) IBM Corporation 2016
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
#ifndef LINUX_FSI_H
|
|
#define LINUX_FSI_H
|
|
|
|
#include <linux/device.h>
|
|
|
|
struct fsi_device {
|
|
struct device dev;
|
|
u8 engine_type;
|
|
u8 version;
|
|
};
|
|
|
|
struct fsi_device_id {
|
|
u8 engine_type;
|
|
u8 version;
|
|
};
|
|
|
|
#define FSI_VERSION_ANY 0
|
|
|
|
#define FSI_DEVICE(t) \
|
|
.engine_type = (t), .version = FSI_VERSION_ANY,
|
|
|
|
#define FSI_DEVICE_VERSIONED(t, v) \
|
|
.engine_type = (t), .version = (v),
|
|
|
|
|
|
struct fsi_driver {
|
|
struct device_driver drv;
|
|
const struct fsi_device_id *id_table;
|
|
};
|
|
|
|
#define to_fsi_dev(devp) container_of(devp, struct fsi_device, dev)
|
|
#define to_fsi_drv(drvp) container_of(drvp, struct fsi_driver, drv)
|
|
|
|
extern struct bus_type fsi_bus_type;
|
|
|
|
#endif /* LINUX_FSI_H */
|