Re: [PATCH] spi: orion: Allow specifying which HW CS to use with a GPIO CS

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

 



On středa 24. ledna 2018 19:17:35 CET, Geert Uytterhoeven wrote:
Using a hog indeed marks it busy, as the hog is a user.

Why do you use a hog in the first place? Shouldn't the SPI driver configure
the GPIO, according to cs-gpios?

That doesn't happen with spi-orion.c. If I remove my gpio-hog for the CS GPIO pin from the DT, then my device doesn't appear to be selected. Also, I can run gpio-hammer targetting my CS pin just fine -- and that seems dangerous.

I don't see any "claim" of a GPIO neither in spi.c nor spi-orion.c. I did some very hacky grepping [1], and it seems that other drivers probably handle this on their own. The only other match is spi-lantiq-ssc.c which doesn't however touch the CS GPIO.

Shouldn't this be really handled by the SPI core? (I don't think I'm volunteering with patches as I couldn't really test these.)

Should I submit a patch which adapts spi-orion.c to essentially follow how e.g spi-imx.c allocates a GPIO pin for CS?

Cheers,
Jan

[1] `git grep --files-with-match cs_gpio drivers/spi/*.c | xargs -n1 git grep -E --files-without-match 'gpio_direction_output|gpio_request' | cat`
--
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