From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752762AbbKASgB (ORCPT ); Sun, 1 Nov 2015 13:36:01 -0500 Received: from saturn.retrosnub.co.uk ([178.18.118.26]:47475 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752106AbbKASf6 (ORCPT ); Sun, 1 Nov 2015 13:35:58 -0500 Subject: Re: [PATCH 0/2] iio: Heart Rate Monitors To: "Andrew F. Davis" , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald References: <1446309089-21094-1-git-send-email-afd@ti.com> Cc: devicetree@vger.kernel.org, linux-iio@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org From: Jonathan Cameron Message-ID: <56365B8A.3030908@kernel.org> Date: Sun, 1 Nov 2015 18:35:54 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <1446309089-21094-1-git-send-email-afd@ti.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/10/15 16:31, Andrew F. Davis wrote: > Hello all, > > This series adds the TI AFE4404 "Ultra-small, Integrated AFE for > Wearable, Optical Heart Rate Monitoring and Bio-Sensing". > > This work is based on previous work by Dan Murphy [0] who is working > on other tasks at the moment, so I will be helping to continue > upstreaming this driver. This is more of a re-write than a continuation > and there are many changes so I am submitting this as a v1. > > This device is very similar to the AFE4403 and I was originally planning > on pushing the two drivers together with common core functions in a > third file. The AFE4403 driver is still being tested so I merged common > code back into this driver, this is why this driver may seem a bit > unnecessarily modular. I will probably split this stuff back out when > I push the AFE4403. > > I also had some issues with sysfs naming for the channels; this device > has three input channels from three LED stages and two ambient > channels based on the LED stages. This might have been be a good place > for using IIO modifiers[1], but we also have two differential channels > based on the ambient channels, and channels cannot have both modifiers > and be differential (the modifier is stored in the differential channel's > ID field?). True enough. Didn't expect to run into this particular problem, but I guess someone will always make hardware breaking any assumptions we make from the software side of things. So I used sysfs names that would be close to what they > would be if IIO supported these things. Fair enough as a starting point though we probably want to figure out how to do this 'right'. Adding an extra field to the channel descriptor will be easy enough - it'll be event codes that are nasty to handle. Jonathan > > [0] http://www.spinics.net/lists/linux-iio/msg18413.html > [1] IIO_MOD_TEMP_AMBIENT could be renamed IIO_MOD_AMBIENT as it can > also apply to LIGHT, PRESSURE, HUMIDITY, etc.. No problem with this change so please send a patch. > > Thanks, > Andrew > > Andrew F. Davis (2): > Documentation: afe4404: Add DT bindings for the AFE4404 heart monitor > iio: health: Add driver for the TI AFE4404 heart monitor > > .../ABI/testing/sysfs-bus-iio-health-afe4404 | 70 +++ > .../devicetree/bindings/iio/health/afe4404.txt | 27 ++ > drivers/iio/Kconfig | 1 + > drivers/iio/Makefile | 1 + > drivers/iio/health/Kconfig | 24 + > drivers/iio/health/Makefile | 6 + > drivers/iio/health/afe4404.c | 526 +++++++++++++++++++++ > drivers/iio/health/afe440x.h | 159 +++++++ > 8 files changed, 814 insertions(+) > create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-health-afe4404 > create mode 100644 Documentation/devicetree/bindings/iio/health/afe4404.txt > create mode 100644 drivers/iio/health/Kconfig > create mode 100644 drivers/iio/health/Makefile > create mode 100644 drivers/iio/health/afe4404.c > create mode 100644 drivers/iio/health/afe440x.h >