mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Patrik Dahlström" <risca@dalakolonin.se>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	letux-kernel@openphoenux.org, kernel@pyra-handheld.com,
	pgoudagunta@nvidia.com, hns@goldelico.com, lars@metafoo.de,
	linux-omap@vger.kernel.org
Subject: Re: [PATCH v4 0/9] iio: adc: palmas_gpadc: add iio events
Date: Wed, 12 Apr 2023 21:22:13 +0100	[thread overview]
Message-ID: <20230412212213.614c9683@jic23-huawei> (raw)
In-Reply-To: <20230408114825.824505-1-risca@dalakolonin.se>

On Sat,  8 Apr 2023 13:48:16 +0200
Patrik Dahlström <risca@dalakolonin.se> wrote:

Hi Patrik,

Patches 3-9 applied from this posting to the togreg branch of iio.git
which will initially be pushed out as testing so 0-day can poke at it
tomorrow.

Thanks,

Jonathan


> This series is based on iio/togreg [1] and includes one patch ("fix NULL
> dereference on rmmod") which is already in linux-next and another patch
> from Jonathan Cameron ("Take probe fully device managed") to make the
> rest of the patches apply cleanly to iio/togreg.
> 
> The palmas gpadc block has support for monitoring up to 2 ADC channels
> and issue an interrupt if they reach past a set threshold. This can be
> configured statically with device tree today, but it only gets enabled
> when reaching sleep mode. Also, it doesn't look like anyone is using it.
> 
> Instead of this one special case, change the code so userspace can
> configure the ADC channels to their own needs through the iio events
> subsystem. The high and low threshold values can be set for every
> channel, but only 2 thresholds can be enabled at a time. Trying to
> enable more than 2 thresholds will result in an error.
> 
> The configured thresholds will wake up the system from sleep mode if
> wakeup is enabled in /sys/devices/.../power/wakeup.
> 
> The old platform data was removed.
> 
> Thresholds, events, and wakeup were tested on omap5-uevm board. It wakes
> up from sleep mode when wakeup is enabled and a threshold is passed. A
> userspace tool for monitoring events and adjusting thresholds can be
> found at [2].
> 
> For more background and the use case for these patches, see [3].
> 
> V3 -> V4:
> * Reabased to iio/togreg and included required patches.
> * Avoid initializing variables unnecessarily.
> * Minor cosmetic fixes to comments.
> V2 -> V3:
> * Rebased to linux-next.
> * Avoid reconfiguring events on error and when old == new value.
> V1 -> V2:
> * Begin by removing adc_wakeupX_data instead of doing it last.
> * Split changes in smaller patches
> 
> [1] git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
> [2] https://github.com/Risca/pyra_vol_mon
> [3] https://pyra-handheld.com/boards/threads/improve-volume-wheel-daemon-bounty.99430/post-1711410
> 
> Jonathan Cameron (1):
>   iio: adc: palmas: Take probe fully device managed.
> 
> Patrik Dahlström (8):
>   iio: adc: palmas_gpadc: fix NULL dereference on rmmod
>   iio: adc: palmas: remove adc_wakeupX_data
>   iio: adc: palmas: replace "wakeup" with "event"
>   iio: adc: palmas: use iio_event_direction for threshold polarity
>   iio: adc: palmas: move eventX_enable into palmas_adc_event
>   iio: adc: palmas: always reset events on unload
>   iio: adc: palmas: add support for iio threshold events
>   iio: adc: palmas: don't alter event config on suspend/resume
> 
>  drivers/iio/adc/palmas_gpadc.c | 616 +++++++++++++++++++++++++--------
>  include/linux/mfd/palmas.h     |   8 -
>  2 files changed, 478 insertions(+), 146 deletions(-)
> 
> 
> base-commit: f73df43e957a6fc705a9bd6d143585bdf1b13365


      parent reply	other threads:[~2023-04-12 20:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-08 11:48 Patrik Dahlström
2023-04-08 11:48 ` [PATCH v4 1/9] iio: adc: palmas_gpadc: fix NULL dereference on rmmod Patrik Dahlström
2023-04-08 11:48 ` [PATCH v4 2/9] iio: adc: palmas: Take probe fully device managed Patrik Dahlström
2023-04-08 11:48 ` [PATCH v4 3/9] iio: adc: palmas: remove adc_wakeupX_data Patrik Dahlström
2023-04-08 11:48 ` [PATCH v4 4/9] iio: adc: palmas: replace "wakeup" with "event" Patrik Dahlström
2023-04-08 11:48 ` [PATCH v4 5/9] iio: adc: palmas: use iio_event_direction for threshold polarity Patrik Dahlström
2023-04-08 11:48 ` [PATCH v4 6/9] iio: adc: palmas: move eventX_enable into palmas_adc_event Patrik Dahlström
2023-04-08 11:48 ` [PATCH v4 7/9] iio: adc: palmas: always reset events on unload Patrik Dahlström
2023-04-08 11:48 ` [PATCH v4 8/9] iio: adc: palmas: add support for iio threshold events Patrik Dahlström
2023-04-13 10:28   ` Jonathan Cameron
2023-04-08 11:48 ` [PATCH v4 9/9] iio: adc: palmas: don't alter event config on suspend/resume Patrik Dahlström
2023-04-12 20:22 ` Jonathan Cameron [this message]

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=20230412212213.614c9683@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=hns@goldelico.com \
    --cc=kernel@pyra-handheld.com \
    --cc=lars@metafoo.de \
    --cc=letux-kernel@openphoenux.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=pgoudagunta@nvidia.com \
    --cc=risca@dalakolonin.se \
    /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

all inboxes | Powered by JetHome®