Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1584442
| From | Sekhar Nori <nsekhar@ti.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 4/4] ARM: dts: da850-evm: add the UI expander node |
| Date | 2017-02-20 10:40 +0100 |
| Message-ID | <tcSBQ-2Sv-29@gated-at.bofh.it> (permalink) |
| References | <tbyOS-1GL-9@gated-at.bofh.it> <tbyOT-1GL-47@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thursday 16 February 2017 11:45 PM, Bartosz Golaszewski wrote:
> If we're using the UI board and want vpif capture, we need to select
> the video capture functionality by driving the sel_c pin low on the
> tca6416 expander and sel_a & sel_b pins high. Do it statically by
> hogging relevant GPIOs in the device tree.
>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
> arch/arm/boot/dts/da850-evm.dts | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
> index b549861..a90c764 100644
> --- a/arch/arm/boot/dts/da850-evm.dts
> +++ b/arch/arm/boot/dts/da850-evm.dts
> @@ -9,6 +9,7 @@
> */
> /dts-v1/;
> #include "da850.dtsi"
> +#include <dt-bindings/gpio/gpio.h>
>
> / {
> compatible = "ti,da850-evm", "ti,da850";
> @@ -78,7 +79,33 @@
> DRVDD-supply = <&vbat>;
> DVDD-supply = <&vbat>;
> };
> + ui_expander: tca6416@20 {
This should be called:
tca6416: gpio@20 {
in keeping with ePAPR 1.1 generic node names recommendation.
> + compatible = "ti,tca6416";
> + reg = <0x20>;
> + gpio-controller;
> + #gpio-cells = <2>;
>
> + sel_a {
> + gpio-hog;
> + gpios = <7 GPIO_ACTIVE_HIGH>;
> + output-high;
> + line-name = "sel_a";
> + };
> +
> + sel_b {
> + gpio-hog;
> + gpios = <6 GPIO_ACTIVE_HIGH>;
> + output-high;
> + line-name = "sel_b";
> + };
> +
> + sel_c {
> + gpio-hog;
> + gpios = <5 GPIO_ACTIVE_HIGH>;
> + output-low;
> + line-name = "sel_c";
I think this is better handled by using an enable-gpios property in vpif
capture device-tree node. So in the vpif capture node you would have:
enable-gpios = <&tca6416 7 GPIO_ACTIVE_HIGH
&tca6416 6 GPIO_ACTIVE_HIGH
&tca6416 5 GPIO_ACTIVE_LOW>;
and in the vpif capture driver, you would request each of these gpios
using: devm_gpiod_get_array_optional(.., .., GPIOD_OUT_HIGH);
Thanks,
Sekhar
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] ARM: dts: da850-evm: vpif DT changes Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2017-02-16 19:20 +0100
[PATCH 3/4] ARM: dts: da850-evm: add the output port to the vpif node Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2017-02-16 19:20 +0100
[PATCH 4/4] ARM: dts: da850-evm: add the UI expander node Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2017-02-16 19:20 +0100
Re: [PATCH 4/4] ARM: dts: da850-evm: add the UI expander node Sekhar Nori <nsekhar@ti.com> - 2017-02-20 10:40 +0100
Re: [PATCH 4/4] ARM: dts: da850-evm: add the UI expander node Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2017-02-20 16:40 +0100
Re: [PATCH 4/4] ARM: dts: da850-evm: add the UI expander node Sekhar Nori <nsekhar@ti.com> - 2017-02-21 06:10 +0100
Re: [PATCH 4/4] ARM: dts: da850-evm: add the UI expander node Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2017-02-21 10:30 +0100
csiph-web