Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2284527rwd; Sun, 28 May 2023 12:05:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4w2tTf7YUt8ywzPjIBBI3gfzK/uEJ0McZ3C4MGRU9gOymq2nlLmjh23hQpCiMXfy3brF1I X-Received: by 2002:a17:902:d4c8:b0:1ac:8384:a7fb with SMTP id o8-20020a170902d4c800b001ac8384a7fbmr11201719plg.66.1685300709159; Sun, 28 May 2023 12:05:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685300709; cv=none; d=google.com; s=arc-20160816; b=W3OczRocxm6zg8KabDLrv2i77cx7VuzM2HUNhU5EF1EeITxo6jNQ4GxoMb4Nn56aRg MhCwXrhmLeBrT4qT7Xij8L0w5qPclHnx8qZXwT2TNAKSN67pQHj10AJcSsjl3U66/h5p SqGbihhWqDzoYhcr7qfaxqrKfGRqhtMsaRRS4Co6NtqVWZdtRcAOKx0W294NoFxhu3lq QDHkxZyXms5O5tCRatzlVzXD5cGbj+ln3dcbAqq7vxZYFP/XI5Vy75DikmnBh5Hh1ZP9 MKE6atZtenySvqnXJBB2Ohmqw43tWBiqsnLkPSDyixtwcQBxBK0JWugpgcD+EH//8Tqf VTgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=YjUavJQhsaArvmBY4fH6pqPRtXWSCMk8Wwgf/6RIi8k=; b=y3sa6nsVVR7HD63+SHdwzytpQrgtIxX0eHWOt6f7GZsW2juWYw9fCc5r+fB4e6jSD1 CZGRYN9N8WLfHrVRJabJ7iMhbJlEsn6RolwjnomhmXe9eK1g29M0q9Jtos7nxSOxORr2 EOzB/07NbCQ67Hp+uUq6FaWvcfhs7U/gvXRGTkeDIHMUUYcEDAQEajC38KG/B8DzKtzp elYD9P4UXvv2FW/LzAvh2wkXqns1NWVMSxwsEodIFN+5QnGeOqhYU3rjnv8g64lUjPLK eF+WAClKZJzsmFKr8x9GKsjyPDk5Pj/vJRt/FCdXwZwxlHUpo0vgQ3x4RDB7qQM3IIZv oeSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rILx0T4s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jc22-20020a17090325d600b001b025aba9f2si3759067plb.22.2023.05.28.12.04.56; Sun, 28 May 2023 12:05:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rILx0T4s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229544AbjE1SpY (ORCPT + 99 others); Sun, 28 May 2023 14:45:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbjE1SpX (ORCPT ); Sun, 28 May 2023 14:45:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EE8DB1; Sun, 28 May 2023 11:45:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BB0126133B; Sun, 28 May 2023 18:45:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CEF95C433EF; Sun, 28 May 2023 18:45:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685299521; bh=pyZ98nlMappaPtL49VU7/CIkHy8xhwh4N50ViQx94vE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=rILx0T4s5kA9ldEKvbeNmuLV+Q9nnOhLuYDVfP6rHWle1sFmBHZC74DjpUFb5HEwF XRfN6RshG6ExHvIv+rXDM17jpNsLrqskPO1CZWvWZzLz8uHNaODU1xV4H2LKBCO/Ej UEsFF792dW7EFSX32jsqz2QhNx3zH9OJerquW0yqaEpYAAknS6a7/C96/YUhrREngf IsIsq2Et8DpHnQkk8yjREJfjTQEra8xMDiPgWC+JOGOjGJXa4oerFoCgsGo1gIudew 7l31YiOUmrcwV7qUItDId7TH4ziACiRbglRhaBLnQcEPfB9fOJQPQufmZSMC1dKfOa U0z4qnsMZvlwQ== Date: Sun, 28 May 2023 20:01:40 +0100 From: Jonathan Cameron To: Astrid Rost Cc: Lars-Peter Clausen , , , , Uwe =?UTF-8?B?S2xlaW5l?= =?UTF-8?B?LUvDtm5pZw==?= , Mathieu Othacehe Subject: Re: [PATCH v4 0/7] iio: light: vcnl4000: Add features for vncl4040/4200 Message-ID: <20230528200140.7ccaf6e0@jic23-huawei> In-Reply-To: <20230522142621.1680563-1-astrid.rost@axis.com> References: <20230522142621.1680563-1-astrid.rost@axis.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 22 May 2023 16:26:14 +0200 Astrid Rost wrote: > Add a more complete support for vncl4040 and vcnl4200, which allows to > change the distance of proximity detection and interrupt support for the > illuminance sensor. Something odd going on (superficially looks like a rebase mistake in patch = 6) CHECK drivers/iio/amplifiers/ad8366.c = =20 In file included from ./include/linux/bits.h:6, = =20 from ./include/linux/bitops.h:6, = =20 from ./include/linux/kernel.h:22, = =20 from ./arch/x86/include/asm/percpu.h:27, = =20 from ./arch/x86/include/asm/current.h:10, = =20 from ./arch/x86/include/asm/processor.h:17, = =20 from ./arch/x86/include/asm/timex.h:5, = =20 from ./include/linux/timex.h:67, = =20 from ./include/linux/time32.h:13, = =20 from ./include/linux/time.h:60, = =20 from ./include/linux/stat.h:19, =20 from ./include/linux/module.h:13, =20 from drivers/iio/light/vcnl4000.c:21: =20 ./include/vdso/bits.h:7:33: warning: initialized field overwritten [-Woverr= ide-init] 7 | #define BIT(nr) (UL(1) << (nr)) = =20 | ^ =20 drivers/iio/light/vcnl4000.c:1824:49: note: in expansion of macro =E2=80=98= BIT=E2=80=99 = =20 1824 | .info_mask_separate_available =3D BIT(IIO_CHAN_INFO= _INT_TIME) | | ^~~ ./include/vdso/bits.h:7:33: note: (near initialization for =E2=80=98vcnl404= 0_channels[1].info_mask_separate_available=E2=80=99) 7 | #define BIT(nr) (UL(1) << (nr)) =20 | ^ =20 drivers/iio/light/vcnl4000.c:1824:49: note: in expansion of macro =E2=80=98= BIT=E2=80=99 1824 | .info_mask_separate_available =3D BIT(IIO_CHAN_INFO= _INT_TIME) | =20 | ^~~ =20 >=20 > Proximity functionality: > - Interrupt support (new on vcnl4200). >=20 > Proximity reduce the amount of interrupts: > - Adaptable integration time (new on vcnl4200) - the sampling rate > changes according to this value. > - Period - interrupt is asserted if the value is above or > below a certain threshold. >=20 > Proximity change the activity distance: > - Oversampling ratio - Amount of LED pulses per measured raw value. > - Calibration bias - LED current calibration of the sensor. >=20 > Illuminance functionality: > - Interrupt support. >=20 > Illuminance reduce the amount of interrupts: > - Adaptable integration time - the sampling rate and scale changes > according to this value. > - Period =E2=80=93 interrupt is asserted if the value is above or > below a certain threshold. >=20 > changes v2: > - [PATCH v2 3/7] Fixed calculation of al_scale. > Fix the value of vcnl4040 according to the data-sheet. > Use div_u64 for the division. > scription for the branch >=20 > changes v3: > - [PATCH v3 1-3/7] Add differences between the chips as variables in > chip-spec. > - [PATCH v3 4/7] Changed commit message. > - [PATCH v3 5/7] Use period instead of debounce time. This causes some > calculations as the period is a time and the chip allows to set a certa= in > amount of measurements above/below the threshold, before throwing an > interrupt. > - [PATCH v3 6/7] Changed commit message. >=20 > changes v4: > - [PATCH v3 1-3/7] Fix setting correct als_it for vcnl4040. > - [PATCH v3 5/7] Use MICRO macro. > Fix values greater than 1 s for the proximity period. >=20 > Astrid Rost (7): > [PATCH v4 1/7] iio: light: vcnl4000: Add proximity irq for vcnl4200 > [PATCH v4 2/7] iio: light: vcnl4000: Add proximity ps_it for vcnl4200 > [PATCH v4 3/7] iio: light: vcnl4000: Add als_it for vcnl4040/4200 > [PATCH v4 4/7] iio: light: vcnl4000: add illuminance irq vcnl4040/4200 > [PATCH v4 5/7] iio: light: vcnl4000: Add period for vcnl4040/4200 > [PATCH v4 6/7] iio: light: vcnl4000: Add oversampling_ratio for 4040/42= 00 > [PATCH v4 7/7] iio: light: vcnl4000: Add calibration bias for 4040/4200 >=20 > drivers/iio/light/vcnl4000.c | 721 +++++++++++++++++++++++++++++++---- > 1 file changed, 653 insertions(+), 68 deletions(-) >=20