All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Hans Verkuil <hverkuil@xs4all.nl>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Loic Poulain <loic.poulain@linaro.org>,
	Marc Zyngier <maz@kernel.org>, NXP Linux Team <linux-imx@nxp.com>,
	Peng Fan <peng.fan@nxp.com>, Shawn Guo <shawnguo@kernel.org>
Subject: Re: [PATCH v4 2/2] gpio: mxc: Always set GPIOs used as interrupt source to INPUT mode
Date: Fri, 29 Jul 2022 05:01:38 +0200	[thread overview]
Message-ID: <a4dae3ef-bbbe-123e-3a1f-126a24067e2b@denx.de> (raw)
In-Reply-To: <524f89f6-2136-c45c-cf39-a045bb92e396@xs4all.nl>

On 7/26/22 17:13, Hans Verkuil wrote:

[...]

> FYI: you can easily test cec-gpio by adding something along these lines to the dts:
> 
> 	cec-gpio {
> 		compatible = "cec-gpio";
> 		cec-gpios = <&gpio 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
> 	};
> 
> (this is from a Raspberry Pi). As long as the cec-gpios pin can be configured as a
> pull up, then you're OK. It doesn't have to be connected to anything.
> 
> If the cec-gpio driver is enabled as well, then you should see a /dev/cec0 device.
> 
> If you can run 'cec-ctl --playback -p 1.0.0.0', then it works.
> 
> Another driver that switches direction is drivers/gpu/drm/i2c/tda998x_drv.c
> where the irq line has to be configured as an output during calibration.
> See tda998x_cec_calibration().

Does this look OK ?

$ cec-ctl --playback -p 1.0.0.0
Driver Info:
         Driver Name                : cec-gpio
         Adapter Name               : cec-gpio
         Capabilities               : 0x000000af
                 Physical Address
                 Logical Addresses
                 Transmit
                 Passthrough
                 Monitor All
                 Monitor Pin
         Driver version             : 5.19.0
         Available Logical Addresses: 4
         Connector Info             : None
         Physical Address           : 1.0.0.0
         Logical Address Mask       : 0x0010
         CEC Version                : 2.0
         Vendor ID                  : 0x000c03 (HDMI)
         OSD Name                   : 'Playback'
         Logical Addresses          : 1 (Allow RC Passthrough)

           Logical Address          : 4 (Playback Device 1)
             Primary Device Type    : Playback
             Logical Address Type   : Playback
             All Device Types       : Playback
             RC TV Profile          : None
             Device Features        :
                 None

$ cec-compliance
Driver Info:
         Driver Name                : cec-gpio
         Adapter Name               : cec-gpio
         Capabilities               : 0x000000af
                 Physical Address
                 Logical Addresses
                 Transmit
                 Passthrough
                 Monitor All
                 Monitor Pin
         Driver version             : 5.19.0
         Available Logical Addresses: 4
         Connector Info             : None
         Physical Address           : 1.0.0.0
         Logical Address Mask       : 0x0010
         CEC Version                : 2.0
         Vendor ID                  : 0x000c03 (HDMI)
         OSD Name                   : 'Playback'
         Logical Addresses          : 1 (Allow RC Passthrough)

           Logical Address          : 4 (Playback Device 1)
             Primary Device Type    : Playback
             Logical Address Type   : Playback
             All Device Types       : Playback
             RC TV Profile          : None
             Device Features        :
                 None

Compliance test for cec-gpio device /dev/cec0:

     The test results mean the following:
         OK                    Supported correctly by the device.
         OK (Not Supported)    Not supported and not mandatory for the 
device.
         OK (Presumed)         Presumably supported.  Manually check to 
confirm.
         OK (Unexpected)       Supported correctly but is not expected 
to be supported for this device.
         OK (Refused)          Supported by the device, but was refused.
         OK (Expected Failure) Failed but this was expected (see -e option).
         FAIL                  Failed and was expected to be supported 
by this device.

Find remote devices:
         Polling: OK

FAIL: No remote devices found, exiting.

  reply	other threads:[~2022-07-29  3:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-24 22:49 [PATCH v4 1/2] gpio: mxc: Protect GPIO irqchip RMW with bgpio spinlock Marek Vasut
2022-07-24 22:49 ` [PATCH v4 2/2] gpio: mxc: Always set GPIOs used as interrupt source to INPUT mode Marek Vasut
2022-07-26  8:15   ` Linus Walleij
2022-07-26 14:42     ` Marek Vasut
2022-07-26 15:13       ` Hans Verkuil
2022-07-29  3:01         ` Marek Vasut [this message]
2022-07-29  6:56           ` Hans Verkuil
2022-07-26 20:59   ` Linus Walleij
2022-07-25 20:37 ` [PATCH v4 1/2] gpio: mxc: Protect GPIO irqchip RMW with bgpio spinlock Andy Shevchenko
2022-07-25 22:30   ` Linus Walleij
2022-07-25 22:33     ` Linus Walleij
2022-07-25 23:53     ` Marek Vasut
2022-07-28 22:21 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a4dae3ef-bbbe-123e-3a1f-126a24067e2b@denx.de \
    --to=marex@denx.de \
    --cc=bgolaszewski@baylibre.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=loic.poulain@linaro.org \
    --cc=maz@kernel.org \
    --cc=peng.fan@nxp.com \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.