Skip to contentSkip to conversation

FAILED: patch "[PATCH] iio: light: vcnl4000: update sampling periods for vcnl4200" failed to apply to 4.19-stable tree

PATCH [email protected] 2 participants 2 messages Mar 23, 2020

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

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 <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From b42aa97ed5f1169cfd37175ef388ea62ff2dcf43 Mon Sep 17 00:00:00 2001
From: Tomas Novotny <[email protected]>
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")
drivers/iio/light/vcnl4000.c +4 -4
index b0e241aaefb4..98428bf430bd 100644
@@ -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:
maintainer
#1 lore raw
Quoted 27 lines · On Mon, Mar 23, 2020 at 03:18:25PM +0100, [email protected] wrote:

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 <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From b42aa97ed5f1169cfd37175ef388ea62ff2dcf43 Mon Sep 17 00:00:00 2001
From: Tomas Novotny <[email protected]>
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.

Quoted 8 lines

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")

The conflict is because we don't have 5a441aade5b3 ("iio: light:
vcnl4000 add support for the VCNL4040 proximity and light sensor") on 4.19. I've adjusted context and queued it up.

Signature · 2 lines
Thanks,
Sasha