Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49b3f874 authored by Lukas Wunner's avatar Lukas Wunner Committed by Jonathan Cameron
Browse files

drivers: misc: ti_dac7512: Remove duplicate driver

The Texas Instruments DAC7512 has the exact same pinout, programming
interface and power-down modes as the Texas Instruments DAC121S101 and
Analog Devices AD5320, which are already supported by the IIO driver
ad5446.c.  Remove the duplicate misc driver.

This requires user space to migrate to the standardized IIO sysfs ABI.
(In other words, it needs to change a filename.)

The IIO driver supports the chip's features more fully, e.g. the ability
to power down the output or choose one of the available powerdown modes.

There is an oddity with the misc driver in that it initializes the SPI
slave to SPI_MODE_0, in contradiction to the datasheet which specifies
that data is latched in on the falling edge, implying that SPI_MODE_1
or SPI_MODE_2 must be used.  Another oddity is that Kconfig and the
MODULE_DESCRIPTION() claim the chip has 16-bit resolution although it
actually has 12-bit.

Datasheets:
http://www.ti.com/lit/ds/symlink/dac7512.pdf
http://www.ti.com/lit/ds/symlink/dac121s101.pdf
http://www.analog.com/media/en/technical-documentation/data-sheets/AD5320.pdf



Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
Acked-by: default avatarDaniel Mack <daniel@zonque.org>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 9cad3b98
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -219,7 +219,8 @@ CONFIG_AD525X_DPOT_I2C=m
CONFIG_ICS932S401=m
CONFIG_ICS932S401=m
CONFIG_APDS9802ALS=m
CONFIG_APDS9802ALS=m
CONFIG_ISL29003=m
CONFIG_ISL29003=m
CONFIG_TI_DAC7512=m
CONFIG_IIO=m
CONFIG_AD5446=m
CONFIG_EEPROM_AT24=m
CONFIG_EEPROM_AT24=m
CONFIG_SENSORS_LIS3_SPI=m
CONFIG_SENSORS_LIS3_SPI=m
CONFIG_IDE=m
CONFIG_IDE=m
+2 −1
Original line number Original line Diff line number Diff line
@@ -37,7 +37,8 @@ CONFIG_MTD_NAND_PXA3xx=y
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_ISL29003=y
CONFIG_ISL29003=y
CONFIG_TI_DAC7512=y
CONFIG_IIO=y
CONFIG_AD5446=y
CONFIG_SCSI=y
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_SG=y
CONFIG_CHR_DEV_SG=y
+10 −0
Original line number Original line Diff line number Diff line
@@ -463,10 +463,19 @@ static const struct spi_device_id ad5446_spi_ids[] = {
	{"dac081s101", ID_AD5300}, /* compatible Texas Instruments chips */
	{"dac081s101", ID_AD5300}, /* compatible Texas Instruments chips */
	{"dac101s101", ID_AD5310},
	{"dac101s101", ID_AD5310},
	{"dac121s101", ID_AD5320},
	{"dac121s101", ID_AD5320},
	{"dac7512", ID_AD5320},
	{}
	{}
};
};
MODULE_DEVICE_TABLE(spi, ad5446_spi_ids);
MODULE_DEVICE_TABLE(spi, ad5446_spi_ids);


#ifdef CONFIG_OF
static const struct of_device_id ad5446_of_ids[] = {
	{ .compatible = "ti,dac7512" },
	{ }
};
MODULE_DEVICE_TABLE(of, ad5446_of_ids);
#endif

static int ad5446_spi_probe(struct spi_device *spi)
static int ad5446_spi_probe(struct spi_device *spi)
{
{
	const struct spi_device_id *id = spi_get_device_id(spi);
	const struct spi_device_id *id = spi_get_device_id(spi);
@@ -483,6 +492,7 @@ static int ad5446_spi_remove(struct spi_device *spi)
static struct spi_driver ad5446_spi_driver = {
static struct spi_driver ad5446_spi_driver = {
	.driver = {
	.driver = {
		.name	= "ad5446",
		.name	= "ad5446",
		.of_match_table = of_match_ptr(ad5446_of_ids),
	},
	},
	.probe		= ad5446_spi_probe,
	.probe		= ad5446_spi_probe,
	.remove		= ad5446_spi_remove,
	.remove		= ad5446_spi_remove,
+0 −10
Original line number Original line Diff line number Diff line
@@ -393,16 +393,6 @@ config SPEAR13XX_PCIE_GADGET
	 entry will be created for that controller. User can use these
	 entry will be created for that controller. User can use these
	 sysfs node to configure PCIe EP as per his requirements.
	 sysfs node to configure PCIe EP as per his requirements.


config TI_DAC7512
	tristate "Texas Instruments DAC7512"
	depends on SPI && SYSFS
	help
	  If you say yes here you get support for the Texas Instruments
	  DAC7512 16-bit digital-to-analog converter.

	  This driver can also be built as a module. If so, the module
	  will be called ti_dac7512.

config VMWARE_BALLOON
config VMWARE_BALLOON
	tristate "VMware Balloon Driver"
	tristate "VMware Balloon Driver"
	depends on VMWARE_VMCI && X86 && HYPERVISOR_GUEST
	depends on VMWARE_VMCI && X86 && HYPERVISOR_GUEST
+0 −1
Original line number Original line Diff line number Diff line
@@ -30,7 +30,6 @@ obj-$(CONFIG_ISL29003) += isl29003.o
obj-$(CONFIG_ISL29020)		+= isl29020.o
obj-$(CONFIG_ISL29020)		+= isl29020.o
obj-$(CONFIG_SENSORS_TSL2550)	+= tsl2550.o
obj-$(CONFIG_SENSORS_TSL2550)	+= tsl2550.o
obj-$(CONFIG_DS1682)		+= ds1682.o
obj-$(CONFIG_DS1682)		+= ds1682.o
obj-$(CONFIG_TI_DAC7512)	+= ti_dac7512.o
obj-$(CONFIG_C2PORT)		+= c2port/
obj-$(CONFIG_C2PORT)		+= c2port/
obj-$(CONFIG_HMC6352)		+= hmc6352.o
obj-$(CONFIG_HMC6352)		+= hmc6352.o
obj-y				+= eeprom/
obj-y				+= eeprom/
Loading