linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.ml.walleij@gmail.com>
To: arjun rath <rath.arjun@gmail.com>
Cc: spi-devel-general@lists.sourceforge.net,
	linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: [spi-devel-general] SPI-ADC
Date: Sat, 13 Feb 2010 14:48:22 +0100	[thread overview]
Message-ID: <63386a3d1002130548y7c839072y85097a9bcdf66cad@mail.gmail.com> (raw)
In-Reply-To: <dc6d3181002122148v6451ebffka164de288738485d@mail.gmail.com>

2010/2/13 arjun rath <rath.arjun@gmail.com>:

> can anybody share how to start a spi based ADC linux driver.I am having a
> MAXIM 1242 ADC chip.

The ḱernel does not contain any generic ADC subsystem abstraction (I
think it would be good if it did), instead most drivers using ADC have
their ADC portions stored inside a driver for something else, e.g.
drivers/hwmon for ADCs used in temperature monitoring, or
drivers/power for ADCs used in monitoring of currents and voltages
for power supplies/batteries.

This is a bit bad for driving a generic ADC like this using spidev and,
even if it was to be accessed from userspace only, having it under
drivers/spi is rather counterintuitive, what happens when the next ADC
using I2C turns up? drivers/i2c/chips?

I would suggest creating subsystem drivers/adc if you have time and
energy, other ideas?

Linus Walleij

  parent reply	other threads:[~2010-02-13 13:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-13  5:48 SPI-ADC arjun rath
     [not found] ` <dc6d3181002122148v6451ebffka164de288738485d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-02-13  6:38   ` SPI-ADC Ben Gamari
2010-02-13 13:48 ` Linus Walleij [this message]
2010-02-13 16:51   ` [spi-devel-general] SPI-ADC Jonathan Cameron
2010-02-13 17:03     ` Mike Frysinger
2010-02-13 21:20     ` Linus Walleij
     [not found]       ` <63386a3d1002131320u5afbc35ak2bc3533aab3f1e54-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-02-15  4:29         ` SPI-ADC arjun rath
     [not found]           ` <dc6d3181002142029j13a9e57la45aa90a269404fa-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-02-15  8:49             ` SPI-ADC jassi brar
2010-02-15 17:33             ` SPI-ADC Ben Gamari

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=63386a3d1002130548y7c839072y85097a9bcdf66cad@mail.gmail.com \
    --to=linus.ml.walleij@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rath.arjun@gmail.com \
    --cc=spi-devel-general@lists.sourceforge.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;
as well as URLs for NNTP newsgroup(s).