Re: [PATCH RFT] spi: bcm2835: Remove unnecessary workaround to call gpio_set_value

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

 



> On 14.02.2016, at 04:41, Axel Lin <axel.lin@xxxxxxxxxx> wrote:
> 
> 2016-02-14 1:08 GMT+08:00 Martin Sperl <kernel@xxxxxxxxxxxxxxxx>:
>> 
>>> On 13.02.2016, at 17:19, Axel Lin <axel.lin@xxxxxxxxxx> wrote:
>>> 
>>> This should be fixed by commit 4c02cba18cc9
>>> ("pinctrl: bcm2835: Fix initial value for direction_output")
>>> 
>>> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx>
>> 
>> Actually this also solves the situation when the DT is configured
>> badly - and it is likely that old DTs are configured badly,
>> because it did not matter before (it was always wrong anyway).
>> 
>> This change would break those old DTs in this respect and can
>> result in unexpected behavior and undetected devices.
> 
> Hi Martin,
> I don't understand why this patch breaks old DTs.
> 
> Before 4c02cba18cc9:
> gpio_direction_output(spi->cs_gpio, (spi->mode & SPI_CS_HIGH) ? 0 : 1);
> gpio_set_value(spi->cs_gpio, (spi->mode & SPI_CS_HIGH) ? 0 : 1);
> 
> is equivalent to
> 
> After 4c02cba18cc9: (Already in Linus' tree)
> gpio_direction_output(spi->cs_gpio, (spi->mode & SPI_CS_HIGH) ? 0 : 1);

Looking thru the bigger context now.

I thought it also impacted the GPIO-cs case, where
  cs-gpios = <&gpio x 1>, <&gpio y 1>;
would just define the GPIOs - as the 3rd value was always ignored
and resulted in a “low” level on the GPIO via pinctrl initially - 
at least there was a time when this has happened.
A change here would have had an impact on “old” DT.

Now I see that this only impacts the native-cs case
and that should be fine.

Acked-by: Martin Sperl <kernel@xxxxxxxxxxxxxxxx>


--
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