The SPI drivers do it. If you look in the spi master driver's probe function in the most up- to-date drivers, there is usually a loop over every cs-gpio that does a devm_gpio_request_one. Given all the problems getting this right, one wonders if the spi core could do it automatically. The DT property is pretty standard. In some drivers, the gpio is only requested when the spi slave is used. I think the idea there was sort of pre device tree run time configuration. There dev kit has a gpio going to a gpio header and you can also use the same gpio as a chip select on the spi header. Depends on what you want to connect to the dev kit. If request the gpio as a chip select when the spi master is probed, you can't use it as a regular gpio. So only request it when the spi slave is used, if the slave isn't used, then the pin can be a normal gpio. Now days I think one would enable the proper nodes in the DT to do this. On Tue, 2018-07-31 at 17:31 +0000, Langer, Thomas wrote: > Hello spi experts, > > I am using cs-gpios on a "Lantiq" platform (based on devicetree and > lantiq-ssc > driver). > This works without problem, when the gpio is setup by some pinctrl > definitions. > > What I am missing the request_gpio or a similar call, which does the > reservation > of the gpio. Is this expected from the spi-core or must this be > implemented in > the specific spi driver? > > Thanks for clarification, > Thomas Langer > > -- > To unsubscribe from this list: send the line "unsubscribe linux-spi" > in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at https://na01.safelinks.protection.outlook.com > /?url=http%3A%2F%2Fvger.kernel.org%2Fmajordomo- > info.html&data=02%7C01%7Ctpiepho%40impinj.com%7C5f46fe586dc04d339 > 25108d5f70b9129%7C6de70f0f73574529a415d8cbb7e93e5e%7C0%7C1%7C63668655 > 1422413448&sdata=qNWJ%2Fsp8Xp30lhaL8KmFbSYMKv%2BBgxGGWcinye2%2B4f > 0%3D&reserved=0��.n��������+%������w��{.n�����{����)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥