Re: [PATCH 2/2] spi: Introduce new driver for Qualcomm QuadSPI controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Girish,

On Thu,  5 Jul 2018 15:46:42 -0600
Girish Mahadevan <girishm@xxxxxxxxxxxxxx> wrote:

> +
> +static int process_data(const struct spi_mem_op *op, struct qcom_qspi *ctrl)
> +{
> +	int ret;
> +
> +	ctrl->xfer.dir = (op->data.dir == SPI_MEM_DATA_IN) ?
> +					QSPI_READ : QSPI_WRITE;
> +	ctrl->xfer.mode = op->data.buswidth;
> +	ctrl->xfer.is_last = true;
> +	ctrl->xfer.rem_bytes = op->data.nbytes;
> +
> +	if (ctrl->xfer.dir == QSPI_WRITE)
> +		ctrl->xfer.tx_buf = op->data.buf.out;
> +	else
> +		ctrl->xfer.rx_buf = op->data.buf.in;
> +	ret = qcom_qspi_pio_xfer(ctrl);
> +	if (ret)
> +		return ret;

Looks like you are converting the spi_mem_op into several regular SPI
transfers. Any good reasons for not relying on the core logic to do
that? In this case, all you'd have to do is implement ->transfer_one()
and be done with it. 

> +	ret = wait_for_xfer(ctrl);
> +	return ret;
> +}
 
Regards,

Boris
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux