01-16-2019, 01:48 AM
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
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