GPIO specifications in device tree
#1
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 ?
GPIOF_OUT_INIT_LOW : GPIOF_OUT_INIT_HIGH,
     "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: i2s-codec@0x48 {
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.

Thanks,
Bob
#2
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?


Possibly Related Threads…
Thread Author Replies Views Last Post
  TP-Link AC600 T2UH wireless usb device andro 0 1,911 08-07-2017, 03:09 AM
Last Post: andro
  Low-Level-GPIO-Access Thoams131 2 4,095 01-11-2017, 02:54 PM
Last Post: Thoams131
Question PPS-GPIO Sebastian 11 15,872 07-12-2016, 07:25 PM
Last Post: tllim
  C#.NET / Mono GPIO library? abutler77 0 2,920 06-12-2016, 10:34 PM
Last Post: abutler77
  Lazarus and GPIO gbestwick 0 2,129 05-22-2016, 08:51 PM
Last Post: gbestwick
  GPIO javascript library. neeeds 1 3,567 02-19-2016, 11:31 PM
Last Post: limitlesscodes
  Questions about GPIO igna09 11 17,850 02-17-2016, 03:51 PM
Last Post: limitlesscodes

Forum Jump:


Users browsing this thread: 1 Guest(s)