Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1676194pxb; Sun, 18 Apr 2021 03:27:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXaHs3FwnF8MQVYGSwQU5w0Ej6I38AzF9UwxbxZLeohV8UmQbrA/OCMeOQNu1q3DlFStQJ X-Received: by 2002:a17:906:e08b:: with SMTP id gh11mr16884439ejb.33.1618741651913; Sun, 18 Apr 2021 03:27:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618741651; cv=none; d=google.com; s=arc-20160816; b=G9xa6EshP4sQJoGHGhFRaQcoOtQC6s7unfvFZnOvnRV/7HiZkQYeenwOlf51R2pR2k Yza3k/ltec0POYp6LVbGPywBs8e4QQjiKwzUt/PeSYoQqE/aZpsYa0SvaJsv8VQwVHFI TphyffmwHDLpWJ8lhL5bdPc+IZcGk88eQay1NJ068FOxQwWEmzJCzkjmA7vmg2DIr0gy X6Me84l3IE6hV2Y1pUp91h5Ei6oVXDoJjhk2ymFZUrQqJ/khO4NFYpxPHvu7vm5myHHX GiKaXAF9dPhgjs0JnUWqpBKydonIlEqwgM17O8C/0lNjEtJSiajLLOxElxz3ErtYuAQF saKw== 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; bh=yPZquT7uySzM3Rdox5Y2003GTDLuGbJjkzgcM2dGqlc=; b=0nm82bgvqj/cPt/vVHjAZD+kkMtqMsQRduu2CpHKKxX80uADcmaIWBBslbAQN1Cm2N 9H3dPoE/sz+29ZiMOwLMsC5mc/Fjuz/LHVYa2vzvIOBjU7qd1WcrqS8f0R7m/jYAind6 6T40on0mrKehNY8SQlp1hESJZXuJUYe4r0ifogGgEo/9698C2DahKZ7LbYULCQavvp7T Gop+TqINlZgnLtSQ6X7JoVdJ97oxvMQQimEB3YCZ0QjwLAz6+h3uACLvsSXiOuUaH3Jq vXKAugU6103tJX9nQb+0Ng0QlkquIFw+OiEYLaagyy16aTi/ehT05Xs2kn4ZQmFXDzZH xGPw== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h17si9540396ejx.114.2021.04.18.03.27.06; Sun, 18 Apr 2021 03:27:31 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229687AbhDRK0i (ORCPT + 99 others); Sun, 18 Apr 2021 06:26:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:56286 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229574AbhDRK0b (ORCPT ); Sun, 18 Apr 2021 06:26:31 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 36D2561090; Sun, 18 Apr 2021 10:26:00 +0000 (UTC) Date: Sun, 18 Apr 2021 11:26:32 +0100 From: Jonathan Cameron To: Srinivas Pandruvada Cc: Alexandru Ardelean , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux@deviqon.com, Thomas Deutschmann Subject: Re: [PATCH] iio: hid-sensors: select IIO_TRIGGERED_BUFFER under HID_SENSOR_IIO_TRIGGER Message-ID: <20210418112632.0eda314c@jic23-huawei> In-Reply-To: References: <20210414084955.260117-1-aardelean@deviqon.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 15 Apr 2021 09:58:33 -0700 Srinivas Pandruvada wrote: > On Wed, 2021-04-14 at 11:49 +0300, Alexandru Ardelean wrote: > > 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 > Acked-by: Srinivas Pandruvada Applied to the fixes-togreg branch of iio.git. Always good to see the autobuilders can find corners no one sane would ever hit :) Jonathan > > > --- > > 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 >