[PATCH linux v5 13/18] drivers/fsi: Set up links for slave communication

Jeremy Kerr jk at ozlabs.org
Fri Oct 21 16:28:19 AEDT 2016


Hi Chris,

> diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c
> index 565c7e3..81ed444 100644
> --- a/drivers/fsi/fsi-core.c
> +++ b/drivers/fsi/fsi-core.c
> @@ -287,13 +287,51 @@ static int fsi_slave_init(struct fsi_master *master,
>  
>  /* FSI master support */
>  
> +static int fsi_master_link_enable(struct fsi_master *master, int link)
> +{
> +	if (master->link_enable)
> +		return master->link_enable(master, link);
> +
> +	return -EINVAL;
> +}

We don't want to error on no ->link_enable callback; this breaks for any
masters that don't require this (eg, the fake master)

> +/*
> + * Issue a break command on this link
> + */
> +static int fsi_master_break(struct fsi_master *master, int link)
> +{
> +	int rc;
> +
> +	if (!master->send_break)
> +		return -EINVAL;

And do we want to error here? If so, we'll need to implement send_break
for the fake master.

Cheers,


Jeremy


More information about the openbmc mailing list