Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753145AbdHWAaB (ORCPT ); Tue, 22 Aug 2017 20:30:01 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:32869 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752879AbdHWA37 (ORCPT ); Tue, 22 Aug 2017 20:29:59 -0400 Subject: Re: [PATCH v4] iio: accel: mma8452: improvements to handle multiple events To: Martin Kepplinger Cc: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, amsfield22@gmail.com, linux-iio-owner@vger.kernel.org References: <1503245215-12150-1-git-send-email-harinath922@gmail.com> From: Harinath Nampally Message-ID: <99ef70c3-64f0-66eb-5c1a-45a034ead5d5@gmail.com> Date: Tue, 22 Aug 2017 20:29:52 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1224 Lines: 40 > > If rising: use transient OR ff_mt device-dependent like before. But > now save it in a simple flag, > whether transient registers are available. Ok, is it good idea to add the flag to struct mma_chip_info like below? * @mma_scales: scale factors for converting register values * to m/s^2; 3 modes: 2g, 4g, 8g; 2 integers * per mode: m/s^2 and micro m/s^2 + * @transient_supported: flag indicating whether chip support transient + * event, as not all chips support transient event */ struct mma_chip_info { u8 chip_id; const struct iio_chan_spec *channels; int num_channels; const int mma_scales[3][2]; + bool transient_supported; }; > > If falling: switch to ff_mt in any case. (fixing freefall for the > transient-devices) ok sure. Thanks, Hari On 08/21/2017 04:47 AM, Martin Kepplinger wrote: > > If rising: use transient OR ff_mt device-dependent like before. But > now save it in a simple flag, > whether transient registers are available. > > If falling: switch to ff_mt in any case. (fixing freefall for the > transient-devices)