Re: [spi-devel-general] SPI-ADC

From: Linus Walleij
Date: Sat Feb 13 2010 - 08:54:55 EST


2010/2/13 arjun rath <rath.arjun@xxxxxxxxx>:

> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/