linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Writing I2C Sensor Kernel Modules
@ 2013-06-27 14:33 Robin Müller-Bady
       [not found] ` <CACRdhnDOKdfFSPKmBZ=BoEfp4Tk3dur539b+eHw_bxm23H0rsQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Robin Müller-Bady @ 2013-06-27 14:33 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA

Hi,

I have a (architectural design) question about I2C drivers in kernel space.
Currently, I'm writing userspace software for using external sensors
on an raspberry pi via bcm2835's I2C bus with the help of
wiringPi/ioctl, e.g. the barometric pressure with the MPL115A2 sensor.

I now had the idea to write the software directly in kernel space,
providing a device, e.g. /dev/mpl115a2, for polling the sensor data.
Does this idea fit into the architectural design of the I2C subsystem
/ the sensors ? Or should code for handling I2C clients stay in
userspace?
Is there any good documentation for writing such drivers except the
kernel Documentation? I found some information in the kernel wiki
which is unfortunately not that detailed.

Regards,

Robin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Writing I2C Sensor Kernel Modules
       [not found] ` <CACRdhnDOKdfFSPKmBZ=BoEfp4Tk3dur539b+eHw_bxm23H0rsQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-06-27 14:41   ` Peter Meerwald
  2013-06-27 14:56   ` Sylwester Nawrocki
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Meerwald @ 2013-06-27 14:41 UTC (permalink / raw)
  To: Robin Müller-Bady; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA

Hello Robin,

> wiringPi/ioctl, e.g. the barometric pressure with the MPL115A2 sensor.
> I now had the idea to write the software directly in kernel space,
> providing a device, e.g. /dev/mpl115a2, for polling the sensor data.
> Does this idea fit into the architectural design of the I2C subsystem
> / the sensors ? Or should code for handling I2C clients stay in

have a look at the IIO subsystem which provides an interface for various 
sensors (adc, light, accelerometer) attached via spi or i2c; pressure was 
very recently added

regards, p.

-- 

Peter Meerwald
+43-664-2444418 (mobile)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Writing I2C Sensor Kernel Modules
       [not found] ` <CACRdhnDOKdfFSPKmBZ=BoEfp4Tk3dur539b+eHw_bxm23H0rsQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2013-06-27 14:41   ` Peter Meerwald
@ 2013-06-27 14:56   ` Sylwester Nawrocki
       [not found]     ` <51CC52BB.5000302-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  1 sibling, 1 reply; 4+ messages in thread
From: Sylwester Nawrocki @ 2013-06-27 14:56 UTC (permalink / raw)
  To: Robin Müller-Bady; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA

Hi,

On 06/27/2013 04:33 PM, Robin Müller-Bady wrote:
> I have a (architectural design) question about I2C drivers in kernel space.
> Currently, I'm writing userspace software for using external sensors
> on an raspberry pi via bcm2835's I2C bus with the help of
> wiringPi/ioctl, e.g. the barometric pressure with the MPL115A2 sensor.

AFAIK the IIO framework should be use nowadays sensors like this one.
Unfortunately I'm not aware of any detailed documentation of this
subsystem. This presentation [1] might be helpful.

I think you could get some help asking on linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
mailing list.

> I now had the idea to write the software directly in kernel space,
> providing a device, e.g. /dev/mpl115a2, for polling the sensor data.
> Does this idea fit into the architectural design of the I2C subsystem
> / the sensors ? Or should code for handling I2C clients stay in
> userspace?
> Is there any good documentation for writing such drivers except the
> kernel Documentation? I found some information in the kernel wiki
> which is unfortunately not that detailed.

[1] http://tinyurl.com/o6yxwrm

Regards,
Sylwester

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Writing I2C Sensor Kernel Modules
       [not found]     ` <51CC52BB.5000302-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2013-06-27 18:12       ` Robin Müller-Bady
  0 siblings, 0 replies; 4+ messages in thread
From: Robin Müller-Bady @ 2013-06-27 18:12 UTC (permalink / raw)
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Hi,

this iio subsystem is a good hint.
Thank you both very much!

Regards,
Robin

Am 27.06.2013 16:57 schrieb "Sylwester Nawrocki" <s.nawrocki-Sze3O3UU22KIwRZHo2/mJg@public.gmane.orgm>:
>
> Hi,
>
> On 06/27/2013 04:33 PM, Robin Müller-Bady wrote:
> > I have a (architectural design) question about I2C drivers in kernel space.
> > Currently, I'm writing userspace software for using external sensors
> > on an raspberry pi via bcm2835's I2C bus with the help of
> > wiringPi/ioctl, e.g. the barometric pressure with the MPL115A2 sensor.
>
> AFAIK the IIO framework should be use nowadays sensors like this one.
> Unfortunately I'm not aware of any detailed documentation of this
> subsystem. This presentation [1] might be helpful.
>
> I think you could get some help asking on linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> mailing list.
>
> > I now had the idea to write the software directly in kernel space,
> > providing a device, e.g. /dev/mpl115a2, for polling the sensor data.
> > Does this idea fit into the architectural design of the I2C subsystem
> > / the sensors ? Or should code for handling I2C clients stay in
> > userspace?
> > Is there any good documentation for writing such drivers except the
> > kernel Documentation? I found some information in the kernel wiki
> > which is unfortunately not that detailed.
>
> [1] http://tinyurl.com/o6yxwrm
>
> Regards,
> Sylwester
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-27 18:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-27 14:33 Writing I2C Sensor Kernel Modules Robin Müller-Bady
     [not found] ` <CACRdhnDOKdfFSPKmBZ=BoEfp4Tk3dur539b+eHw_bxm23H0rsQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-27 14:41   ` Peter Meerwald
2013-06-27 14:56   ` Sylwester Nawrocki
     [not found]     ` <51CC52BB.5000302-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-06-27 18:12       ` Robin Müller-Bady

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