From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE648C4332B for ; Mon, 23 Mar 2020 14:18:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 90D5B20735 for ; Mon, 23 Mar 2020 14:18:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584973109; bh=9Q9O2K+Mh8A5o6J17GYBleb193ztLEPhbCx5KefczVs=; h=Subject:To:Cc:From:Date:List-ID:From; b=u6yT8LY8xmezLUEznDv04ku4AfSzzsQSJ9MPUa8UB0gK4pWW8/bxD6yeHnnez/t56 OxaB8yuJ89xxjVS9uq/+YIhsijWglevkon+CIbkIUHzMCGhJtOHOtfA2fR0DAXotpZ arJxMAE6poDnVxJLvjFrMYr94S2R1fj1nLx8gQlA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728531AbgCWOS3 (ORCPT ); Mon, 23 Mar 2020 10:18:29 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:60975 "EHLO wout1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728359AbgCWOS3 (ORCPT ); Mon, 23 Mar 2020 10:18:29 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 062D4501; Mon, 23 Mar 2020 10:18:27 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 23 Mar 2020 10:18:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=pw8BOI 69N/53CLVN3tHoAnOB6mO66Msy+gLvZ5jTz3Y=; b=gktR29oycsRxvo9nJ3VuiC 81AZ6B5W54BbCS+1ETqI8EvsxHxeenM0i/So99XutXi3ec8+ykET2G8f2SgAwHBR YEKokQvI9cuXQWcJVl2a83KmuD+LPMko2GxKV//GbuS5eWpzlmBw0OtbWWm9Y08A QtT9fvQe30+UZw79hYMJgQo719R4u0OgreP+AOBUCBLSxDI8eUIAVC36gxV3uxna cVuOgRZ0nfA1ut8eW/V50ia0oBJSdKKYoeQPcR0QCd6D9jaGWub0m42JmBeNiryP /tiaU4spbLYma8vrevQKtqOLge5IxcpOM/796u7fMKSA3M1RrIR/mInX1MYp9IRQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudegkedgiedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtjeenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecukfhppeekfedrkeeirdekledruddtjeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhhdrtghomh X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 48FC8306321F; Mon, 23 Mar 2020 10:18:26 -0400 (EDT) Subject: FAILED: patch "[PATCH] iio: light: vcnl4000: update sampling periods for vcnl4200" failed to apply to 4.19-stable tree To: tomas@novotny.cz, Jonathan.Cameron@huawei.com, Stable@vger.kernel.org, agx@sigxcpu.org Cc: From: Date: Mon, 23 Mar 2020 15:18:25 +0100 Message-ID: <1584973105253103@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.19-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From b42aa97ed5f1169cfd37175ef388ea62ff2dcf43 Mon Sep 17 00:00:00 2001 From: Tomas Novotny Date: Tue, 18 Feb 2020 16:44:50 +0100 Subject: [PATCH] iio: light: vcnl4000: update sampling periods for vcnl4200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vishay has published a new version of "Designing the VCNL4200 Into an Application" application note in October 2019. The new version specifies that there is +-20% of part to part tolerance. This explains the drift seen during experiments. The proximity pulse width is also changed from 32us to 30us. According to the support, the tolerance also applies to ambient light. So update the sampling periods. As the reading is blocking, current users may notice slightly longer response time. Fixes: be38866fbb97 ("iio: vcnl4000: add support for VCNL4200") Reviewed-by: Guido Günther Signed-off-by: Tomas Novotny Cc: Signed-off-by: Jonathan Cameron diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c index b0e241aaefb4..98428bf430bd 100644 --- a/drivers/iio/light/vcnl4000.c +++ b/drivers/iio/light/vcnl4000.c @@ -167,10 +167,10 @@ static int vcnl4200_init(struct vcnl4000_data *data) data->vcnl4200_ps.reg = VCNL4200_PS_DATA; switch (id) { case VCNL4200_PROD_ID: - /* Integration time is 50ms, but the experiments */ - /* show 54ms in total. */ - data->vcnl4200_al.sampling_rate = ktime_set(0, 54000 * 1000); - data->vcnl4200_ps.sampling_rate = ktime_set(0, 4200 * 1000); + /* Default wait time is 50ms, add 20% tolerance. */ + data->vcnl4200_al.sampling_rate = ktime_set(0, 60000 * 1000); + /* Default wait time is 4.8ms, add 20% tolerance. */ + data->vcnl4200_ps.sampling_rate = ktime_set(0, 5760 * 1000); data->al_scale = 24000; break; case VCNL4040_PROD_ID: