Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp461418rwb; Thu, 10 Nov 2022 03:21:45 -0800 (PST) X-Google-Smtp-Source: AMsMyM7umzcvYUwntsuvN7pRWPgeGmkuFSliWVu91JKymLzOcDweARaDlXSpSEkotH9c07886Gzt X-Received: by 2002:a05:6a00:23c3:b0:56c:ac22:82b2 with SMTP id g3-20020a056a0023c300b0056cac2282b2mr63698592pfc.64.1668079304786; Thu, 10 Nov 2022 03:21:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668079304; cv=none; d=google.com; s=arc-20160816; b=Tza6Qd9sPQdXk3u0uWC4XrnT0M7tVbwzlD5+JrYrks5UTCDfIcBcvn9W0D1pUcIt+/ onzhokwqcoWTt7FDQZocjvJosl8fOpz9yjRqEtvPbc7Pv1OsHtKd7RuZOVNG0HydpFsD cdd7ZMOhUaZ6iGj51DjVTAVhxK7g2si0FTtyXUSuGRe9GK6pBSRVBVNvjzwMRaJCSX5S K7kJITOCaEYKncyJ0bP5Z3OeeugIdc7ofAKbJLy5VZ0XnY/kjUj6iH1InhLhSwHD3P8p /lG8akfiWF9v2As2kYVLcIYXk4rlDdip06w5fc3NMRhTddEj5ofYbELzBYoyGwHjci7x 4O2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=74dqQiWyLQjEOzWoO3Lrynyy+auSFuDxVLH1zUULTMU=; b=lc7dN7+EG35LB6tq+JBBjvYkmkyWchaKrKdi5zBjGLEvld66hoSGvc/7fDlM2mQwY0 JsQcTpt2NEffygZT4mQpaYYOv2ubBYYG0nXqx7cZ8rSVlM1JyQsb/SJxfO8kW247Hqdb 60qCgIo+gd2Z6wQzrC/6W7eY9NNKoiN7l5LklslCpaE6sZE4evbkROP+wrhKVgDdblhu bE0KJ/ISkaEBcDrRaufb2z42ABVfTo7x1gRcABDYpGJ7F4WjAXzWn/MIW81n63yg5/VS GadQu/ul08ExQoI6dYLATTJRbd6b05Np+zJlkoryUoTSNUS9mov6mxk/VmnLewBp+0cb bOTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vixtechnology.com header.s=google header.b=T8GSEQH6; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b15-20020a63d30f000000b0043ca0a1f7dasi19664390pgg.674.2022.11.10.03.21.31; Thu, 10 Nov 2022 03:21:44 -0800 (PST) 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=@vixtechnology.com header.s=google header.b=T8GSEQH6; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229923AbiKJKNI (ORCPT + 92 others); Thu, 10 Nov 2022 05:13:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbiKJKNG (ORCPT ); Thu, 10 Nov 2022 05:13:06 -0500 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A6B6E88 for ; Thu, 10 Nov 2022 02:13:01 -0800 (PST) Received: by mail-wm1-x32a.google.com with SMTP id t25-20020a1c7719000000b003cfa34ea516so3784950wmi.1 for ; Thu, 10 Nov 2022 02:13:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vixtechnology.com; s=google; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=74dqQiWyLQjEOzWoO3Lrynyy+auSFuDxVLH1zUULTMU=; b=T8GSEQH6ZHbWd8QVqxqpQ9ZUWHItXnpymEf1Jnd82S9OK467+z7t4NXF54DstpL3XI IxrLCrxuIVO1Q2MKKEcBmPcC63l+Mn9G7O6+ka6M/gZIdtIrx9nV2bquketNx/5NC17R rypjBAI6UrignKil62TaixvnOCsUerzq3FoFw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=74dqQiWyLQjEOzWoO3Lrynyy+auSFuDxVLH1zUULTMU=; b=zKIXc5mPQqmpN77YjdHQvu5gTTE5vXUVzbneQRT7i2XBwFfOa3PFGYJ0M0fivlIGqZ r2PswFjVGw/jOTmEYfEOOO8HV6N3bFXAhHAX/2vZIk2Vkki4wCSTnNuE7kR+lJGILlUf 2Hcr13QL4KJYHEwHDyeZ9SNqhPVqZ1iCamN92z4GAMgSCiHDkDlN77lxv4l7kD/WTGtN w6wF0npXaemw58cE5F1Z/WHofHFjnO02sQHLk3Hxjb+RhLmfrcnxxVgYVDbNO8S1hHgR wwQQYrvkh3x1w0H6jSh3ypJkNhTajNk4sc8NnTWwChSdPElPrkr+hX9JIawkxqfPJxkY SVdg== X-Gm-Message-State: ACrzQf2X1IQnRdS19veZKrL0VSsX7YY76H1Zla9fPBT++xgP/q69Y2ef uBFsJm1vj7BXDr4DCUYr2Y670f121Y4GfUIKXW9Wzf6jE/EGgGnqkMQQhJxgsdI79gbVTk5pRQt yEWMamluCyEjH4CdW1nM/rXLFt3I= X-Received: by 2002:a05:600c:3c82:b0:3b5:60a6:c80f with SMTP id bg2-20020a05600c3c8200b003b560a6c80fmr43691567wmb.199.1668075180017; Thu, 10 Nov 2022 02:13:00 -0800 (PST) Received: from subhajit-ThinkPad-Yoga-370.vix.local ([124.148.245.238]) by smtp.gmail.com with ESMTPSA id f17-20020a056000129100b002368a6deaf8sm15574055wrx.57.2022.11.10.02.12.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 02:12:59 -0800 (PST) From: Subhajit Ghosh To: matt.ranostay@konsulko.com, jic23@kernel.org, lars@metafoo.de, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org Cc: Subhajit Ghosh Subject: [PATCH] iio: light: apds9960: Fix iio_event_spec structures Date: Thu, 10 Nov 2022 18:12:41 +0800 Message-Id: <20221110101241.10576-1-subhajit.ghosh@vixtechnology.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 There is only one interrupt enable option for both ALS low and high thresholds, and one for both Proximity low and high thresholds. Signed-off-by: Subhajit Ghosh --- drivers/iio/light/apds9960.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c index 4141c0fa7bc4..df9ccbcf0ffe 100644 --- a/drivers/iio/light/apds9960.c +++ b/drivers/iio/light/apds9960.c @@ -223,14 +223,16 @@ static const struct iio_event_spec apds9960_pxs_event_spec[] = { { .type = IIO_EV_TYPE_THRESH, .dir = IIO_EV_DIR_RISING, - .mask_separate = BIT(IIO_EV_INFO_VALUE) | - BIT(IIO_EV_INFO_ENABLE), + .mask_separate = BIT(IIO_EV_INFO_VALUE), }, { .type = IIO_EV_TYPE_THRESH, .dir = IIO_EV_DIR_FALLING, - .mask_separate = BIT(IIO_EV_INFO_VALUE) | - BIT(IIO_EV_INFO_ENABLE), + .mask_separate = BIT(IIO_EV_INFO_VALUE), + }, + { + .type = IIO_EV_TYPE_THRESH, + .mask_separate = BIT(IIO_EV_INFO_ENABLE), }, }; @@ -238,14 +240,16 @@ static const struct iio_event_spec apds9960_als_event_spec[] = { { .type = IIO_EV_TYPE_THRESH, .dir = IIO_EV_DIR_RISING, - .mask_separate = BIT(IIO_EV_INFO_VALUE) | - BIT(IIO_EV_INFO_ENABLE), + .mask_separate = BIT(IIO_EV_INFO_VALUE), }, { .type = IIO_EV_TYPE_THRESH, .dir = IIO_EV_DIR_FALLING, - .mask_separate = BIT(IIO_EV_INFO_VALUE) | - BIT(IIO_EV_INFO_ENABLE), + .mask_separate = BIT(IIO_EV_INFO_VALUE), + }, + { + .type = IIO_EV_TYPE_THRESH, + .mask_separate = BIT(IIO_EV_INFO_ENABLE), }, }; -- 2.34.1 -- This email is confidential. If you have received this email in error please notify us immediately by return email and delete this email and any attachments. Vix accepts no liability for any damage caused by this email or any attachments due to viruses, interference, interception, corruption or unauthorised access.