From patchwork Sat Mar 24 20:05:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Masney X-Patchwork-Id: 10306357 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 098FB60385 for ; Sat, 24 Mar 2018 20:07:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEE4229272 for ; Sat, 24 Mar 2018 20:07:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E32D0292DB; Sat, 24 Mar 2018 20:07:02 +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=ham 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 8BEA929272 for ; Sat, 24 Mar 2018 20:07:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753553AbeCXUGI (ORCPT ); Sat, 24 Mar 2018 16:06:08 -0400 Received: from onstation.org ([52.200.56.107]:53014 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753289AbeCXUGH (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 6DBB55AE; 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=bASAvNoGc/7fa/yR/I12/Op51X4ZWZpSxM66Qjgp4pQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D9kvvlFceth7Y3AZaCKS80pjx5/w5wyaVh/WAzd8aWmrFcYuSkZZqnvfJTI4vK3nX 1VN10dg9aKOoKLz/1BZoWnDdL43O505C0+qUnekoqS8cv3D+wofSP3DuNV/BYJcyRu ShjNbCL9IghfqZeGBLr1/co5Gxd0qtYH+L6IFZk0= 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 3/4] staging: iio: tsl2x7x: use either direction for IIO_EV_INFO_{ENABLE, PERIOD} Date: Sat, 24 Mar 2018 16:05:54 -0400 Message-Id: <20180324200555.1403-4-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 events IIO_EV_INFO_VALUE and IIO_EV_INFO_ENABLE currently have a falling and rising direction configured. There does not need to be a separate distinction so this patch changes these to use the either direction. Directory listing of event sysfs attributes for a TSL2772 with this patch applied: in_intensity0_thresh_either_en in_intensity0_thresh_either_period in_intensity0_thresh_falling_value in_intensity0_thresh_rising_value in_proximity0_thresh_either_en in_proximity0_thresh_either_period in_proximity0_thresh_falling_value in_proximity0_thresh_rising_value Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c index d5a237fb0a0b..940bea2378a9 100644 --- a/drivers/staging/iio/light/tsl2x7x.c +++ b/drivers/staging/iio/light/tsl2x7x.c @@ -1469,17 +1469,16 @@ static const struct iio_event_spec tsl2x7x_events[] = { { .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, .dir = IIO_EV_DIR_EITHER, - .mask_separate = BIT(IIO_EV_INFO_PERIOD), + .mask_separate = BIT(IIO_EV_INFO_PERIOD) | + BIT(IIO_EV_INFO_ENABLE), }, };