linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Chase <jnchase@google.com>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: linux-media@vger.kernel.org, mchehab@kernel.org,
	robh+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 2/2] media: cec: i2c: ch7322: Add ch7322 CEC controller driver
Date: Thu, 28 May 2020 18:55:10 -0400	[thread overview]
Message-ID: <CALTkaQ1pyAB1JVtifa75RuyTQCeNDTObZH+BvdFQVhLLhAeosg@mail.gmail.com> (raw)
In-Reply-To: <fe268ad4-1a46-b6de-54e1-c9e6731a96d3@xs4all.nl>

> > +
> > +/* This device is always enabled */
> > +static int ch7322_cec_adap_enable(struct cec_adapter *adap, bool enable)
> > +{
>
> I'd disable the interrupt here if enable is false.

Ok I can do that.

>
> There is a power down mode as well, so perhaps that's something that can be
> done here too.
>

I think I'd prefer to use power down mode in a potential follow up
patch that adds PM to the driver.

> > +     return 0;
> > +}
> > +
> > +static int ch7322_cec_adap_log_addr(struct cec_adapter *adap, u8 log_addr)
> > +{
> > +     struct ch7322 *ch7322 = cec_get_drvdata(adap);
> > +     int ret;
> > +
> > +     mutex_lock(&ch7322->mutex);
> > +     ret = regmap_update_bits(ch7322->regmap, CH7322_ADDLW,
> > +                              CH7322_ADDLW_MASK, log_addr << 4);
> > +     mutex_unlock(&ch7322->mutex);
>
> If log_addr is CEC_LOG_ADDR_INVALID, then that means that the current
> logical address configuration is to be cleared. In this case the logical
> address is set to 0xf (unregistered/broadcast). That should mean that the
> CEC device will not Ack any logical addresses, correct?

Correct.

>
> But it does receive broadcast messages and (I think) also messages from
> other logical addresses, except that those will not be Acked by this
> CEC adapter.
>

I was wrong about this before. It does not pass on messages from other LAs.

> If it still receives messages from other LAs, then that means that you can
> add the CEC_CAP_MONITOR_ALL capability. I.e., 'sudo cec-ctl -M' without
> configuring anything should see all CEC traffic.
>
> What is the default value of CH7322_ADDLW? It should start with 0xf as
> the logical address (i.e. no received messages should be Acked).

The default value is 0xf.

Thanks,
Jeff

      reply	other threads:[~2020-05-28 22:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15  2:51 [PATCH v2 0/2] CH7322 CEC controller driver Jeff Chase
2020-05-15  2:51 ` [PATCH v2 1/2] dt-bindings: Add ch7322 media i2c device Jeff Chase
2020-05-18 14:15   ` Rob Herring
2020-05-15  2:51 ` [PATCH v2 2/2] media: cec: i2c: ch7322: Add ch7322 CEC controller driver Jeff Chase
2020-05-18  9:34   ` Hans Verkuil
2020-05-28 22:55     ` Jeff Chase [this message]

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=CALTkaQ1pyAB1JVtifa75RuyTQCeNDTObZH+BvdFQVhLLhAeosg@mail.gmail.com \
    --to=jnchase@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=robh+dt@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).