iio: dac: ti-dac5571: Add DAC081C081 support
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 25 Mar 2024 20:32:42 +0000 (22:32 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 28 Mar 2024 13:22:15 +0000 (13:22 +0000)
The DAC081C081 is a TI DAC whose software interface is compatible with
the DAC5571. It is the 8-bit version of the DAC121C081, already
supported by the DAC5571 driver. Extends the driver to support this
chip.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sean Nyekjaer <sean@geanix.com <mailto:sean@geanix.com>>
Link: https://lore.kernel.org/r/20240325203245.31660-3-laurent.pinchart@ideasonboard.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/dac/ti-dac5571.c

index efb1269a77c1e5f7029a5aa8757ce21d892fe583..c5162b72951af6c4d0a56a93cf3f3d65ead8aa12 100644 (file)
@@ -13,6 +13,7 @@
  * https://www.ti.com/lit/ds/symlink/dac5573.pdf
  * https://www.ti.com/lit/ds/symlink/dac6573.pdf
  * https://www.ti.com/lit/ds/symlink/dac7573.pdf
+ * https://www.ti.com/lit/ds/symlink/dac081c081.pdf
  * https://www.ti.com/lit/ds/symlink/dac121c081.pdf
  */
 
@@ -386,6 +387,7 @@ static void dac5571_remove(struct i2c_client *i2c)
 }
 
 static const struct of_device_id dac5571_of_id[] = {
+       {.compatible = "ti,dac081c081", .data = &dac5571_spec[single_8bit] },
        {.compatible = "ti,dac121c081", .data = &dac5571_spec[single_12bit] },
        {.compatible = "ti,dac5571", .data = &dac5571_spec[single_8bit] },
        {.compatible = "ti,dac6571", .data = &dac5571_spec[single_10bit] },
@@ -401,6 +403,7 @@ static const struct of_device_id dac5571_of_id[] = {
 MODULE_DEVICE_TABLE(of, dac5571_of_id);
 
 static const struct i2c_device_id dac5571_id[] = {
+       {"dac081c081", (kernel_ulong_t)&dac5571_spec[single_8bit] },
        {"dac121c081", (kernel_ulong_t)&dac5571_spec[single_12bit] },
        {"dac5571", (kernel_ulong_t)&dac5571_spec[single_8bit] },
        {"dac6571", (kernel_ulong_t)&dac5571_spec[single_10bit] },