linux/drivers/fsi/fsi-slave.h
Eddie James d5d8dfb01e fsi: Move fsi_slave structure definition to header
Some FSI drivers may have need of the slave definition, so
move it to a header file. Also use one macro for obtaining a
pointer to the fsi_master structure.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230612195657.245125-2-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
2023-08-09 15:41:59 +09:30

29 lines
601 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (C) IBM Corporation 2023 */
#ifndef DRIVERS_FSI_SLAVE_H
#define DRIVERS_FSI_SLAVE_H
#include <linux/cdev.h>
#include <linux/device.h>
struct fsi_master;
struct fsi_slave {
struct device dev;
struct fsi_master *master;
struct cdev cdev;
int cdev_idx;
int id; /* FSI address */
int link; /* FSI link# */
u32 cfam_id;
int chip_id;
uint32_t size; /* size of slave address space */
u8 t_send_delay;
u8 t_echo_delay;
};
#define to_fsi_slave(d) container_of(d, struct fsi_slave, dev)
#endif /* DRIVERS_FSI_SLAVE_H */