Received: by 10.223.176.5 with SMTP id f5csp919622wra; Wed, 7 Feb 2018 09:36:06 -0800 (PST) X-Google-Smtp-Source: AH8x225kvYBK9eN40aropofiNDwsiB1uYYPUwmVFw54nR9Ye/NYjQio7veXC79bi7ZdsVWgyvyeM X-Received: by 10.99.95.150 with SMTP id t144mr5530583pgb.59.1518024966252; Wed, 07 Feb 2018 09:36:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518024966; cv=none; d=google.com; s=arc-20160816; b=IkbYMf/ho7+SFybvu+GannG8RUB8oVOrC1lxqDSegQVYEqw3KidZzqwo3l1xoaW9by LC8dDxH1P5fAwl6b6zIQiT9rxEmWuX4ls0FOW9u7csmMZ4f/ovvNANOGboqhvUD6vdwL OWBrs+0G9z0cTfAZF11T5PUonSu6QyMvky7VYHsCwi9KHln9fqNjGvMWN81UO04a5fMy 6BY4r8ymvM8U05EaKTHvpJ3IpKl4s2ZppK6f/13PbhSuCpamPpJSJlRUNxYhKjfZD7Y8 OtGrHQ0yfK8s1yUCNb67DATJpbHd6dkS11IeQnLjbDcmMC82fuLay4+QfybCkeHLc4F6 if8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:arc-authentication-results; bh=wSbmHn62OP6NVSaTUjCzCoiwoybcu6HVeYWtx7io174=; b=IsK5DltEGfICQ5GPCaiA/r3KFsdQZst73RzG4pM0vfeszK2AYyHMDj/NgnTA+P85cb n+0Qdu819pIk6ezt8WvQQf23EtwCpSYxJSBOSprpII0ZhqdK/Lo2NUYYcewbJHtwffDZ 52M6jg4/YpT7khIOucZl0vzpL4C1D3DdzF5tl7kXbviY9AWK5842RS4RA+5YMqKsY5/t iveEFwKRm26g/s6xnOYXX8O01M+qSX6z0rY7svK9AIvNRK7IrzC72aMy424FWJN2lAd0 K4dEB2POsup17mID0QQOFqZtZDikz1YWg89kZiP4rCrmARl2Xy4JDilQHXTNla889Zlp YE+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 17si1208443pgc.62.2018.02.07.09.35.51; Wed, 07 Feb 2018 09:36:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932141AbeBGRfM (ORCPT + 99 others); Wed, 7 Feb 2018 12:35:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:44928 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753721AbeBGRfK (ORCPT ); Wed, 7 Feb 2018 12:35:10 -0500 Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 736AD217A4; Wed, 7 Feb 2018 17:35:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 736AD217A4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=kbingham@kernel.org From: Kieran Bingham To: Kieran Bingham , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org Cc: Kieran Bingham , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/2] media: i2c: adv748x: Add missing CBUS page. Date: Wed, 7 Feb 2018 17:34:46 +0000 Message-Id: <1518024886-842-3-git-send-email-kbingham@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518024886-842-1-git-send-email-kbingham@kernel.org> References: <1518024886-842-1-git-send-email-kbingham@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kieran Bingham The ADV748x has 12 pages mapped onto I2C addresses. In the existing implementation only 11 are mapped correctly in the page enumerations, which causes an off-by-one fault on pages above the infoframe definition due to a missing 'CBUS' page. This causes the address for the CEC, SDP, TXA, and TXB to be incorrectly programmed during the iterations in adv748x_initialise_clients(). Until now this has gone un-noticed due to the fact that following the creation of the clients - the device is reset and the addresses are reprogrammed in manually by the call to "adv748x_write_regs(state, adv748x_set_slave_address);" As part of moving to dynamic i2c address allocations repair this by providing the missing CBUS page definition. Signed-off-by: Kieran Bingham --- drivers/media/i2c/adv748x/adv748x-core.c | 3 +++ drivers/media/i2c/adv748x/adv748x.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b/drivers/media/i2c/adv748x/adv748x-core.c index 71c69b816db2..6d62b817ed00 100644 --- a/drivers/media/i2c/adv748x/adv748x-core.c +++ b/drivers/media/i2c/adv748x/adv748x-core.c @@ -52,6 +52,7 @@ static const struct regmap_config adv748x_regmap_cnf[] = { ADV748X_REGMAP_CONF("edid"), ADV748X_REGMAP_CONF("repeater"), ADV748X_REGMAP_CONF("infoframe"), + ADV748X_REGMAP_CONF("cbus"), ADV748X_REGMAP_CONF("cec"), ADV748X_REGMAP_CONF("sdp"), ADV748X_REGMAP_CONF("txa"), @@ -91,6 +92,7 @@ static int adv748x_i2c_addresses[ADV748X_PAGE_MAX] = { ADV748X_I2C_EDID, ADV748X_I2C_REPEATER, ADV748X_I2C_INFOFRAME, + ADV748X_I2C_CBUS, ADV748X_I2C_CEC, ADV748X_I2C_SDP, ADV748X_I2C_TXB, @@ -354,6 +356,7 @@ static const struct adv748x_reg_value adv748x_set_slave_address[] = { {ADV748X_PAGE_IO, 0xf6, ADV748X_I2C_EDID << 1}, {ADV748X_PAGE_IO, 0xf7, ADV748X_I2C_REPEATER << 1}, {ADV748X_PAGE_IO, 0xf8, ADV748X_I2C_INFOFRAME << 1}, + {ADV748X_PAGE_IO, 0xf9, ADV748X_I2C_CBUS << 1}, {ADV748X_PAGE_IO, 0xfa, ADV748X_I2C_CEC << 1}, {ADV748X_PAGE_IO, 0xfb, ADV748X_I2C_SDP << 1}, {ADV748X_PAGE_IO, 0xfc, ADV748X_I2C_TXB << 1}, diff --git a/drivers/media/i2c/adv748x/adv748x.h b/drivers/media/i2c/adv748x/adv748x.h index 6789e2f3bc8c..725662edc4b8 100644 --- a/drivers/media/i2c/adv748x/adv748x.h +++ b/drivers/media/i2c/adv748x/adv748x.h @@ -35,6 +35,7 @@ #define ADV748X_I2C_EDID 0x36 /* EDID Map */ #define ADV748X_I2C_REPEATER 0x32 /* HDMI RX Repeater Map */ #define ADV748X_I2C_INFOFRAME 0x31 /* HDMI RX InfoFrame Map */ +#define ADV748X_I2C_CBUS 0x30 /* CBUS MHL Map */ #define ADV748X_I2C_CEC 0x41 /* CEC Map */ #define ADV748X_I2C_SDP 0x79 /* SDP Map */ #define ADV748X_I2C_TXB 0x48 /* CSI-TXB Map */ @@ -48,6 +49,7 @@ enum adv748x_page { ADV748X_PAGE_EDID, ADV748X_PAGE_REPEATER, ADV748X_PAGE_INFOFRAME, + ADV748X_PAGE_CBUS, ADV748X_PAGE_CEC, ADV748X_PAGE_SDP, ADV748X_PAGE_TXB, -- 2.7.4