Skip to content

Conversation

@mattwood2000
Copy link
Contributor

I noticed that the GPIO were hard coded in the driver files, whereas they should be passed from device tree of platform data for flexibility. So I propose these changes to allow dts to contain the GPIO definitions. Tested on the SAMA5D2-xplained board using the following dts entry:

spi1: spi@fc000000 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_spi1_ioset3>;
status = "okay";

wilc_spi@0 {
	compatible = "atmel,wilc_spi";
	spi-max-frequency = <12000000>;
	reg = <0>;

	gpio_reset = <&pioA 16 0>;
	gpio_chip_en = <&pioA 117 0>;
	gpio_irq = <&pioA 115 0>;

	status = "okay";
};

};

…evice tree.

This patch adds support to pass IRQ, CHIP_EN, and RESETn lines from the dts.
Copy link
Contributor

@aditya-shankar aditya-shankar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes Matt.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants