From patchwork Sun Sep 2 13:06:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 145728 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1485047ljw; Sun, 2 Sep 2018 06:26:55 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYEd8BdYbzUaiWQY7J8cigbb43OgnPJZb2uDpJJJKJeJKrHKKwK8HUuSNfdnchRfAR0EMjg X-Received: by 2002:a17:902:7d83:: with SMTP id a3-v6mr23965426plm.0.1535894815225; Sun, 02 Sep 2018 06:26:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535894815; cv=none; d=google.com; s=arc-20160816; b=CGmGPSS2RtH8fDZcQxL9x4dob0xgGrebBsun4tp4zUhejXhhIda25bI9s0Ktk+bBgZ GwelcNiNgsisJCw1NEiBIFtafxPQopst9jORnV4j4HRs2E15EeO54JSQIAIWIhZhHFnU PKV8SD9ue9EM3+/w738ZYeXKB7s0Cf/BOrVQM9BeDCMJX8HIxZwy16QYoqG93y0IFb3Q kwxNlaCrJSpClBLpg3ZtxYOr+hivIOG3sP/TXzVc+DRT4jSyB71tVzB84NPOgl0ohKU0 wjUOznA6do12uT/ZRIZNSebgoYC+7uQJlliW/ei/LAniq3haTAggI/lJDKSggfACr+Qf 6CWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=ikwtyhgKPHG14egAcrPKxvRF2bzPb/t6/V+GF0n1onw=; b=ZdS74YyP1GFPGPXUcuoJnI9mR2EGGHGAMhB2POSi/VsxGfLTaUqkzeFA+6DnW/UiKC SH7n/ZNCW8L/x71nFLKHREqYpYPvWXBiKv+Xlay/GP5kSIrqHi4aC4Q1vDWJrY9vElZZ Emixb1aRL3Cs2hEDiLDlb1R0j6L7ocM5amosh+dJH04Te0WJwsd4AMqapZr9t7TaoAuX yuuQYYNiggkZdEeVj/QnEpDo3O02Y2MId4TxkQsYxovpQM6jjQg34ZY1VRvuYR1XwovM AtkLG9IZ9Y9RyWdip9f6dLRJSpEK7wL8vyH62iiO68xQkzb4z44u4KOFXPekgQ+g1F0d lBTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=QQxi1G+6; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u129-v6si15507852pfb.247.2018.09.02.06.26.54; Sun, 02 Sep 2018 06:26:55 -0700 (PDT) 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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=QQxi1G+6; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729152AbeIBRma (ORCPT + 32 others); Sun, 2 Sep 2018 13:42:30 -0400 Received: from mail-eopbgr680128.outbound.protection.outlook.com ([40.107.68.128]:38064 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728912AbeIBRWS (ORCPT ); Sun, 2 Sep 2018 13:22:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ikwtyhgKPHG14egAcrPKxvRF2bzPb/t6/V+GF0n1onw=; b=QQxi1G+6zZ78yfSlStLloknjHo+ZEOvXvPxQSNYOfrT1d/ejOSvKeP+WF28bIS0sZm6h16bGpAnj1Qs+teSKA7JXt97caqJhGMbtdRMcY5v1SVdwFOKUqxWTrvjdedq/EeJeiKW5USPECuw2VUyoxJ45iSo2dUHMAISBE/Z6qJM= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0629.namprd21.prod.outlook.com (10.175.115.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.7; Sun, 2 Sep 2018 13:06:30 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611%7]) with mapi id 15.20.1143.000; Sun, 2 Sep 2018 13:06:30 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Todor Tomov , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH AUTOSEL 4.14 18/89] media: camss: csid: Configure data type and decode format properly Thread-Topic: [PATCH AUTOSEL 4.14 18/89] media: camss: csid: Configure data type and decode format properly Thread-Index: AQHUQr3EJ5oznQXc/UGsSMZ+0mreWg== Date: Sun, 2 Sep 2018 13:06:30 +0000 Message-ID: <20180902064918.183387-18-alexander.levin@microsoft.com> References: <20180902064918.183387-1-alexander.levin@microsoft.com> In-Reply-To: <20180902064918.183387-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0629; 6:HaHHAF2PlLUtR8DwuuyfM3onVlf2r+GmdogYWA23DILO2ovRK09s4dwyRAVv7R6in9nQroz+ufS5s7EnUimTUgzC+ACsI5oNi1jOYH5DG5ugbIeqxB54rBGnejp5lbJrEQAABUaqD3s+leU0ihfK8N16aOqn4fVawGIwQyAmoY/YIguTQm4AtMtZNlHVvvhQ3Skcus0MShDpLeDOO2DFJIJg44nod39dJCzPF26moGufhH3L2f1C5lMH3QQk2UFeuDhzIr7zkOIhR3IQw4dLDNcfI59CuKBtK15cI8UONAfV25bXnWCk/dt7gsj7HgrmHzkMQHgxxddgm3jAudJgYmDia1MDRmDY5ZiXgL7DShC5cRnJX/zb+7BsO1REDNkJjOEE8tIq8pxqiEQCu307Mb8HMB9hm2eiw1Dg13hTozpUphsf/rgINStU+XClP1nS3Th/jh1etBDlVN24tm2oZw==; 5:dRPpZjmaf8bGf9hKqmXL19d5YDSAF7Ic7k4QRFjCmvQCmIwGwnzfl+D3DP/8/jqy3DSq9jUvpzbjPxLsknO2Cra9FUp4W9RkbfjXZNnaGedxtClEp4A/X01QdTmSr7fdJPWJ79f4XGb6ohorlR6QST4R02uewzaRTqi9/H70SZk=; 7:t9Fnz4kfE4EDLrHOMGA4NamuWIq05aIhEc2OSmE8ewMa93EL4TiXqCIectKBjf89kNuoypxrFbl41NugicfgH85t6V9xdDGpL6j4JKG/I9sTsiSo86qy5RmSn9hbjYVHO9N6XJxSdMN7/UhgLdYlS6O9yewp+hsL1lF8s4eGtSeI+naITx3OreJ9XWAc9kPOBl3WDFHz3AoPQrP8X/RIyBD7T760CDyy2874TxCt7Dj2V5LiMoJnPhtvJbwIDO1L x-ms-office365-filtering-correlation-id: a3e3bd88-17f0-4f5e-81f6-08d610d4e6aa x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(4534165)(4627221)(201703031133081)(201702281549075)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0629; x-ms-traffictypediagnostic: CY4PR21MB0629: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(95692535739014); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231340)(944501410)(52105095)(2018427008)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201708071742011)(7699049)(76991033); SRVR:CY4PR21MB0629; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0629; x-forefront-prvs: 078310077C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(376002)(366004)(136003)(396003)(39860400002)(189003)(199004)(6486002)(8936002)(6512007)(22452003)(53936002)(6436002)(66066001)(4326008)(186003)(25786009)(86362001)(2900100001)(107886003)(76176011)(486006)(68736007)(36756003)(99286004)(2501003)(5250100002)(110136005)(54906003)(106356001)(316002)(105586002)(10290500003)(72206003)(10090500001)(8676002)(478600001)(14454004)(5660300001)(476003)(1076002)(3846002)(305945005)(446003)(6116002)(217873002)(6346003)(11346002)(97736004)(81156014)(7736002)(81166006)(2906002)(102836004)(86612001)(26005)(6506007)(256004)(2616005); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0629; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: aBzSjS06fz2xupwWfW075+keyjoCTvJnVkGcctkgwJTqYdjqREzUH9WuHSZc4YpvzRPSAmqtcT70sVWBFtMnqvNSKc2x9gm8piUm6RDny+W1uC8jJFNgBlwz2aZv4+4CzAolKYQ5En7zxXQYMSLRo/RbP97r0AYo5Tq8jKxxz0JhcSfyHk9MsWaJ9B6poplRZbqIs77tc5U/f86tjTIrRoU9yqhsr+GT60Wk7tXOEhsn02SPaV1Fwy3wfiAq6RatVqKbfZ5UDsEbd01OaAZoOtCFzGcGWOvzqJmH39XImWPWTxb81fzZYdzyOq9S/Psx78Lu32SJuj2Ggb1xSCQRUDkJKjsp15QIdIZspxcPlsA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3e3bd88-17f0-4f5e-81f6-08d610d4e6aa X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2018 13:06:30.6887 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0629 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Todor Tomov [ Upstream commit c628e78899ff8006b5f9d8206da54ed3bb994342 ] The CSID decodes the input data stream. When the input comes from the Test Generator the format of the stream is set on the source media pad. When the input comes from the CSIPHY the format is the one on the sink media pad. Use the proper format for each case. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- .../media/platform/qcom/camss-8x16/camss-csid.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/drivers/media/platform/qcom/camss-8x16/camss-csid.c b/drivers/media/platform/qcom/camss-8x16/camss-csid.c index 64df82817de3..4882ee25bd75 100644 --- a/drivers/media/platform/qcom/camss-8x16/camss-csid.c +++ b/drivers/media/platform/qcom/camss-8x16/camss-csid.c @@ -392,9 +392,6 @@ static int csid_set_stream(struct v4l2_subdev *sd, int enable) !media_entity_remote_pad(&csid->pads[MSM_CSID_PAD_SINK])) return -ENOLINK; - dt = csid_get_fmt_entry(csid->fmt[MSM_CSID_PAD_SRC].code)-> - data_type; - if (tg->enabled) { /* Config Test Generator */ struct v4l2_mbus_framefmt *f = @@ -416,6 +413,9 @@ static int csid_set_stream(struct v4l2_subdev *sd, int enable) writel_relaxed(val, csid->base + CAMSS_CSID_TG_DT_n_CGG_0(0)); + dt = csid_get_fmt_entry( + csid->fmt[MSM_CSID_PAD_SRC].code)->data_type; + /* 5:0 data type */ val = dt; writel_relaxed(val, csid->base + @@ -425,6 +425,9 @@ static int csid_set_stream(struct v4l2_subdev *sd, int enable) val = tg->payload_mode; writel_relaxed(val, csid->base + CAMSS_CSID_TG_DT_n_CGG_2(0)); + + df = csid_get_fmt_entry( + csid->fmt[MSM_CSID_PAD_SRC].code)->decode_format; } else { struct csid_phy_config *phy = &csid->phy; @@ -439,13 +442,16 @@ static int csid_set_stream(struct v4l2_subdev *sd, int enable) writel_relaxed(val, csid->base + CAMSS_CSID_CORE_CTRL_1); + + dt = csid_get_fmt_entry( + csid->fmt[MSM_CSID_PAD_SINK].code)->data_type; + df = csid_get_fmt_entry( + csid->fmt[MSM_CSID_PAD_SINK].code)->decode_format; } /* Config LUT */ dt_shift = (cid % 4) * 8; - df = csid_get_fmt_entry(csid->fmt[MSM_CSID_PAD_SINK].code)-> - decode_format; val = readl_relaxed(csid->base + CAMSS_CSID_CID_LUT_VC_n(vc)); val &= ~(0xff << dt_shift); From patchwork Sun Sep 2 13:06:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 145723 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1473354ljw; Sun, 2 Sep 2018 06:13:37 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY+8hRKrVuBAzQoYmSy0i/SbrlSMnGWHJCNdqcYkYmnAVRM+JwtyhgEm1LSOixjfQNF1taf X-Received: by 2002:a65:5304:: with SMTP id m4-v6mr22685883pgq.250.1535894017693; Sun, 02 Sep 2018 06:13:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535894017; cv=none; d=google.com; s=arc-20160816; b=UCTbuIEAWlSQv+8jMGChFZd5y+rhAQjh8K8417ey9j8jBo8wjh165MrXwQyiP1XHgt FRnsO5JXyaR5oT5tAasAKXHx7xHSU3xYbFoe/iH0Rni5I1YcctOB+the6ZBYk326+0hN ldQN+WandmeCzU3Sk9H2EUpu6gnKPhptApO1wC9uhaB9ALYycM0uGC+2t4zdf+2geLen DP9g4nORYcbVuNpTB8LktOzknVtXy23ERqMZenS4nXkdknHTDz2ElR/AQgymuwgygz65 wfR7KIVHJcyGk8wPeyPnyw0vz2nIdBSLq2WLqTk0MHapgPQeg0/9+NIVJ9Swoi0W6MC7 mbdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=8movVkFd11BFbwEzn83QjVr6cJBPOMaHE9q6TWK0H48=; b=I3PjDuYQThhf1iIYzedMu0Un933r44uQzCLmhqSx1nkSMu4y84EC1sojNOKobaMOZz 9l2spVn5gjL34ZYcrqAMnuL0/a8gyP6FBhzgncgROAJ3RDflZfYA6KIaodxvaI8sLJFt mhxf7gu7+GqCHHqsKOhVhnr/lvJghaVWBMm1p9yuS5CV+LHT9qa87Ay08abM9xlxa/DU atTXinNWQGCIE+eoC9kDbb7TTX7OLqy6OhgkWXBQ7b27GUjWQHT9JzN8406B43ESulOj qa6hKYxk+nGpoiIQB2g0C8MMO9tQFUsAfhOhRTJOSC50f5VSsv7cPlVAyZTdpEbLVmnU BRDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=E2tsI4WD; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p21-v6si14973316pgd.56.2018.09.02.06.13.37; Sun, 02 Sep 2018 06:13:37 -0700 (PDT) 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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=E2tsI4WD; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729481AbeIBR3U (ORCPT + 32 others); Sun, 2 Sep 2018 13:29:20 -0400 Received: from mail-eopbgr700118.outbound.protection.outlook.com ([40.107.70.118]:63159 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728137AbeIBRXR (ORCPT ); Sun, 2 Sep 2018 13:23:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8movVkFd11BFbwEzn83QjVr6cJBPOMaHE9q6TWK0H48=; b=E2tsI4WDcBK1K6BJqBnaF6llvJBU/m7EYc71bexfmsbK6WhalSUFcVjtDjGjR0bqX6UxBvLjlKV7s9h+uQEke+7XDomWMXSelODG8BBWYmBsnTcGiyAywJvDhM6Zb/SU2KkWDJaPUC74x7uX7TKt/Ia6kBPZ8eDZM75dcQqweTg= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0856.namprd21.prod.outlook.com (10.173.192.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.1; Sun, 2 Sep 2018 13:07:09 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611%7]) with mapi id 15.20.1143.000; Sun, 2 Sep 2018 13:07:09 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Loic Poulain , Kalle Valo , Sasha Levin Subject: [PATCH AUTOSEL 4.14 38/89] wlcore: Set rx_status boottime_ns field on rx Thread-Topic: [PATCH AUTOSEL 4.14 38/89] wlcore: Set rx_status boottime_ns field on rx Thread-Index: AQHUQr3RA4VO8mci3EuHkEe8w8bH3Q== Date: Sun, 2 Sep 2018 13:06:53 +0000 Message-ID: <20180902064918.183387-38-alexander.levin@microsoft.com> References: <20180902064918.183387-1-alexander.levin@microsoft.com> In-Reply-To: <20180902064918.183387-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0856; 6:mp7N3CSGwoSuLTOi/GYQtG6SKdqg5iEISMHyGL1btNCyULHJuquUQB3eGSdlxtX8EM0TIUX+WQiaAGJxPehXdZ1G2MntheC6bUAfTlL9bE9syOcr47f4NOkv9a1473ywnY588vopXIEdUrSPUgtk/vzBn0XO5QnkEywOWVfSAj5ldWu+o//gh48Z2gQPeRBiJv7WVu+OkiHICtABVsy/FqjNbj4awaCCGZF9gClbktlPvGtEyDygecRQVqdwskoH1dZPsEw0e2DkKJ15ipQK2wZkaxk07O94eHjpWA6Qb0SlIqNV6udkU+95GzeL/baduOxhqNK5rSuaITWB4369R67Fl0g2GtK0HocCjn61+ZSEI9akIvTFPLBTcOQFw6rPh7pFOSOXk7UOE5qsawQfSD5kqBd5Lq022du7h/I/ikdTMEuEHUsXAED+s1FaHvLOvmocnXEhD0z96mpsfjOFyw==; 5:npNZcrF0wK0MgIQUQ4DKU4fCith5OhUSpZzcCFTfWEDshhQPR3OrMv+pHAW9cK40TpFc1nkgck6OLn5MkZbps1dI/G7pXnKw3FviymnfdIdYYPhUh/cDHckyTMtKg7Ru7Cf5PIaoZDz0B8ujmyJTFvy2p5BeeK/91rGFr27hnSc=; 7:Aj6ScAmLSOxzUtvy6gvJ921v0cfzwi+yGWekksxOl2KtX8dOf4FjEZNNUbda5irDqqkbNGfCq/rIa5YyarFZV5Rbx0wF4PGG779i0afeMsm80E5KxXsp78chRQG/ThxovsWhxK242q0CXmMjZeo4sFgbezKqP51bGyNDE4cIWHlpXSO4iUlBoKv+/uTmhpB+DPF2oOx4teQkGRfYU1YooWvav7YVLGwshoVoxeEmmogefN3GJ9t1rFNz7ejln0V9 x-ms-office365-filtering-correlation-id: 27dde917-1b71-46fd-fde5-08d610d4fdf9 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(4534165)(4627221)(201703031133081)(201702281549075)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0856; x-ms-traffictypediagnostic: CY4PR21MB0856: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231340)(944501410)(52105095)(2018427008)(3002001)(10201501046)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699049)(76991033); SRVR:CY4PR21MB0856; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0856; x-forefront-prvs: 078310077C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(136003)(346002)(376002)(39860400002)(366004)(189003)(199004)(53936002)(81166006)(11346002)(81156014)(446003)(476003)(4326008)(5660300001)(25786009)(86612001)(8936002)(26005)(6506007)(6486002)(102836004)(2616005)(86362001)(8676002)(6512007)(14444005)(6436002)(107886003)(66066001)(256004)(10090500001)(217873002)(14454004)(3846002)(478600001)(1076002)(72206003)(6116002)(99286004)(305945005)(7736002)(22452003)(36756003)(76176011)(105586002)(486006)(106356001)(2900100001)(186003)(97736004)(68736007)(6666003)(316002)(10290500003)(2501003)(110136005)(54906003)(2906002)(5250100002)(83323001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0856; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: plGZBFd9FFGNeALFsmQTzZiUjTDDmLMwoWm3bkQtM7pBt/7PCYKMJPYC1TJfwRjLxsQI0OK4BhcVuuo6CG0YSmUaOuLCmFa8Nl1hJdSAGWSnXGWWbS2KIaB3H10VtnKfVvXbsL/8pJUwH+5Z6jkc5kCjbvGF3Fjcxz7GeN8XHUkV85Y85yKhSlPMivI9G3ZyPS3ML2xTOYoM/NTiKuzkzjj7gnthrRMzRnfCiRLFlS9IEtKnJOAINtkmNSZvcPBiNUFzYUS+8/06dORTMsZ821mMFDrjNaczSMv11qFIUUSJUnB/oJAQRyGrnzYB/9ANNLAY13KCmHqQGlFyR7thM4i7mPAtKKt4K/9ikpUWlog= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27dde917-1b71-46fd-fde5-08d610d4fdf9 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2018 13:06:53.5387 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0856 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Loic Poulain [ Upstream commit 37a634f60fd6dfbda2c312657eec7ef0750546e7 ] When receiving a beacon or probe response, we should update the boottime_ns field which is the timestamp the frame was received at. (cf mac80211.h) This fixes a scanning issue with Android since it relies on this timestamp to determine when the AP has been seen for the last time (via the nl80211 BSS_LAST_SEEN_BOOTTIME parameter). Signed-off-by: Loic Poulain Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/ti/wlcore/rx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/net/wireless/ti/wlcore/rx.c b/drivers/net/wireless/ti/wlcore/rx.c index 0f15696195f8..078a4940bc5c 100644 --- a/drivers/net/wireless/ti/wlcore/rx.c +++ b/drivers/net/wireless/ti/wlcore/rx.c @@ -59,7 +59,7 @@ static u32 wlcore_rx_get_align_buf_size(struct wl1271 *wl, u32 pkt_len) static void wl1271_rx_status(struct wl1271 *wl, struct wl1271_rx_descriptor *desc, struct ieee80211_rx_status *status, - u8 beacon) + u8 beacon, u8 probe_rsp) { memset(status, 0, sizeof(struct ieee80211_rx_status)); @@ -106,6 +106,9 @@ static void wl1271_rx_status(struct wl1271 *wl, } } + if (beacon || probe_rsp) + status->boottime_ns = ktime_get_boot_ns(); + if (beacon) wlcore_set_pending_regdomain_ch(wl, (u16)desc->channel, status->band); @@ -191,7 +194,8 @@ static int wl1271_rx_handle_data(struct wl1271 *wl, u8 *data, u32 length, if (ieee80211_is_data_present(hdr->frame_control)) is_data = 1; - wl1271_rx_status(wl, desc, IEEE80211_SKB_RXCB(skb), beacon); + wl1271_rx_status(wl, desc, IEEE80211_SKB_RXCB(skb), beacon, + ieee80211_is_probe_resp(hdr->frame_control)); wlcore_hw_set_rx_csum(wl, desc, skb); seq_num = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4; From patchwork Sun Sep 2 13:07:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 145721 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1467694ljw; Sun, 2 Sep 2018 06:08:00 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ0yPFJ/JLSaIyy/9aWcFsDuSp1wAW1KKuADR7Act60+1SwuPfPRR5zXzhYzeKKS4P8h9WU X-Received: by 2002:a62:1192:: with SMTP id 18-v6mr24994060pfr.54.1535893680587; Sun, 02 Sep 2018 06:08:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535893680; cv=none; d=google.com; s=arc-20160816; b=DKYCXZxWKUu8FDnuB3Z32ysHoJO7RkFWQXvUC/xqoC09sZFi1oIPH6Uy+pUKgiMP3V IEfCY8WOgKNk3dAr3Yo3ADQMicyZbXr2IF3JMkPq8oMcz5cDlwtllfgl/jAV1lt63HEJ d04DNeAx37kyaKdcQfLw1RB8YKqessEJkYJFnGst7jVXYY/ba/d850c2A7Chx635jK2Y wjxKtsxad2dbx180isHEEuXmTdtbVfA/mzBj5XbKDP5ly6r3YswiRZJQo4guLB+5yqXl AQJC5RZXUvW3Y6Qtei0IMlLSQlHTGa/hDLI6pkubQK97k7gyzav30QBrogqDJ00onni/ xBFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=rEjb63thZGdR/7lPbJcxES4cFxgOApFFnWtR84K3lWg=; b=IrlmPs8qs9/P8b2wykOlXv3d7/KpsbCwqK8VSkLedOIyF5PbybfmD6m5pkwE3CmVzH CbLgl02TVoFhPc/KpvhYCvzpMtGfzt2LDRiTdEsBr7zCZC2H77ffLXr/VeJwgxkgkYV4 Brf6h0ynLoDxwzmnwNK6YcTw7OjiZsZmgeV3cRszpXEFERSRZsAlAEdRexdWoT9HPhvI 83w/M0MmZeXkS73BI1kCHMkrtM3/qNK80Yx1Tp9/VbqQYXJM2gQWAMbmJAW5QSVknoYL thMb/vgycvVJG/W8JxfufHPt3WWdtXnTGDEMrvpiDP5tVIFdH+VxY4skp1BncY8yeVoZ A1DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=k4kenb74; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f3-v6si14886854plb.207.2018.09.02.06.08.00; Sun, 02 Sep 2018 06:08:00 -0700 (PDT) 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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=k4kenb74; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729434AbeIBRXl (ORCPT + 32 others); Sun, 2 Sep 2018 13:23:41 -0400 Received: from mail-sn1nam02on0134.outbound.protection.outlook.com ([104.47.36.134]:59648 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729415AbeIBRXk (ORCPT ); Sun, 2 Sep 2018 13:23:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rEjb63thZGdR/7lPbJcxES4cFxgOApFFnWtR84K3lWg=; b=k4kenb745dVL9jcQOAHEcrtCW+6+3sxJx25+q3oOaYYz5RYuL3zA43uw1H/8vfuaWXiIwtLXn9Y1UxIXO7QOxYLR2S8P43GD8ggShUp49ZpkDgovx8+n5KF9QF0baCk+4GZ7enqowI2BN8PmiozjqGyWOWYQ8LvpWLOI6GfDljw= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0503.namprd21.prod.outlook.com (10.172.122.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.2; Sun, 2 Sep 2018 13:07:47 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611%7]) with mapi id 15.20.1143.000; Sun, 2 Sep 2018 13:07:47 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Linus Walleij , Mark Brown , Jarkko Sakkinen , Sasha Levin Subject: [PATCH AUTOSEL 4.14 57/89] tpm_tis_spi: Pass the SPI IRQ down to the driver Thread-Topic: [PATCH AUTOSEL 4.14 57/89] tpm_tis_spi: Pass the SPI IRQ down to the driver Thread-Index: AQHUQr3htuNG/5fCWk6/7FBGlmrVZQ== Date: Sun, 2 Sep 2018 13:07:19 +0000 Message-ID: <20180902064918.183387-57-alexander.levin@microsoft.com> References: <20180902064918.183387-1-alexander.levin@microsoft.com> In-Reply-To: <20180902064918.183387-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0503; 6:vOEtARdN6ECiVp10R1gM9yAQBiosa2pN5v1F8hlfQ1bvexoHJfl30tXSzx8Tyi9OemwAJP2cBRa7Fo/OWI9Wr1PpZRl3idDziliRuCXnHeb/SD/GvMjS9f5eX/MUhS0t60VVROq9xLiBSxDN6g/3l7PPcRZhlINfqrMiDYit/G1+APput1wg3IwqT91JzX3B2zwBQ97o0RnGSvpSGwNF9qVfgyvBs42hrXo8fJrwzmwzEJp6Lc1WKevd5FISJXZXmFyK+LG3E/rbkkMgFguRiemoDG5Zenpw87ITcX5TCdecFNtYEEal8xuJjLaabqdosRiwprLl5zn/dpPtuigv5hmCsj/h2suE4pwCG0Xjd1y87ZuX2ZgcRYS5ou65/FT8IhD3jhkuRR/GzdY8d2SID1VIzx/FK9HjTSLfmDRF+8KqVWZpSie1ijTK0unx8tRLvCdKlhmQ1yDIymtklDFQ8w==; 5:iKIGJE5O1u00pQRRRpP+Z26eWGTu0UEdg7JHxW93uzNHbp3M3PXUL/o8yzX/fRBoKsOlEsTFGCB58VkF2ybamM5Ih6zTH6bDbkwqSl47SW5aO0nKDywBTdUktxR25wXTOM/gPjywEFpJn7iq2KWbYMhvkiog+8vpnxZH46cmrvM=; 7:HBQczZcbNUV1mkpDnEhC41V8zA4E9a2wtLam3EBJkZPqVfBW7V8IbseM8DHVE69b0LK4C+ZHZhfXU6bFZcnGA1nKe6U5Zy8o2xWzXilT1Gr+mQv2ypSTWi4Uehx+QmNvjKS+9GsDwdVqoi3aZgLWXLbaBpuXCSc1BssQR4GjEUGtNKb//3gEjrEpkR0GC4HLg0vIqXJ7rABUzO0qscmrGEUyM0zgqde9sckgBHFeC6q86mHRPgByohTqN8/Kk5pG x-ms-office365-filtering-correlation-id: 3aa0de9b-bc53-4a08-f582-08d610d51442 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(4534165)(4627221)(201703031133081)(201702281549075)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0503; x-ms-traffictypediagnostic: CY4PR21MB0503: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(2017102700009)(2017102701064)(6040522)(2401047)(5005006)(8121501046)(2017102702064)(20171027021009)(20171027022009)(20171027023009)(20171027024009)(20171027025009)(20171027026009)(2017102703076)(93006095)(93001095)(10201501046)(3231340)(944501410)(52105095)(2018427008)(3002001)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699049)(76991033); SRVR:CY4PR21MB0503; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0503; x-forefront-prvs: 078310077C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(39860400002)(136003)(376002)(346002)(366004)(189003)(199004)(105586002)(8936002)(102836004)(6346003)(68736007)(2900100001)(6116002)(217873002)(186003)(36756003)(81156014)(81166006)(1076002)(99286004)(26005)(5660300001)(66066001)(6666003)(8676002)(54906003)(256004)(316002)(305945005)(22452003)(3846002)(10090500001)(7736002)(110136005)(14444005)(106356001)(2906002)(6506007)(10290500003)(2501003)(478600001)(2616005)(72206003)(6512007)(53936002)(575784001)(86362001)(86612001)(107886003)(6436002)(14454004)(76176011)(486006)(25786009)(476003)(97736004)(446003)(11346002)(6486002)(4326008)(5250100002); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0503; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: fnH7HPcF/S7oG9qDd5plfzopVQmgfzZdZaodgY/fpbvl9PLw1znq8l1RIKutDxE5G2rK2m+/inBFEXQpfFoTyMYa/tqgN20iw5FY5j+UN/5KCTpWa7Lf6XHOT39kAyGfsEUX3kPSie89GAkNHwAyppESDkkDGfaxOegCkuD1oMfNONLsN2sg6/aE2T4aH6sXXMX4lT0oQcQEbGfC1hdHvM/5A5jU8akF8y/49RzJc86JOy1i0FIdTV+f4MOmDFAZcgsAOX3YLRb7gt9yE48JtwjO9Qdjh9/yExjVbpkgUKNbcdqfSu9zVTv2Ib8CDa3oGLhwnvkyteGW/MaKflHGek8PF9sS2h3LwBvS8EcbBxA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3aa0de9b-bc53-4a08-f582-08d610d51442 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2018 13:07:19.8746 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0503 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Linus Walleij [ Upstream commit 1a339b658d9dbe1471f67b78237cf8fa08bbbeb5 ] An SPI TPM device managed directly on an embedded board using the SPI bus and some GPIO or similar line as IRQ handler will pass the IRQn from the TPM device associated with the SPI device. This is already handled by the SPI core, so make sure to pass this down to the core as well. (The TPM core habit of using -1 to signal no IRQ is dubious (as IRQ 0 is NO_IRQ) but I do not want to mess with that semantic in this patch.) Cc: Mark Brown Signed-off-by: Linus Walleij Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: Sasha Levin --- drivers/char/tpm/tpm_tis_spi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/char/tpm/tpm_tis_spi.c b/drivers/char/tpm/tpm_tis_spi.c index 8ab0bd8445f6..b00388fc41c8 100644 --- a/drivers/char/tpm/tpm_tis_spi.c +++ b/drivers/char/tpm/tpm_tis_spi.c @@ -188,6 +188,7 @@ static const struct tpm_tis_phy_ops tpm_spi_phy_ops = { static int tpm_tis_spi_probe(struct spi_device *dev) { struct tpm_tis_spi_phy *phy; + int irq; phy = devm_kzalloc(&dev->dev, sizeof(struct tpm_tis_spi_phy), GFP_KERNEL); @@ -200,7 +201,13 @@ static int tpm_tis_spi_probe(struct spi_device *dev) if (!phy->iobuf) return -ENOMEM; - return tpm_tis_core_init(&dev->dev, &phy->priv, -1, &tpm_spi_phy_ops, + /* If the SPI device has an IRQ then use that */ + if (dev->irq > 0) + irq = dev->irq; + else + irq = -1; + + return tpm_tis_core_init(&dev->dev, &phy->priv, irq, &tpm_spi_phy_ops, NULL); } From patchwork Sun Sep 2 13:07:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 145722 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1467867ljw; Sun, 2 Sep 2018 06:08:08 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZWpb82FmaUnZOkYE9yE3Z+KPd4Q4Ayg9J/AeML7dujJJnunocHQOx7O0bkrU7oqgqHhRl9 X-Received: by 2002:a62:3a08:: with SMTP id h8-v6mr24528704pfa.61.1535893688795; Sun, 02 Sep 2018 06:08:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535893688; cv=none; d=google.com; s=arc-20160816; b=T19XXSHJDDZe1/XSj584fYvuH3x40zIFnjG9aZX+6DauI5WrPd7jfafCtE4fn0K7XU m1ahJICGQD6wbKaecmtPjY8MXwOlPEXUa0w2vUFlb4Hmevsp/aHRtMvl3r07CORSzqnl yO6l9yInTMNmBo+JMo7OQ0H1HTMCNzCglEnNltYZPZ73df01UP6LdujmCXCtnXPk5ijm ZXZpMu4hfcFXcZyyVOemJcLGcykVCGazJq7yk8QL+aJvM7WqQhNmu8yzFuJtad1aKJWa sFRaTA6wWdVWQGsFy6ON2fyOEw5O5T9QpU7yrYsj4fjlxW08w6ZlM+Nh24Ql3Ei1UmWz 1qPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=vOSl0LapzioiqWzUVjPoyhGTpHYbfUyabIDt76E89X0=; b=SEEK70otjyUrkMrKTjJBkahA0Vle5bTrBigpMWjyhmdkeFfxyjo19tMGelEaJTkbZc lkd/ogamZq9JeGban5AxKZVKTQrpjQmtM1W6GuRblNVvDU1P79IZix03g6+9mEMN/VG8 ZQ0vRiGUjk51NVq8ruTYBWg21ahOvOzmwHSnxb6joOP9fEQogiV25oheQil7ZJvqq5zq D3SV8QF2yQSDUe6TtWhNn3Ex3lwzET9gbeO8XMSkpuJex1Qae9H2HKIlAfBAx/IKVQPh Xt323g/NjP6LTXI4EMDXMhpj67E/Z0sga51Sim+KgNE+yhD00eGHx4s0mA8uEfNaLTi4 3I3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=YjzB3KYz; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p14-v6si15736060pfk.275.2018.09.02.06.08.08; Sun, 02 Sep 2018 06:08:08 -0700 (PDT) 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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=YjzB3KYz; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729517AbeIBRXu (ORCPT + 32 others); Sun, 2 Sep 2018 13:23:50 -0400 Received: from mail-dm3nam03on0118.outbound.protection.outlook.com ([104.47.41.118]:8192 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727049AbeIBRXt (ORCPT ); Sun, 2 Sep 2018 13:23:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vOSl0LapzioiqWzUVjPoyhGTpHYbfUyabIDt76E89X0=; b=YjzB3KYzoT9pYvNDi0oQcGtzANvnCQ3SxJ/1zeowCrefvo/KIVAw5v00LNdor+enVEUS2mTeUR1m1dI41dJO+vTYAuheqX11ciy3a0MrORP1w+I2A6hfjQxc8iX5C/cRCIFMLIJS+J2bFYZ+lSnofF4PU++w6AO2T6gvF7E0K1k= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0149.namprd21.prod.outlook.com (10.173.189.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.2; Sun, 2 Sep 2018 13:07:53 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611%7]) with mapi id 15.20.1143.000; Sun, 2 Sep 2018 13:07:53 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Katsuhiro Suzuki , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH AUTOSEL 4.14 70/89] media: helene: fix xtal frequency setting at power on Thread-Topic: [PATCH AUTOSEL 4.14 70/89] media: helene: fix xtal frequency setting at power on Thread-Index: AQHUQr3q/ycf/1XC7kW5NvbQH62eQw== Date: Sun, 2 Sep 2018 13:07:35 +0000 Message-ID: <20180902064918.183387-70-alexander.levin@microsoft.com> References: <20180902064918.183387-1-alexander.levin@microsoft.com> In-Reply-To: <20180902064918.183387-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0149; 6:4dIk1LxjoPTwQLoBM4UTCaROfP6NkOIwa1FalG6jcmf5pXQ4C63NgWi7B3A38s5voFfxYt0i6eLXL3Sb4BSJjLxminAWH0kCuAqABGaHcGQ+Kl7u/sho8CJdN1LLiSk6KsBZPu0HDbqE/W751pCNZJ35kjsf9pbMoC9HX1RqYDoPl6xRW2OaJ1pn4xdqQD74thGjT2JavbhKspqHJ12JQDAoMcbzeuNOOrnZ6bUkDFCr3nDzFQHaBbbKGoaKPdCfx4x+ydRWSJjs16hDwtBeKC2ZynsDebS2+77hrSthzXa9cwJOwQjAAR68vG4+qjXrZrC5GPJtv61yop4ouTK52UQSehFYKbfxEAxska5UmNLtNCCgmrY+jjyTWHPp2MdykLSWJYAVt+t/RCi+N5X6N8Ppvw1p0ep4VndblMh5/niJZxy0mxEst8xKnSBlnKGZ2HTiyHhOMoTdheWlh06HVw==; 5:VJ6HGIf8FTdggsSOQvK7Xvcz4aOIkOLEe0ypzOW75egrpeA7vJL7iegjP4G1aVgnwUFOewaoq0mON5hMy1xfuIVgx65ej72M1EZQwqsorKnB4QDJQ5XGjR8GLfcFn9YO6yEvUIpyEr/8pTE8HE9+5EDonUu2jnNFp9i11hJjVYs=; 7:LEOnnz5W4VRD9JgY5E954lxvOna2yHSoMRGjlgLt+wjG/1A0jEpCF9JPfO8FncPw1pv+sgwpaCmeDpvtO0OFVbVxN9CT+i8u5710ADyRiqVyLQhMWS30QtUWU45PMlFMKVNil3PSR19jaJVznKuCSOAmqBYvg+Jt6rc6qbYtZcjXIuKx+r2v7WYQcDZg8TAwux4i63IGeWyfbD/QXQJxtC5jR0JHTK7o6wGBzlMC98TR4HzhCD+jLQldCl+RrRu/ x-ms-office365-filtering-correlation-id: 6555d205-0a6b-4622-f25f-08d610d517de x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(4534165)(4627221)(201703031133081)(201702281549075)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0149; x-ms-traffictypediagnostic: CY4PR21MB0149: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231340)(944501410)(52105095)(2018427008)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201708071742011)(7699049)(76991033); SRVR:CY4PR21MB0149; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0149; x-forefront-prvs: 078310077C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(376002)(39860400002)(136003)(346002)(396003)(199004)(189003)(76176011)(6116002)(446003)(11346002)(3846002)(5660300001)(110136005)(54906003)(102836004)(26005)(22452003)(316002)(4477795004)(99286004)(6506007)(186003)(6666003)(107886003)(25786009)(1076002)(4326008)(305945005)(2501003)(7736002)(66066001)(97736004)(10090500001)(68736007)(5250100002)(8676002)(81156014)(81166006)(6486002)(6512007)(6436002)(2906002)(53936002)(256004)(14444005)(217873002)(36756003)(86362001)(10290500003)(105586002)(106356001)(72206003)(14454004)(478600001)(2616005)(476003)(486006)(2900100001)(8936002)(86612001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0149; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 7R81AJFybqE1mdiHqs+WiTVi95c6m6kjWzI+lQMI8lhywiOXorauym5tnNb/ujQAht+3gU7NTGHaiOmztJZ0870cX+ylNmyueNwNpr7NZr38Ym67ZhjBdZhpOKI7BUy5CIOSNM6Eei2V/jdrQ9oMZIsYFD9u/0c0+uLXyp41ZM5ojrrAqYXeadcE7Ha6hPDjd3U4fGeou8opA55xQW2pyohquUXouKFIsI1c2lH9nHSfKLan324hSINUb3MLrGi6BrI4eVr3tzbQYH98BjoSVivv2UFUYPaaRqqfLfmeL8ZhCms/S2AP5+tZqih4JS+Ej/kuVY8GoDYxsdBGdNk+Q4dLtADWNSpjtioieHEl1yA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6555d205-0a6b-4622-f25f-08d610d517de X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2018 13:07:35.1103 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0149 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Katsuhiro Suzuki [ Upstream commit a00e5f074b3f3cd39d1ccdc53d4d805b014df3f3 ] This patch fixes crystal frequency setting when power on this device. Signed-off-by: Katsuhiro Suzuki Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/dvb-frontends/helene.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/media/dvb-frontends/helene.c b/drivers/media/dvb-frontends/helene.c index 2ab8d83e5576..fcfe658a4328 100644 --- a/drivers/media/dvb-frontends/helene.c +++ b/drivers/media/dvb-frontends/helene.c @@ -897,7 +897,10 @@ static int helene_x_pon(struct helene_priv *priv) helene_write_regs(priv, 0x99, cdata, sizeof(cdata)); /* 0x81 - 0x94 */ - data[0] = 0x18; /* xtal 24 MHz */ + if (priv->xtal == SONY_HELENE_XTAL_16000) + data[0] = 0x10; /* xtal 16 MHz */ + else + data[0] = 0x18; /* xtal 24 MHz */ data[1] = (uint8_t)(0x80 | (0x04 & 0x1F)); /* 4 x 25 = 100uA */ data[2] = (uint8_t)(0x80 | (0x26 & 0x7F)); /* 38 x 0.25 = 9.5pF */ data[3] = 0x80; /* REFOUT signal output 500mVpp */