Full Version: GPIO specifications in device tree
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The CS4270 allows specifying a reset GPIO using the following code:

enum of_gpio_flags flags;
int gpio = of_get_named_gpio_flags(np, "reset-gpio", 0, &flags);

if (gpio_is_valid(gpio)) {
ret = devm_gpio_request_one(&i2c_client->dev, gpio,
     flags & OF_GPIO_ACTIVE_LOW ?
     "cs4270 reset");
if (ret < 0)
return ret;

I cannot figure out how to alter my device tree specification to specify PC11 as the reset line for my codec.  My codec looks like this:

codec0: [email protected] {
compatible = "cirrus,cs4270";
reg = <0x48>;
va-supply = <&va_reg>;
vd-supply = <&vd_reg>;
vlc-supply = <&vlc_reg>;

I'm currently using Armbian with the 3.10.107 kernel.

I now understand that there is a difference between the sunxi pinctrl format and the gpio format that CS4270 is expecting. The gpio.txt document indicates that GPIOs are specified as a number and a flags value. SUNXI functions specify GPIOs as 6 different numbers of bank, # in bank, etc. How do I create a gpio node in the device tree that I can use to specify the reset is on PC11 (gpio 75) in the 2 cell format?