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 */