Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3544044pxb; Wed, 14 Apr 2021 07:55:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpmFO7aEMqpsG7um8x3mDotDnM3oeXfe/DD0xMZhkco+YaZmhWm6TrhDl20u2YrmYjCkST X-Received: by 2002:aa7:c144:: with SMTP id r4mr26836787edp.222.1618412122437; Wed, 14 Apr 2021 07:55:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618412122; cv=none; d=google.com; s=arc-20160816; b=wA7mfSN5U+k6PK3JY+JJK8D1mC1OnyEzhwGNVdLLr26FvgHffTZGLfIiUWivWdJ8OC s8Q99/kjQ72UV+snGFKKOPiP1aqqrR35uD9SuD2LN+u20HqaS3dRwBNdhAfmdw9DPp9T Ahm/P+qXSVOtl1Tpuf+SinJQa+Jv4nJ7CXf8fCoXoQ4kuJLfUk2sS4XU7sgd3FA8gVG4 j3it0cCdAczxCqI4xKaDWMZJgoudzT8BHY2jcEZRJoxQpInm7TTxaI/He3E5hYx2F46V /rTGc+PDS+AxTPEph75Iz6a+7Yd3PnWBJFRHFvoTN1ASAXSffmY2n9uUDLTfAxjKD/ES fICg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=ZKYXCW0j+tTrQuAe8GIX4MEDkI/Cgjtmucn5a1qWgnA=; b=veazdnN83x111xk3zrG5/BAVhLJYxAqYDPB1GhfENPIONJneKDdp97K5tujGqOVs5C 5UpUl5IntzaNcFlGZRDdjSkPheIYQrUbTg4ShR4Y0R4JD/G3sJ3bxioBstESzj9fhb/e LdR3biYCrIqwQi/58+O71qfKJ4DyC15Ypkx+Xsu5sflu5CI/1Tven6KjmH0/08RZNC0g DddMCug5B9eXDGlXJGvq/cAfhjkB7dvPcfmR2j0SOe3pWwvzTHRAWAgQ6b31YPham9Wk ai7KMwPrHd+BnyCttNmTzXSH846n8Y3nOWsRGjd2gsMSeR8VYTfeaDT4A0ERtqRCY1vf RGww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deviqon.com header.s=google header.b=EtzQmMnW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deviqon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y11si6572424ejw.467.2021.04.14.07.54.58; Wed, 14 Apr 2021 07:55:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@deviqon.com header.s=google header.b=EtzQmMnW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deviqon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350184AbhDNIua (ORCPT + 99 others); Wed, 14 Apr 2021 04:50:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244803AbhDNIuY (ORCPT ); Wed, 14 Apr 2021 04:50:24 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C89A2C061574 for ; Wed, 14 Apr 2021 01:50:02 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id u17so30223685ejk.2 for ; Wed, 14 Apr 2021 01:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=deviqon.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZKYXCW0j+tTrQuAe8GIX4MEDkI/Cgjtmucn5a1qWgnA=; b=EtzQmMnWkL9LGHP1xGfw8p/DZJHC3KSpHtK/JHwSEmR3o4kpZp14SR9OVGBDEMubYm jw3rYntByVaJlrcYnVuPk0Sa7+wqEMAXiSMvhWnuaa8nJ5xqG2fGzAzVJpH+C1iTHosR 6sdemFHCEE2VoXAyeT5qpHClVPjzv7zof/6ZEEICUFLcfFqStL/TbXxhNmBl2sNka1W2 rg2pVYNT275NoZ/x92zf1Xd5xO9SGwJcoHcyPsPKnGu3CmBOJ0wH+7C7i8io7GIZFI+Z O9FOwtVyTQTgD/lBP1x9V4p7FMynRV6wlwi8ATh8SjhcIf6jVIFZ3ufeDHKrwLkDSG2L wE2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZKYXCW0j+tTrQuAe8GIX4MEDkI/Cgjtmucn5a1qWgnA=; b=khdwFo+StUFQhIHWvYx4FQ9gRr4kPXrVF08AsZ7KcGUzhYuBZhgXFxP3nvRSaezDE+ cr2GwxlOVO+B8ze9ZRadSU7dzDBeuojUY+6lvNkZvw22wf7Ac9JBRFXskHzPetjcjraV 7+QQfcUZ0OeQ6KGsZpg7Io7awqcy7PaqmBvGJ9t3Xl7CA6TDe/muKnzYpQBq6mNIng7h QcqAypQejkm4MemXZFUrvT4qnSxOBA9WbRI6s5AVNBSJDtXjSlv45KkTK6/ntyBMCX7O dsqn7EzdLMxoI191/Vr0IEGF3xpzPFKEXqbF43P3hauPx2dSmCLezKRNRxkZYgK0T8nD ZUnA== X-Gm-Message-State: AOAM532uUJRSty7L1dAM90Z/NCaSodHQQp1i1zGdfdbYQrdGDii4Xi4q zQZ8MSxpqNgLWZ0TTWlm+TlRdqwbdW3Kh1aK2ethog== X-Received: by 2002:a17:906:aad9:: with SMTP id kt25mr35924599ejb.364.1618390201527; Wed, 14 Apr 2021 01:50:01 -0700 (PDT) Received: from localhost.localdomain ([5.2.193.191]) by smtp.gmail.com with ESMTPSA id y16sm11146038edc.62.2021.04.14.01.50.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Apr 2021 01:50:01 -0700 (PDT) From: Alexandru Ardelean To: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: jic23@kernel.org, linux@deviqon.com, Alexandru Ardelean , Thomas Deutschmann , Srinivas Pandruvada Subject: [PATCH] iio: hid-sensors: select IIO_TRIGGERED_BUFFER under HID_SENSOR_IIO_TRIGGER Date: Wed, 14 Apr 2021 11:49:55 +0300 Message-Id: <20210414084955.260117-1-aardelean@deviqon.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org During commit 067fda1c065ff ("iio: hid-sensors: move triggered buffer setup into hid_sensor_setup_trigger"), the iio_triggered_buffer_{setup,cleanup}() functions got moved under the hid-sensor-trigger module. The above change works fine, if any of the sensors get built. However, when only the common hid-sensor-trigger module gets built (and none of the drivers), then the IIO_TRIGGERED_BUFFER symbol isn't selected/enforced. Previously, each driver would enforce/select the IIO_TRIGGERED_BUFFER symbol. With this change the HID_SENSOR_IIO_TRIGGER (for the hid-sensor-trigger module) will enforce that IIO_TRIGGERED_BUFFER gets selected. All HID sensor drivers select the HID_SENSOR_IIO_TRIGGER symbol. So, this change removes the IIO_TRIGGERED_BUFFER enforcement from each driver. Fixes: 067fda1c065ff ("iio: hid-sensors: move triggered buffer setup into hid_sensor_setup_trigger") Reported-by: Thomas Deutschmann Cc: Srinivas Pandruvada Signed-off-by: Alexandru Ardelean --- drivers/iio/accel/Kconfig | 1 - drivers/iio/common/hid-sensors/Kconfig | 1 + drivers/iio/gyro/Kconfig | 1 - drivers/iio/humidity/Kconfig | 1 - drivers/iio/light/Kconfig | 2 -- drivers/iio/magnetometer/Kconfig | 1 - drivers/iio/orientation/Kconfig | 2 -- drivers/iio/pressure/Kconfig | 1 - drivers/iio/temperature/Kconfig | 1 - 9 files changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/iio/accel/Kconfig b/drivers/iio/accel/Kconfig index cceda3cecbcf..8b1723635cce 100644 --- a/drivers/iio/accel/Kconfig +++ b/drivers/iio/accel/Kconfig @@ -229,7 +229,6 @@ config DMARD10 config HID_SENSOR_ACCEL_3D depends on HID_SENSOR_HUB select IIO_BUFFER - select IIO_TRIGGERED_BUFFER select HID_SENSOR_IIO_COMMON select HID_SENSOR_IIO_TRIGGER tristate "HID Accelerometers 3D" diff --git a/drivers/iio/common/hid-sensors/Kconfig b/drivers/iio/common/hid-sensors/Kconfig index 24d492567336..2a3dd3b907be 100644 --- a/drivers/iio/common/hid-sensors/Kconfig +++ b/drivers/iio/common/hid-sensors/Kconfig @@ -19,6 +19,7 @@ config HID_SENSOR_IIO_TRIGGER tristate "Common module (trigger) for all HID Sensor IIO drivers" depends on HID_SENSOR_HUB && HID_SENSOR_IIO_COMMON && IIO_BUFFER select IIO_TRIGGER + select IIO_TRIGGERED_BUFFER help Say yes here to build trigger support for HID sensors. Triggers will be send if all requested attributes were read. diff --git a/drivers/iio/gyro/Kconfig b/drivers/iio/gyro/Kconfig index 5824f2edf975..20b5ac7ab66a 100644 --- a/drivers/iio/gyro/Kconfig +++ b/drivers/iio/gyro/Kconfig @@ -111,7 +111,6 @@ config FXAS21002C_SPI config HID_SENSOR_GYRO_3D depends on HID_SENSOR_HUB select IIO_BUFFER - select IIO_TRIGGERED_BUFFER select HID_SENSOR_IIO_COMMON select HID_SENSOR_IIO_TRIGGER tristate "HID Gyroscope 3D" diff --git a/drivers/iio/humidity/Kconfig b/drivers/iio/humidity/Kconfig index 6549fcf6db69..2de5494e7c22 100644 --- a/drivers/iio/humidity/Kconfig +++ b/drivers/iio/humidity/Kconfig @@ -52,7 +52,6 @@ config HID_SENSOR_HUMIDITY tristate "HID Environmental humidity sensor" depends on HID_SENSOR_HUB select IIO_BUFFER - select IIO_TRIGGERED_BUFFER select HID_SENSOR_IIO_COMMON select HID_SENSOR_IIO_TRIGGER help diff --git a/drivers/iio/light/Kconfig b/drivers/iio/light/Kconfig index 33ad4dd0b5c7..917f9becf9c7 100644 --- a/drivers/iio/light/Kconfig +++ b/drivers/iio/light/Kconfig @@ -256,7 +256,6 @@ config ISL29125 config HID_SENSOR_ALS depends on HID_SENSOR_HUB select IIO_BUFFER - select IIO_TRIGGERED_BUFFER select HID_SENSOR_IIO_COMMON select HID_SENSOR_IIO_TRIGGER tristate "HID ALS" @@ -270,7 +269,6 @@ config HID_SENSOR_ALS config HID_SENSOR_PROX depends on HID_SENSOR_HUB select IIO_BUFFER - select IIO_TRIGGERED_BUFFER select HID_SENSOR_IIO_COMMON select HID_SENSOR_IIO_TRIGGER tristate "HID PROX" diff --git a/drivers/iio/magnetometer/Kconfig b/drivers/iio/magnetometer/Kconfig index 5d4ffd66032e..74ad5701c6c2 100644 --- a/drivers/iio/magnetometer/Kconfig +++ b/drivers/iio/magnetometer/Kconfig @@ -95,7 +95,6 @@ config MAG3110 config HID_SENSOR_MAGNETOMETER_3D depends on HID_SENSOR_HUB select IIO_BUFFER - select IIO_TRIGGERED_BUFFER select HID_SENSOR_IIO_COMMON select HID_SENSOR_IIO_TRIGGER tristate "HID Magenetometer 3D" diff --git a/drivers/iio/orientation/Kconfig b/drivers/iio/orientation/Kconfig index a505583cc2fd..396cbbb867f4 100644 --- a/drivers/iio/orientation/Kconfig +++ b/drivers/iio/orientation/Kconfig @@ -9,7 +9,6 @@ menu "Inclinometer sensors" config HID_SENSOR_INCLINOMETER_3D depends on HID_SENSOR_HUB select IIO_BUFFER - select IIO_TRIGGERED_BUFFER select HID_SENSOR_IIO_COMMON select HID_SENSOR_IIO_TRIGGER tristate "HID Inclinometer 3D" @@ -20,7 +19,6 @@ config HID_SENSOR_INCLINOMETER_3D config HID_SENSOR_DEVICE_ROTATION depends on HID_SENSOR_HUB select IIO_BUFFER - select IIO_TRIGGERED_BUFFER select HID_SENSOR_IIO_COMMON select HID_SENSOR_IIO_TRIGGER tristate "HID Device Rotation" diff --git a/drivers/iio/pressure/Kconfig b/drivers/iio/pressure/Kconfig index 689b978db4f9..fc0d3cfca418 100644 --- a/drivers/iio/pressure/Kconfig +++ b/drivers/iio/pressure/Kconfig @@ -79,7 +79,6 @@ config DPS310 config HID_SENSOR_PRESS depends on HID_SENSOR_HUB select IIO_BUFFER - select IIO_TRIGGERED_BUFFER select HID_SENSOR_IIO_COMMON select HID_SENSOR_IIO_TRIGGER tristate "HID PRESS" diff --git a/drivers/iio/temperature/Kconfig b/drivers/iio/temperature/Kconfig index c5482983f568..f20ae3c963cb 100644 --- a/drivers/iio/temperature/Kconfig +++ b/drivers/iio/temperature/Kconfig @@ -45,7 +45,6 @@ config HID_SENSOR_TEMP tristate "HID Environmental temperature sensor" depends on HID_SENSOR_HUB select IIO_BUFFER - select IIO_TRIGGERED_BUFFER select HID_SENSOR_IIO_COMMON select HID_SENSOR_IIO_TRIGGER help -- 2.30.2