Re: [PATCH 1/2] spi: rockchip: add support for "cs-gpios" dts property

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

 



On Mon, Jun 12, 2017 at 10:18:06AM +0200, Geert Uytterhoeven wrote:
> On Mon, Jun 12, 2017 at 9:15 AM, Shawn Lin <shawn.lin@xxxxxxxxxxxxxx> wrote:
> > On 2017/6/12 14:14, Jeffy Chen wrote:

> >>   +static int rockchip_spi_setup(struct spi_device *spi)
> >> +{
> >> +       int ret = 0;
> >> +       unsigned long flags = (spi->mode & SPI_CS_HIGH) ?
> >> +                             GPIOF_OUT_INIT_LOW : GPIOF_OUT_INIT_HIGH;
> >> +       struct rockchip_spi_data *data = spi_get_ctldata(spi);
> >> +
> >> +       if (!gpio_is_valid(spi->cs_gpio))
> >> +               return 0;

> > return -EINVAL?

> Isn't this check meant to fall back to hardware CS if no cs-gpios property
> is present?

I'd expect it to, otherwise the cs-gpios property is actualy mandatory.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux