From patchwork Sat Mar 24 20:05:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Masney X-Patchwork-Id: 10306359 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3A309600CC for ; Sat, 24 Mar 2018 20:07:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BB9429272 for ; Sat, 24 Mar 2018 20:07:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 201D8292DB; Sat, 24 Mar 2018 20:07:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C4F4E29272 for ; Sat, 24 Mar 2018 20:07:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753545AbeCXUGI (ORCPT ); Sat, 24 Mar 2018 16:06:08 -0400 Received: from onstation.org ([52.200.56.107]:53000 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753224AbeCXUGH (ORCPT ); Sat, 24 Mar 2018 16:06:07 -0400 Received: from xilitla.hsd1.wv.comcast.net (c-98-236-77-125.hsd1.wv.comcast.net [98.236.77.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: masneyb) by onstation.org (Postfix) with ESMTPSA id 0F3E85AC; Sat, 24 Mar 2018 20:06:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=onstation.org; s=default; t=1521921966; bh=A73SZfz5r6idDk3Trt2sR7FMOzd4gtLyELuuaCg33xo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MKsWjME3S3pncF1q/zNc1G3okXFSRhfJrmwxYABs8QSBNOSr8lURtlZKKmeffZlIf 7k0Iej/7cYLgkUBF2x8iyYcV7O3pvNwKPae8qiRpLHpocWZNnxlfycz2YZLMhVdGEg EWSR19qavoigUn6yFXNKBAFmm27jacNI1v4fundg= From: Brian Masney To: jic23@kernel.org, linux-iio@vger.kernel.org Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-kernel@vger.kernel.org, Jon.Brenner@ams.com Subject: [PATCH 2/4] staging: iio: tsl2x7x: move IIO_CHAN_INFO_CALIB{SCALE, BIAS} to IIO_LIGHT channel Date: Sat, 24 Mar 2018 16:05:53 -0400 Message-Id: <20180324200555.1403-3-masneyb@onstation.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180324200555.1403-1-masneyb@onstation.org> References: <20180324200555.1403-1-masneyb@onstation.org> Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The IIO_CHAN_INFO_CALIBSCALE and IIO_CHAN_INFO_CALIBBIAS masks are currently associated with the IIO_INTENSITY channel but should be associated with the IIO_LIGHT channel since these values are used to calculate the lux. Directory listing of the sysfs attributes for a TSL2772 with this patch applied: dev events in_illuminance0_calibbias in_illuminance0_calibrate in_illuminance0_calibscale in_illuminance0_calibscale_available in_illuminance0_input in_illuminance0_integration_time in_illuminance0_integration_time_available in_illuminance0_lux_table in_illuminance0_target_input in_intensity0_raw in_intensity1_raw in_proximity0_calibrate in_proximity0_calibscale in_proximity0_calibscale_available in_proximity0_raw name of_node power subsystem uevent Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c index 8530bccdb317..d5a237fb0a0b 100644 --- a/drivers/staging/iio/light/tsl2x7x.c +++ b/drivers/staging/iio/light/tsl2x7x.c @@ -1491,14 +1491,14 @@ static const struct tsl2x7x_chip_info tsl2x7x_chip_info_tbl[] = { .indexed = 1, .channel = 0, .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED) | - BIT(IIO_CHAN_INFO_INT_TIME), + BIT(IIO_CHAN_INFO_INT_TIME) | + BIT(IIO_CHAN_INFO_CALIBSCALE) | + BIT(IIO_CHAN_INFO_CALIBBIAS), }, { .type = IIO_INTENSITY, .indexed = 1, .channel = 0, - .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | - BIT(IIO_CHAN_INFO_CALIBSCALE) | - BIT(IIO_CHAN_INFO_CALIBBIAS), + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .event_spec = tsl2x7x_events, .num_event_specs = ARRAY_SIZE(tsl2x7x_events), }, { @@ -1531,14 +1531,14 @@ static const struct tsl2x7x_chip_info tsl2x7x_chip_info_tbl[] = { .indexed = 1, .channel = 0, .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED) | - BIT(IIO_CHAN_INFO_INT_TIME), + BIT(IIO_CHAN_INFO_INT_TIME) | + BIT(IIO_CHAN_INFO_CALIBSCALE) | + BIT(IIO_CHAN_INFO_CALIBBIAS), }, { .type = IIO_INTENSITY, .indexed = 1, .channel = 0, - .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | - BIT(IIO_CHAN_INFO_CALIBSCALE) | - BIT(IIO_CHAN_INFO_CALIBBIAS), + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .event_spec = tsl2x7x_events, .num_event_specs = ARRAY_SIZE(tsl2x7x_events), }, { @@ -1580,14 +1580,14 @@ static const struct tsl2x7x_chip_info tsl2x7x_chip_info_tbl[] = { .indexed = 1, .channel = 0, .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED) | - BIT(IIO_CHAN_INFO_INT_TIME), + BIT(IIO_CHAN_INFO_INT_TIME) | + BIT(IIO_CHAN_INFO_CALIBSCALE) | + BIT(IIO_CHAN_INFO_CALIBBIAS), }, { .type = IIO_INTENSITY, .indexed = 1, .channel = 0, - .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | - BIT(IIO_CHAN_INFO_CALIBSCALE) | - BIT(IIO_CHAN_INFO_CALIBBIAS), + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .event_spec = tsl2x7x_events, .num_event_specs = ARRAY_SIZE(tsl2x7x_events), }, {