devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Andrew F. Davis" <afd-l0cyMroinI0@public.gmane.org>
To: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Hartmut Knaack <knaack.h-Mmb7MZpHnFY@public.gmane.org>,
	Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>,
	Peter Meerwald <pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 0/2] iio: Heart Rate Monitors
Date: Mon, 2 Nov 2015 10:31:50 -0600	[thread overview]
Message-ID: <56378FF6.7000703@ti.com> (raw)
In-Reply-To: <56365B8A.3030908-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

On 11/01/2015 12:35 PM, Jonathan Cameron wrote:
> 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.

Seems that way, it probably would work to have modified be more that a single
bit flag, maybe call it modifier and just store the modifier in there. Doesn't
look like it would be that hard right now to fix.

I'm not really sure I understand the need for modifiers at all really, seems
most are used by a single driver to get around just naming the channel.

>> 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
>>
>

  parent reply	other threads:[~2015-11-02 16:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-31 16:31 [PATCH 0/2] iio: Heart Rate Monitors Andrew F. Davis
2015-10-31 16:31 ` [PATCH 1/2] Documentation: afe4404: Add DT bindings for the AFE4404 heart monitor Andrew F. Davis
     [not found]   ` <1446309089-21094-2-git-send-email-afd-l0cyMroinI0@public.gmane.org>
2015-10-31 18:44     ` Rob Herring
2015-11-02 16:08       ` Andrew F. Davis
2015-10-31 16:31 ` [PATCH 2/2] iio: health: Add driver for the TI " Andrew F. Davis
     [not found]   ` <1446309089-21094-3-git-send-email-afd-l0cyMroinI0@public.gmane.org>
2015-11-01 20:52     ` Jonathan Cameron
2015-11-02 20:37       ` Andrew F. Davis
2015-11-04 19:40         ` Jonathan Cameron
     [not found]           ` <563A5F1E.70904-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-11-04 21:17             ` Andrew F. Davis
     [not found]               ` <563A75E7.3040602-l0cyMroinI0@public.gmane.org>
2015-11-05 19:09                 ` Jonathan Cameron
     [not found]                   ` <563BA952.107-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-11-10 19:19                     ` Andrew F. Davis
     [not found]                       ` <5642434C.3020609-l0cyMroinI0@public.gmane.org>
2015-11-15 12:07                         ` Jonathan Cameron
     [not found]                           ` <56487595.5010402-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-11-17 17:07                             ` Andrew F. Davis
     [not found]                               ` <564B5EE8.1040604-l0cyMroinI0@public.gmane.org>
2015-11-23 20:53                                 ` Andrew F. Davis
     [not found] ` <1446309089-21094-1-git-send-email-afd-l0cyMroinI0@public.gmane.org>
2015-11-01 18:35   ` [PATCH 0/2] iio: Heart Rate Monitors Jonathan Cameron
     [not found]     ` <56365B8A.3030908-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-11-02 16:31       ` Andrew F. Davis [this message]
     [not found]         ` <56378FF6.7000703-l0cyMroinI0@public.gmane.org>
2015-11-04 18:57           ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56378FF6.7000703@ti.com \
    --to=afd-l0cymroini0@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=knaack.h-Mmb7MZpHnFY@public.gmane.org \
    --cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).