From patchwork Wed Feb 10 10:09:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hans Verkuil (hansverk)" X-Patchwork-Id: 8269441 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C5B1DBEEE5 for ; Wed, 10 Feb 2016 10:09:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 09886202E9 for ; Wed, 10 Feb 2016 10:09:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C90C2202E6 for ; Wed, 10 Feb 2016 10:09:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757325AbcBJKJR (ORCPT ); Wed, 10 Feb 2016 05:09:17 -0500 Received: from aer-iport-3.cisco.com ([173.38.203.53]:10798 "EHLO aer-iport-3.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751645AbcBJKJO (ORCPT ); Wed, 10 Feb 2016 05:09:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1098; q=dns/txt; s=iport; t=1455098954; x=1456308554; h=to:from:subject:message-id:date:mime-version: content-transfer-encoding; bh=7LAr6RJku3O+2tR+gvuOEF1UYbsNoPbsrTi6gPLRdnU=; b=REh3gti7Mj10ApSqaQN/4NKp3WSj4v39XSS6CXCdxHBhal426IlGPmRM W6wEZtkOitCQHrdL15WI9Bila52+PYJYMyVVifvQmqpRkEVALkpheD+8P MdH/aZLRJcGv384hGPmB99pNJ0oRZQ1s9/qmXuBpVgR20mgqWk7GKiFQY E=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CoBAAFC7tW/xbLJq1ehHmIXK8OhAeID?= =?us-ascii?q?gEBAQEBAYELhGsEUTYCBRYLAgsDAgECAUsNBgICiBehCI9bjwABAQEHAgEde4U?= =?us-ascii?q?XhW0BhXuBOgWWeI1RiSKFUo4/YoIQgVU7LohTAQEB?= X-IronPort-AV: E=Sophos;i="5.22,425,1449532800"; d="scan'208";a="625335142" Received: from aer-iport-nat.cisco.com (HELO aer-core-4.cisco.com) ([173.38.203.22]) by aer-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Feb 2016 10:09:11 +0000 Received: from [10.47.79.81] ([10.47.79.81]) (authenticated bits=0) by aer-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id u1AA9AnC018690 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Wed, 10 Feb 2016 10:09:11 GMT To: linux-media From: Hans Verkuil Subject: [PATCH for v4.5] adv7604: fix tx 5v detect regression Message-ID: <56BB0C46.4020200@cisco.com> Date: Wed, 10 Feb 2016 11:09:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 X-Authenticated-User: hansverk Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-14.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY, USER_IN_DEF_DKIM_WL autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The 5 volt detect functionality broke in 3.14: the code reads IO register 0x70 again after it has already been cleared. Instead it should use the cached irq_reg_0x70 value and the io_write to 0x71 to clear 0x70 can be dropped since this has already been done. Signed-off-by: Hans Verkuil Cc: # for v3.14 and up --- drivers/media/i2c/adv7604.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index 45a3e12..9355553 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -2199,10 +2199,9 @@ static int adv76xx_isr(struct v4l2_subdev *sd, u32 status, bool *handled) adv76xx_cec_isr(sd, handled); /* tx 5v detect */ - tx_5v = io_read(sd, 0x70) & info->cable_det_mask; + tx_5v = irq_reg_0x70 & info->cable_det_mask; if (tx_5v) { v4l2_dbg(1, debug, sd, "%s: tx_5v: 0x%x\n", __func__, tx_5v); - io_write(sd, 0x71, tx_5v); adv76xx_s_detect_tx_5v_ctrl(sd); if (handled) *handled = true;