mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Anand Ashok Dumbre <ANANDASH@xilinx.com>,
	Jonathan Cameron <jic23@kernel.org>,
	"knaack.h@gmx.de" <knaack.h@gmx.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Michal Simek <michals@xilinx.com>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Adding custom functional callbacks to IIO driver
Date: Fri, 12 Feb 2021 12:35:35 +0100	[thread overview]
Message-ID: <b8cc5128-da41-2620-c44b-c7af28cf6980@metafoo.de> (raw)
In-Reply-To: <BY5PR02MB69164C83B7BA664AF350D712A98B9@BY5PR02MB6916.namprd02.prod.outlook.com>

On 2/12/21 12:07 PM, Anand Ashok Dumbre wrote:
> Hello,
>
> I have an IIO adc driver that measures temperatures and voltages on the SOC.
> There are other kernel modules interested in the temperature and voltage event information.
>
> Would using a custom callback registration mechanism be advisable?
> Is there something similar done already in IIO that can be leveraged?

Hi,

Have a look at the IIO consumer API that allows other kernel modules to 
subscribe to the output of an IIO device. 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/iio/consumer.h 


- Lars


       reply	other threads:[~2021-02-12 11:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <BY5PR02MB69164C83B7BA664AF350D712A98B9@BY5PR02MB6916.namprd02.prod.outlook.com>
2021-02-12 11:35 ` Lars-Peter Clausen [this message]
2021-02-12 11:39   ` Anand Ashok Dumbre

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=b8cc5128-da41-2620-c44b-c7af28cf6980@metafoo.de \
    --to=lars@metafoo.de \
    --cc=ANANDASH@xilinx.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michals@xilinx.com \
    --cc=pmeerw@pmeerw.net \
    /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®