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

Axel Lin axel.lin at ingics.com
Sat Feb 13 19:41:34 PST 2016


2016-02-14 1:08 GMT+08:00 Martin Sperl <kernel at martin.sperl.org>:
>
>> On 13.02.2016, at 17:19, Axel Lin <axel.lin at ingics.com> wrote:
>>
>> This should be fixed by commit 4c02cba18cc9
>> ("pinctrl: bcm2835: Fix initial value for direction_output")
>>
>> Signed-off-by: Axel Lin <axel.lin at ingics.com>
>
> 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);

Axel



More information about the linux-rpi-kernel mailing list