Re: [PATCHv3 1/2] spi: imx: fix use of native chip-selects with devicetree

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

 



Hello,

On Thu, Aug 10, 2017 at 11:21:14PM +1000, Greg Ungerer wrote:
> > If I understood correctly the current state is the following:
> > 
> > The spi-imx driver supports GPIOs as CS and a "native" mode where the
> > hardware drives the CS line. If you write:
> > 
> > 	cs-gpios = <&gpio2 0 0>, <0>, <&gpio1 17 0>
> > 
> > That means: Use gpio2.0 as CS 0, native CS as CS 1 and gpio1.17 as CS 2.
> 
> That is correct, yes. But the current driver is buggy and does not
> handle the "native" mode correctly - the intention of the patch
> at the start of this thread is to fix this.

Right, and I had the impression, that this "fix" was discussed away with
"if the dtb is broken, there is no hope and so nothing to fix". That's
what I wanted to speak up against.
 
> > So what the driver can check here: Does the dtb request a native CS at a
> > position that is not supported by the hardware. Of course even if there
> 
> How does the driver know how many chip-selects are natively supported
> by the hardware?
> 
> I am not familar with all iMX parts and their spi controllers, but
> Oleksij suggested in an earlier email that some have 3 native chip
> selects, some have 4, other variants may have some other number.

Via the compatible is the obvious way to determine that.
 
Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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