From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751507AbdBIB44 (ORCPT ); Wed, 8 Feb 2017 20:56:56 -0500 Received: from onstation.org ([52.200.56.107]:39848 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751094AbdBIB4R (ORCPT ); Wed, 8 Feb 2017 20:56:17 -0500 From: Brian Masney To: jic23@kernel.org Cc: gregkh@linuxfoundation.org, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-kernel@vger.kernel.org, ldewangan@nvidia.com Subject: [PATCH 3/7] staging: iio: isl29028: fix incorrect sampling frequency value Date: Wed, 8 Feb 2017 20:54:27 -0500 Message-Id: <20170209015431.17380-4-masneyb@onstation.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170209015431.17380-1-masneyb@onstation.org> References: <20170209015431.17380-1-masneyb@onstation.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The sysfs attribute in_proximity_sampling_frequency_available currently shows the values 1 3 5 10 13 20 83 100. These values are supposed to correspond to the sleep values 800 400 200 100 75 50 12 0 (all in ms). When passing in a sampling frequency of 3, it actually uses a sleep time of 200ms instead of the expected 400ms value. This patch changes the 3 supported sampling frequency to 2 so that the proximity sleep time of 400ms can be used. Signed-off-by: Brian Masney --- drivers/staging/iio/light/isl29028.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/light/isl29028.c b/drivers/staging/iio/light/isl29028.c index 177dced..b63fdf70 100644 --- a/drivers/staging/iio/light/isl29028.c +++ b/drivers/staging/iio/light/isl29028.c @@ -471,7 +471,7 @@ static int isl29028_read_raw(struct iio_dev *indio_dev, } static IIO_CONST_ATTR(in_proximity_sampling_frequency_available, - "1 3 5 10 13 20 83 100"); + "1 2 5 10 13 20 83 100"); static IIO_CONST_ATTR(in_illuminance_scale_available, "125 2000"); #define ISL29028_CONST_ATTR(name) (&iio_const_attr_##name.dev_attr.attr) -- 2.9.3