From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Hans Verkuil <hansverk@cisco.com>
Cc: linux-fbdev@vger.kernel.org, David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFC 5/5] drm/i2c: add tda998x/tda9950 CEC driver
Date: Fri, 12 Aug 2016 14:52:13 +0000 [thread overview]
Message-ID: <20160812145212.GF1041@n2100.armlinux.org.uk> (raw)
In-Reply-To: <a9bc07ee-ae77-1791-ccf8-cb654cd4c302@cisco.com>
On Fri, Aug 12, 2016 at 04:38:04PM +0200, Hans Verkuil wrote:
> On 08/12/2016 04:15 PM, Russell King wrote:
> >Add a CEC driver for the TDA9950, which is a stand-alone I2C CEC device.
> >The TDA9950 contains a command processor which handles retransmissions
> >and the low level bus protocol. The driver just has to read and write
> >the messages, and handle error conditions.
> >
> >Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> >---
> > drivers/gpu/drm/i2c/Kconfig | 5 +
> > drivers/gpu/drm/i2c/Makefile | 1 +
> > drivers/gpu/drm/i2c/tda9950.c | 514 ++++++++++++++++++++++++++++++++++
> > include/linux/platform_data/tda9950.h | 15 +
> > 4 files changed, 535 insertions(+)
> > create mode 100644 drivers/gpu/drm/i2c/tda9950.c
> > create mode 100644 include/linux/platform_data/tda9950.h
> >
>
> <snip>
>
> >+static int tda9950_cec_adap_log_addr(struct cec_adapter *adap, u8 addr)
> >+{
> >+ struct tda9950_priv *priv = adap->priv;
> >+ u16 addresses;
> >+ u8 buf[2];
> >+
> >+ if (addr = CEC_LOG_ADDR_INVALID)
> >+ addresses = priv->addresses = BIT(15);
>
> I saw this in patch 4/5 as well: why set bit 15? I would expect that this
> is just set to 0. And priv->addresses doesn't seem to be used anywhere.
It's needed to be set so that the hardware receives messages sent
to the broadcast (15) address.
> >+ else
> >+ addresses = priv->addresses |= BIT(addr);
For the second point, read this line, paying close attention to the |=.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
WARNING: multiple messages have this Message-ID (diff)
From: linux@armlinux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC 5/5] drm/i2c: add tda998x/tda9950 CEC driver
Date: Fri, 12 Aug 2016 15:52:13 +0100 [thread overview]
Message-ID: <20160812145212.GF1041@n2100.armlinux.org.uk> (raw)
In-Reply-To: <a9bc07ee-ae77-1791-ccf8-cb654cd4c302@cisco.com>
On Fri, Aug 12, 2016 at 04:38:04PM +0200, Hans Verkuil wrote:
> On 08/12/2016 04:15 PM, Russell King wrote:
> >Add a CEC driver for the TDA9950, which is a stand-alone I2C CEC device.
> >The TDA9950 contains a command processor which handles retransmissions
> >and the low level bus protocol. The driver just has to read and write
> >the messages, and handle error conditions.
> >
> >Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> >---
> > drivers/gpu/drm/i2c/Kconfig | 5 +
> > drivers/gpu/drm/i2c/Makefile | 1 +
> > drivers/gpu/drm/i2c/tda9950.c | 514 ++++++++++++++++++++++++++++++++++
> > include/linux/platform_data/tda9950.h | 15 +
> > 4 files changed, 535 insertions(+)
> > create mode 100644 drivers/gpu/drm/i2c/tda9950.c
> > create mode 100644 include/linux/platform_data/tda9950.h
> >
>
> <snip>
>
> >+static int tda9950_cec_adap_log_addr(struct cec_adapter *adap, u8 addr)
> >+{
> >+ struct tda9950_priv *priv = adap->priv;
> >+ u16 addresses;
> >+ u8 buf[2];
> >+
> >+ if (addr == CEC_LOG_ADDR_INVALID)
> >+ addresses = priv->addresses = BIT(15);
>
> I saw this in patch 4/5 as well: why set bit 15? I would expect that this
> is just set to 0. And priv->addresses doesn't seem to be used anywhere.
It's needed to be set so that the hardware receives messages sent
to the broadcast (15) address.
> >+ else
> >+ addresses = priv->addresses |= BIT(addr);
For the second point, read this line, paying close attention to the |=.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
WARNING: multiple messages have this Message-ID (diff)
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Hans Verkuil <hansverk@cisco.com>
Cc: linux-fbdev@vger.kernel.org, David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFC 5/5] drm/i2c: add tda998x/tda9950 CEC driver
Date: Fri, 12 Aug 2016 15:52:13 +0100 [thread overview]
Message-ID: <20160812145212.GF1041@n2100.armlinux.org.uk> (raw)
In-Reply-To: <a9bc07ee-ae77-1791-ccf8-cb654cd4c302@cisco.com>
On Fri, Aug 12, 2016 at 04:38:04PM +0200, Hans Verkuil wrote:
> On 08/12/2016 04:15 PM, Russell King wrote:
> >Add a CEC driver for the TDA9950, which is a stand-alone I2C CEC device.
> >The TDA9950 contains a command processor which handles retransmissions
> >and the low level bus protocol. The driver just has to read and write
> >the messages, and handle error conditions.
> >
> >Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> >---
> > drivers/gpu/drm/i2c/Kconfig | 5 +
> > drivers/gpu/drm/i2c/Makefile | 1 +
> > drivers/gpu/drm/i2c/tda9950.c | 514 ++++++++++++++++++++++++++++++++++
> > include/linux/platform_data/tda9950.h | 15 +
> > 4 files changed, 535 insertions(+)
> > create mode 100644 drivers/gpu/drm/i2c/tda9950.c
> > create mode 100644 include/linux/platform_data/tda9950.h
> >
>
> <snip>
>
> >+static int tda9950_cec_adap_log_addr(struct cec_adapter *adap, u8 addr)
> >+{
> >+ struct tda9950_priv *priv = adap->priv;
> >+ u16 addresses;
> >+ u8 buf[2];
> >+
> >+ if (addr == CEC_LOG_ADDR_INVALID)
> >+ addresses = priv->addresses = BIT(15);
>
> I saw this in patch 4/5 as well: why set bit 15? I would expect that this
> is just set to 0. And priv->addresses doesn't seem to be used anywhere.
It's needed to be set so that the hardware receives messages sent
to the broadcast (15) address.
> >+ else
> >+ addresses = priv->addresses |= BIT(addr);
For the second point, read this line, paying close attention to the |=.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2016-08-12 14:52 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-12 14:14 [PATCH RFC 0/5] CEC drivers for iMX6 and TDA9950 Russell King - ARM Linux
2016-08-12 14:14 ` Russell King - ARM Linux
2016-08-12 14:14 ` Russell King - ARM Linux
2016-08-12 14:14 ` [PATCH RFC 1/5] video: add HDMI state notifier support Russell King
2016-08-12 14:14 ` Russell King
2016-08-12 14:14 ` Russell King
2016-08-12 15:26 ` Hans Verkuil
2016-08-12 15:26 ` Hans Verkuil
2016-08-12 15:26 ` Hans Verkuil
2016-08-12 14:15 ` [PATCH RFC 2/5] drm/bridge: dw_hdmi: remove CEC engine register definitions Russell King
2016-08-12 14:15 ` Russell King
2016-08-12 14:15 ` Russell King
2016-08-12 14:15 ` [PATCH RFC 3/5] drm/bridge: dw_hdmi: add HDMI notifier support Russell King
2016-08-12 14:15 ` Russell King
2016-08-12 14:15 ` Russell King
2016-08-12 14:15 ` [PATCH RFC 4/5] drm/bridge: add dw-hdmi cec driver using Hans Verkil's CEC code Russell King
2016-08-12 14:15 ` Russell King
2016-08-12 14:15 ` Russell King
2016-08-12 14:25 ` Hans Verkuil
2016-08-12 14:25 ` Hans Verkuil
2016-08-12 14:25 ` Hans Verkuil
2016-08-12 14:26 ` Russell King - ARM Linux
2016-08-12 14:26 ` Russell King - ARM Linux
2016-08-12 14:26 ` Russell King - ARM Linux
2016-08-23 7:21 ` Hans Verkuil
2016-08-23 7:21 ` Hans Verkuil
2016-08-23 7:21 ` Hans Verkuil
2016-08-23 7:59 ` Russell King - ARM Linux
2016-08-23 7:59 ` Russell King - ARM Linux
2016-08-23 7:59 ` Russell King - ARM Linux
2016-08-23 8:05 ` Hans Verkuil
2016-08-23 8:05 ` Hans Verkuil
2016-08-23 8:05 ` Hans Verkuil
2016-08-31 12:28 ` Russell King - ARM Linux
2016-08-31 12:28 ` Russell King - ARM Linux
2016-08-31 12:28 ` Russell King - ARM Linux
2016-08-23 8:03 ` Hans Verkuil
2016-08-23 8:03 ` Hans Verkuil
2016-08-23 8:03 ` Hans Verkuil
2016-08-31 12:28 ` Russell King - ARM Linux
2016-08-31 12:28 ` Russell King - ARM Linux
2016-08-31 12:28 ` Russell King - ARM Linux
2016-08-12 14:15 ` [PATCH RFC 5/5] drm/i2c: add tda998x/tda9950 CEC driver Russell King
2016-08-12 14:15 ` Russell King
2016-08-12 14:15 ` Russell King
2016-08-12 14:38 ` Hans Verkuil
2016-08-12 14:38 ` Hans Verkuil
2016-08-12 14:38 ` Hans Verkuil
2016-08-12 14:52 ` Russell King - ARM Linux [this message]
2016-08-12 14:52 ` Russell King - ARM Linux
2016-08-12 14:52 ` Russell King - ARM Linux
2016-08-12 15:16 ` Hans Verkuil
2016-08-12 15:16 ` Hans Verkuil
2016-08-12 15:16 ` Hans Verkuil
2016-08-12 15:29 ` Russell King - ARM Linux
2016-08-12 15:29 ` Russell King - ARM Linux
2016-08-12 15:29 ` Russell King - ARM Linux
2016-08-12 15:53 ` Hans Verkuil
2016-08-12 15:53 ` Hans Verkuil
2016-08-12 15:53 ` Hans Verkuil
2016-08-12 15:59 ` Russell King - ARM Linux
2016-08-12 15:59 ` Russell King - ARM Linux
2016-08-12 15:59 ` Russell King - ARM Linux
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=20160812145212.GF1041@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=hansverk@cisco.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=plagnioj@jcrosoft.com \
--cc=tomi.valkeinen@ti.com \
/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.