Re: zephyr: Getting GPIOs from DTS file without aliases
Hiremath, Vijay P <vijay.p.hiremath@...>
Changing to definition in DTS file to lowercase without underscore works with Kumar's fix
toggle quoted messageShow quoted text
enpp3p3: GPIOA3 { label = "EN_PP3300_A"; gpios = <&gpioa 3 GPIO_ACTIVE_HIGH>; }; const struct device *pin_pp3300_en = device_get_binding(DT_GPIO_LABEL(DT_NODELABEL(enpp3p3), gpios));
-----Original Message-----
From: Hiremath, Vijay P Sent: Tuesday, October 20, 2020 11:23 AM To: Kumar Gala <kumar.gala@linaro.org> Cc: devel@lists.zephyrproject.org Subject: RE: [Zephyr-devel] zephyr: Getting GPIOs from DTS file without aliases Hi Kumar, Thanks for the response, still couldn't compile. const struct device *pin_pp3300_en = DT_GPIO_LABEL(DT_NODELABEL(EC_VR_EN_PP3300_A), gpios); error: 'DT_N_NODELABEL_EC_VR_EN_PP3300_A_P_gpios_IDX_0_PH_P_label' undeclared (first use in this function) 25 | DT_GPIO_LABEL(DT_NODELABEL(EC_VR_EN_PP3300_A), gpios); Regards Vijay -----Original Message----- From: Kumar Gala <kumar.gala@linaro.org> Sent: Tuesday, October 20, 2020 11:09 AM To: Hiremath, Vijay P <vijay.p.hiremath@intel.com> Cc: devel@lists.zephyrproject.org Subject: Re: [Zephyr-devel] zephyr: Getting GPIOs from DTS file without aliases On Oct 20, 2020, at 12:24 PM, Hiremath, Vijay P <vijay.p.hiremath@intel.com> wrote:I think you want DT_NODELABEL. DT_GPIO_LABEL(DT_NODELABEL(EC_VR_EN_PP3300_A), gpios) - k
|
|