[{"id":1765952,"web_url":"http://patchwork.ozlabs.org/comment/1765952/","msgid":"<20170910161108.2ecc34d3@archlinux>","list_archive_url":null,"date":"2017-09-10T15:11:08","subject":"Re: [PATCH 2/2] iio: dac: Add Texas Instruments 8/10/12-bit\n\t2/4-channel DAC driver","submitter":{"id":10151,"url":"http://patchwork.ozlabs.org/api/people/10151/","name":"Jonathan Cameron","email":"jic23@kernel.org"},"content":"On Tue, 5 Sep 2017 11:27:00 +0200\nLukas Wunner <lukas@wunner.de> wrote:\n\n> The DACrrcS085 (rr = 08/10/12, c = 2/4) family of SPI DACs was\n> inherited by TI when they acquired National Semiconductor in 2011.\n> This driver was developed for and tested with the DAC082S085 built into\n> the Revolution Pi by KUNBUS, but should work with any of the other\n> chips as they share the same programming interface.\n> \n> There is also a family of I2C DACs with just a single channel called\n> DACrr1C08x (rr = 08/10/12, x = 1/5).  Their programming interface is\n> very similar and it should be possible to extend the driver for these\n> chips with moderate effort.  Alternatively they could be integrated into\n> ad5446.c.  (The AD5301/AD5311/AD5321 use different power-down modes but\n> otherwise appear to be comparable.)\n> \n> Furthermore there is a family of 8-channel DACs called DACrr8S085\n> (rr = 08/10/12) as well as two 16-bit DACs called DAC161Sxxx\n> (xxx = 055/997).  These are more complicated devices with support for\n> daisy-chaining and the ability to power down each channel separately.\n> They could either be handled by a separate driver or integrated into the\n> present driver with a larger effort.\n> \n> Cc: Mathias Duckeck <m.duckeck@kunbus.de>\n> Signed-off-by: Lukas Wunner <lukas@wunner.de>\n\nVery nice.  A few really minor comments inline.\n\nThanks,\n\nJonathan\n> ---\n>  Documentation/ABI/testing/sysfs-bus-iio |   1 +\n>  drivers/iio/dac/Kconfig                 |  10 +\n>  drivers/iio/dac/Makefile                |   1 +\n>  drivers/iio/dac/ti-dac082s085.c         | 347 ++++++++++++++++++++++++++++++++\n>  4 files changed, 359 insertions(+)\n>  create mode 100644 drivers/iio/dac/ti-dac082s085.c\n> \n> diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio\n> index 7eead5f97e02..407e4d1024ee 100644\n> --- a/Documentation/ABI/testing/sysfs-bus-iio\n> +++ b/Documentation/ABI/testing/sysfs-bus-iio\n> @@ -522,6 +522,7 @@ Description:\n>  \t\tSpecifies the output powerdown mode.\n>  \t\tDAC output stage is disconnected from the amplifier and\n>  \t\t1kohm_to_gnd: connected to ground via an 1kOhm resistor,\n> +\t\t2.5kohm_to_gnd: connected to ground via a 2.5kOhm resistor,\n>  \t\t6kohm_to_gnd: connected to ground via a 6kOhm resistor,\n>  \t\t20kohm_to_gnd: connected to ground via a 20kOhm resistor,\n>  \t\t90kohm_to_gnd: connected to ground via a 90kOhm resistor,\n> diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig\n> index 25bed2d7d2b9..716fcb1610dd 100644\n> --- a/drivers/iio/dac/Kconfig\n> +++ b/drivers/iio/dac/Kconfig\n> @@ -300,6 +300,16 @@ config STM32_DAC\n>  config STM32_DAC_CORE\n>  \ttristate\n>  \n> +config TI_DAC082S085\n> +\ttristate \"Texas Instruments 8/10/12-bit 2/4-channel DAC driver\"\n> +\tdepends on SPI_MASTER\n> +\thelp\n> +\t  Driver for the Texas Instruments (formerly National Semiconductor)\n> +\t  DAC082S085, DAC102S085, DAC122S085, DAC084S085, DAC104S085 and\n> +\t  DAC124S085.\n> +\n> +\t  If compiled as a module, it will be called ti-dac082s085.\n> +\n>  config VF610_DAC\n>  \ttristate \"Vybrid vf610 DAC driver\"\n>  \tdepends on OF\n> diff --git a/drivers/iio/dac/Makefile b/drivers/iio/dac/Makefile\n> index 603587cc2f07..1a2dd507b4d8 100644\n> --- a/drivers/iio/dac/Makefile\n> +++ b/drivers/iio/dac/Makefile\n> @@ -32,4 +32,5 @@ obj-$(CONFIG_MCP4725) += mcp4725.o\n>  obj-$(CONFIG_MCP4922) += mcp4922.o\n>  obj-$(CONFIG_STM32_DAC_CORE) += stm32-dac-core.o\n>  obj-$(CONFIG_STM32_DAC) += stm32-dac.o\n> +obj-$(CONFIG_TI_DAC082S085) += ti-dac082s085.o\n>  obj-$(CONFIG_VF610_DAC) += vf610_dac.o\n> diff --git a/drivers/iio/dac/ti-dac082s085.c b/drivers/iio/dac/ti-dac082s085.c\n> new file mode 100644\n> index 000000000000..22fdce512a09\n> --- /dev/null\n> +++ b/drivers/iio/dac/ti-dac082s085.c\n> @@ -0,0 +1,347 @@\n> +/*\n> + * ti-dac082s085.c - Texas Instruments 8/10/12-bit 2/4-channel DAC driver\n> + *\n> + * Copyright (C) 2017 KUNBUS GmbH\n> + *\n> + * http://www.ti.com/lit/ds/symlink/dac082s085.pdf\n> + * http://www.ti.com/lit/ds/symlink/dac102s085.pdf\n> + * http://www.ti.com/lit/ds/symlink/dac122s085.pdf\n> + * http://www.ti.com/lit/ds/symlink/dac084s085.pdf\n> + * http://www.ti.com/lit/ds/symlink/dac104s085.pdf\n> + * http://www.ti.com/lit/ds/symlink/dac124s085.pdf\n> + *\n> + * This program is free software; you can redistribute it and/or modify\n> + * it under the terms of the GNU General Public License (version 2) as\n> + * published by the Free Software Foundation.\n> + */\n> +\n> +#include <linux/iio/iio.h>\n> +#include <linux/module.h>\n> +#include <linux/regulator/consumer.h>\n> +#include <linux/spi/spi.h>\n> +\n> +/**\n> + * struct ti_dac_chip - TI DAC chip\n> + * @lock: protects write sequences\n> + * @vref: regulator generating Vref\n> + * @mesg: SPI message to perform a write\n> + * @xfer: SPI transfer used by @mesg\n> + * @buf: buffer for @xfer\n> + * @val: cached value of each output\n> + * @powerdown: whether the chip is powered down\n> + * @powerdown_mode: selected by the user\n> + * @resolution: resolution of the chip\n> + */\n> +struct ti_dac_chip {\n> +\tstruct mutex lock;\n> +\tstruct regulator *vref;\n> +\tstruct spi_message mesg;\n> +\tstruct spi_transfer xfer;\n> +\tu8 buf[2] ____cacheline_aligned;\n> +\tu16 val[4];\n> +\tbool powerdown;\n> +\tu8 powerdown_mode;\n> +\tu8 resolution;\n> +};\n> +\n> +#define WRITE_NOT_UPDATE(chan)\t(0x00 | (chan) << 6)\n> +#define WRITE_AND_UPDATE(chan)\t(0x10 | (chan) << 6)\n> +#define WRITE_ALL_UPDATE\t 0x20\n> +#define POWERDOWN(mode) \t(0x30 | ((mode) + 1) << 6)\n> +\n> +static int ti_dac_cmd(struct ti_dac_chip *ti_dac, u8 cmd, u16 val)\n> +{\n> +\tu8 shift = 12 - ti_dac->resolution;\n> +\n> +\tti_dac->buf[0] = cmd | (val >> (8 - shift));\n> +\tti_dac->buf[1] = (val << shift) & 0xff;\n> +\treturn spi_sync(ti_dac->mesg.spi, &ti_dac->mesg);\n> +}\n> +\n> +static const char * const ti_dac_powerdown_modes[] = {\n> +\t\"2.5kohm_to_gnd\", \"100kohm_to_gnd\", \"three_state\",\n> +};\n> +\n> +static int ti_dac_get_powerdown_mode(struct iio_dev *indio_dev,\n> +\t\t\t\t     const struct iio_chan_spec *chan)\n> +{\n> +\tstruct ti_dac_chip *ti_dac = iio_priv(indio_dev);\n> +\n> +\treturn ti_dac->powerdown_mode;\n> +}\n> +\n> +static int ti_dac_set_powerdown_mode(struct iio_dev *indio_dev,\n> +\t\t\t\t     const struct iio_chan_spec *chan,\n> +\t\t\t\t     unsigned int mode)\n> +{\n> +\tstruct ti_dac_chip *ti_dac = iio_priv(indio_dev);\n> +\tint ret;\n> +\n> +\tif (ti_dac->powerdown_mode == mode)\n> +\t\treturn 0;\n> +\n> +\tmutex_lock(&ti_dac->lock);\n> +\tif (ti_dac->powerdown) {\n> +\t\tret = ti_dac_cmd(ti_dac, POWERDOWN(mode), 0);\n> +\t\tif (ret) {\n\nI'd slightly prefer a goto to use the unlock already found below.\n\n> +\t\t\tmutex_unlock(&ti_dac->lock);\n> +\t\t\treturn ret;\n> +\t\t}\n> +\t}\n> +\tti_dac->powerdown_mode = mode;\n> +\tmutex_unlock(&ti_dac->lock);\n\nnitpick time : blank line here\n\n> +\treturn 0;\n> +}\n> +\n> +static const struct iio_enum ti_dac_powerdown_mode = {\n> +\t.items = ti_dac_powerdown_modes,\n> +\t.num_items = ARRAY_SIZE(ti_dac_powerdown_modes),\n> +\t.get = ti_dac_get_powerdown_mode,\n> +\t.set = ti_dac_set_powerdown_mode,\n> +};\n> +\n> +static ssize_t ti_dac_read_powerdown(struct iio_dev *indio_dev,\n> +\t\t\t\t     uintptr_t private,\n> +\t\t\t\t     const struct iio_chan_spec *chan,\n> +\t\t\t\t     char *buf)\n> +{\n> +\tstruct ti_dac_chip *ti_dac = iio_priv(indio_dev);\n> +\n> +\treturn sprintf(buf, \"%d\\n\", ti_dac->powerdown);\n> +}\n> +\n> +static ssize_t ti_dac_write_powerdown(struct iio_dev *indio_dev,\n> +\t\t\t\t      uintptr_t private,\n> +\t\t\t\t      const struct iio_chan_spec *chan,\n> +\t\t\t\t      const char *buf, size_t len)\n> +{\n> +\tstruct ti_dac_chip *ti_dac = iio_priv(indio_dev);\n> +\tbool powerdown;\n> +\tint ret;\n> +\n> +\tret = strtobool(buf, &powerdown);\n> +\tif (ret)\n> +\t\treturn ret;\n> +\n> +\tif (ti_dac->powerdown == powerdown)\n> +\t\treturn len;\n> +\n> +\tmutex_lock(&ti_dac->lock);\n> +\tif (powerdown)\n> +\t\tret = ti_dac_cmd(ti_dac, POWERDOWN(ti_dac->powerdown_mode), 0);\n> +\telse\n> +\t\tret = ti_dac_cmd(ti_dac, WRITE_AND_UPDATE(0), ti_dac->val[0]);\n> +\tif (!ret)\n> +\t\tti_dac->powerdown = powerdown;\n> +\tmutex_unlock(&ti_dac->lock);\n> +\n> +\treturn ret ? ret : len;\n> +}\n> +\n> +static const struct iio_chan_spec_ext_info ti_dac_ext_info[] = {\n> +\t{\n> +\t\t.name\t   = \"powerdown\",\n> +\t\t.read\t   = ti_dac_read_powerdown,\n> +\t\t.write\t   = ti_dac_write_powerdown,\n> +\t\t.shared\t   = IIO_SHARED_BY_TYPE,\n> +\t},\n> +\tIIO_ENUM(\"powerdown_mode\", IIO_SHARED_BY_TYPE, &ti_dac_powerdown_mode),\n> +\tIIO_ENUM_AVAILABLE(\"powerdown_mode\", &ti_dac_powerdown_mode),\n> +\t{ },\n> +};\n> +\n> +#define TI_DAC_CHANNEL(chan) {\t\t\t\t\t\\\n> +\t.type = IIO_VOLTAGE,\t\t\t\t\t\\\n> +\t.channel = (chan),\t\t\t\t\t\\\n> +\t.address = (chan),\t\t\t\t\t\\\n> +\t.indexed = true,\t\t\t\t\t\\\n> +\t.output = true,\t\t\t\t\t\t\\\n> +\t.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),\t\t\\\n> +\t.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),\t\\\n> +\t.ext_info = ti_dac_ext_info,\t\t\t\t\\\n> +}\n> +\n> +static const struct iio_chan_spec ti_dac_channels[] = {\n> +\tTI_DAC_CHANNEL(0),\n> +\tTI_DAC_CHANNEL(1),\n> +\tTI_DAC_CHANNEL(2),\n> +\tTI_DAC_CHANNEL(3),\n> +};\n> +\n> +static int ti_dac_read_raw(struct iio_dev *indio_dev,\n> +\t\t\t   struct iio_chan_spec const *chan,\n> +\t\t\t   int *val, int *val2, long mask)\n> +{\n> +\tstruct ti_dac_chip *ti_dac = iio_priv(indio_dev);\n> +\tint ret;\n> +\n> +\tswitch (mask) {\n> +\tcase IIO_CHAN_INFO_RAW:\n> +\t\t*val = ti_dac->val[chan->channel];\n> +\t\tret = IIO_VAL_INT;\n> +\t\tbreak;\n> +\n> +\tcase IIO_CHAN_INFO_SCALE:\n> +\t\tret = regulator_get_voltage(ti_dac->vref);\n> +\t\tif (ret < 0)\n> +\t\t\treturn ret;\n> +\n> +\t\t*val = ret / 1000;\n> +\t\t*val2 = ti_dac->resolution;\n> +\t\tret = IIO_VAL_FRACTIONAL_LOG2;\n> +\t\tbreak;\n> +\n> +\tdefault:\n> +\t\tret = -EINVAL;\n> +\t}\n> +\n> +\treturn ret;\n> +}\n> +\n> +static int ti_dac_write_raw(struct iio_dev *indio_dev,\n> +\t\t\t    struct iio_chan_spec const *chan,\n> +\t\t\t    int val, int val2, long mask)\n> +{\n> +\tstruct ti_dac_chip *ti_dac = iio_priv(indio_dev);\n> +\tint ret;\n> +\n> +\tswitch (mask) {\n> +\tcase IIO_CHAN_INFO_RAW:\n> +\t\tif (ti_dac->val[chan->channel] == val)\n> +\t\t\treturn 0;\n> +\n> +\t\tif (val >= (1 << ti_dac->resolution) || val < 0)\n> +\t\t\treturn -EINVAL;\n> +\n> +\t\tif (ti_dac->powerdown)\n> +\t\t\treturn -EHOSTDOWN;\n\nHmm. That's a relatively unusual error to find in a driver.\nI'd have gone with -EBUSY to indicate that you can't do it now, but might\nbe able to in future..\n\n> +\n> +\t\tmutex_lock(&ti_dac->lock);\n> +\t\tret = ti_dac_cmd(ti_dac, WRITE_AND_UPDATE(chan->channel), val);\n> +\t\tif (!ret)\n> +\t\t\tti_dac->val[chan->channel] = val;\n> +\t\tmutex_unlock(&ti_dac->lock);\n> +\t\tbreak;\n> +\n> +\tdefault:\n> +\t\tret = -EINVAL;\n> +\t}\n> +\n> +\treturn ret;\n> +}\n> +\n> +static int ti_dac_write_raw_get_fmt(struct iio_dev *indio_dev,\n> +\t\t\t\t    struct iio_chan_spec const *chan, long mask)\n> +{\n> +\treturn IIO_VAL_INT;\n> +}\n> +\n> +static const struct iio_info ti_dac_info = {\n> +\t.read_raw\t   = ti_dac_read_raw,\n> +\t.write_raw\t   = ti_dac_write_raw,\n> +\t.write_raw_get_fmt = ti_dac_write_raw_get_fmt,\n> +};\n> +\n> +static int ti_dac_probe(struct spi_device *spi)\n> +{\n> +\tstruct device *dev = &spi->dev;\n> +\tstruct ti_dac_chip *ti_dac;\n> +\tstruct iio_dev *indio_dev;\n> +\tint ret;\n> +\n> +\tindio_dev = devm_iio_device_alloc(dev, sizeof(*ti_dac));\n> +\tif (!indio_dev)\n> +\t\treturn -ENOMEM;\n> +\n> +\tindio_dev->dev.parent = dev;\n> +\tindio_dev->info = &ti_dac_info;\n> +\tindio_dev->name = spi->modalias;\n> +\tindio_dev->modes = INDIO_DIRECT_MODE;\n> +\tindio_dev->channels = ti_dac_channels;\n> +\tspi_set_drvdata(spi, indio_dev);\n> +\n> +\tti_dac = iio_priv(indio_dev);\n> +\tti_dac->xfer.tx_buf = &ti_dac->buf;\n> +\tti_dac->xfer.len = sizeof(ti_dac->buf);\n> +\tspi_message_init_with_transfers(&ti_dac->mesg, &ti_dac->xfer, 1);\n> +\tti_dac->mesg.spi = spi;\n> +\n> +\tret = sscanf(spi->modalias, \"dac%2hhu%1d\",\n> +\t\t     &ti_dac->resolution, &indio_dev->num_channels);\n> +\tWARN_ON(ret != 2);\n\nWhilst this seems nice and clear now, it may not work if this driver\nhad additional parts added in future. \n\nI would prefer an explicit table with this information in it and\nuse an enum to reference into it.\n\nThis is a bit 'too clever' :)\n\n> +\n> +\tret = ti_dac_cmd(ti_dac, WRITE_ALL_UPDATE, 0);\n> +\tif (ret) {\n> +\t\tdev_err(dev, \"failed to initialize outputs to 0\\n\");\n> +\t\treturn ret;\n> +\t}\n> +\n> +\tti_dac->vref = devm_regulator_get(dev, \"vref\");\n> +\tif (IS_ERR(ti_dac->vref))\n> +\t\treturn PTR_ERR(ti_dac->vref);\n> +\n> +\tret = regulator_enable(ti_dac->vref);\n> +\tif (ret < 0)\n> +\t\treturn ret;\n> +\n> +\tmutex_init(&ti_dac->lock);\n> +\tret = iio_device_register(indio_dev);\n> +\tif (ret) {\n> +\t\tmutex_destroy(&ti_dac->lock);\n> +\t\tregulator_disable(ti_dac->vref);\n> +\t\treturn ret;\n> +\t}\n> +\n> +\treturn 0;\nTrivial: \n\nreturn ret; here and get rid of it in the brackets above.\n\n> +}\n> +\n> +static int ti_dac_remove(struct spi_device *spi)\n> +{\n> +\tstruct iio_dev *indio_dev = spi_get_drvdata(spi);\n> +\tstruct ti_dac_chip *ti_dac = iio_priv(indio_dev);\n> +\n> +\tiio_device_unregister(indio_dev);\n> +\tmutex_destroy(&ti_dac->lock);\n> +\tregulator_disable(ti_dac->vref);\n> +\n> +\treturn 0;\n> +}\n> +\n> +#ifdef CONFIG_OF\n> +static const struct of_device_id ti_dac_of_id[] = {\n> +\t{ .compatible = \"ti,dac082s085\" },\n> +\t{ .compatible = \"ti,dac102s085\" },\n> +\t{ .compatible = \"ti,dac122s085\" },\n> +\t{ .compatible = \"ti,dac084s085\" },\n> +\t{ .compatible = \"ti,dac104s085\" },\n> +\t{ .compatible = \"ti,dac124s085\" },\n> +\t{ }\n> +};\n> +MODULE_DEVICE_TABLE(of, ti_dac_of_id);\n> +#endif\n> +\n> +static const struct spi_device_id ti_dac_spi_id[] = {\n> +\t{ \"dac082s085\" },\n> +\t{ \"dac102s085\" },\n> +\t{ \"dac122s085\" },\n> +\t{ \"dac084s085\" },\n> +\t{ \"dac104s085\" },\n> +\t{ \"dac124s085\" },\n> +\t{ }\n> +};\n> +MODULE_DEVICE_TABLE(spi, ti_dac_spi_id);\n> +\n> +static struct spi_driver ti_dac_driver = {\n> +\t.driver = {\n> +\t\t.name\t\t= \"ti-dac082s085\",\n> +\t\t.of_match_table\t= of_match_ptr(ti_dac_of_id),\n> +\t},\n> +\t.probe\t  = ti_dac_probe,\n> +\t.remove   = ti_dac_remove,\n> +\t.id_table = ti_dac_spi_id,\n> +};\n> +module_spi_driver(ti_dac_driver);\n> +\n> +MODULE_AUTHOR(\"Lukas Wunner <lukas@wunner.de>\");\n> +MODULE_DESCRIPTION(\"Texas Instruments 8/10/12-bit 2/4-channel DAC driver\");\n> +MODULE_LICENSE(\"GPL v2\");\n\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","mail.kernel.org;\n\tdmarc=none (p=none dis=none) header.from=kernel.org","mail.kernel.org;\n\tspf=none smtp.mailfrom=jic23@kernel.org"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xqvdw3JgRz9s7c\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 01:11:16 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1750748AbdIJPLO (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tSun, 10 Sep 2017 11:11:14 -0400","from mail.kernel.org ([198.145.29.99]:52742 \"EHLO mail.kernel.org\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1750709AbdIJPLN (ORCPT <rfc822;devicetree@vger.kernel.org>);\n\tSun, 10 Sep 2017 11:11:13 -0400","from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net\n\t[81.96.234.148])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby mail.kernel.org (Postfix) with ESMTPSA id 632162190D;\n\tSun, 10 Sep 2017 15:11:11 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mail.kernel.org 632162190D","Date":"Sun, 10 Sep 2017 16:11:08 +0100","From":"Jonathan Cameron <jic23@kernel.org>","To":"Lukas Wunner <lukas@wunner.de>","Cc":"Hartmut Knaack <knaack.h@gmx.de>, Lars-Peter Clausen <lars@metafoo.de>, \n\tPeter Meerwald-Stadler <pmeerw@pmeerw.net>,\n\tMathias Duckeck <m.duckeck@kunbus.de>,\n\tPhil Elwell <phil@raspberrypi.org>, \n\t\"Andrew F. Davis\" <afd@ti.com>, linux-iio@vger.kernel.org,\n\tdevicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,\n\tMark Rutland <mark.rutland@arm.com>","Subject":"Re: [PATCH 2/2] iio: dac: Add Texas Instruments 8/10/12-bit\n\t2/4-channel DAC driver","Message-ID":"<20170910161108.2ecc34d3@archlinux>","In-Reply-To":"<5d861035569248ac4ae971638ce7fd1e50947232.1504602350.git.lukas@wunner.de>","References":"<cceeb1a985343d36dc90d2708371f3e1a73264f6.1504602350.git.lukas@wunner.de>\n\t<5d861035569248ac4ae971638ce7fd1e50947232.1504602350.git.lukas@wunner.de>","X-Mailer":"Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu)","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1765953,"web_url":"http://patchwork.ozlabs.org/comment/1765953/","msgid":"<20170910161211.617f241f@archlinux>","list_archive_url":null,"date":"2017-09-10T15:12:11","subject":"Re: [PATCH 1/2] dt-bindings: iio: dac: ti-dac082s085: Document new\n\tdriver","submitter":{"id":10151,"url":"http://patchwork.ozlabs.org/api/people/10151/","name":"Jonathan Cameron","email":"jic23@kernel.org"},"content":"On Tue, 5 Sep 2017 11:27:00 +0200\nLukas Wunner <lukas@wunner.de> wrote:\n\n> Add device tree bindings for Texas Instruments 8/10/12-bit 2/4-channel\n> DAC driver.\n> \n> Cc: Mathias Duckeck <m.duckeck@kunbus.de>\n> Signed-off-by: Lukas Wunner <lukas@wunner.de>\n\nLooks good for me.  Lets see what Mark / Rob think.\n\nThanks,\n\nJonathan\n\n> ---\n>  .../devicetree/bindings/iio/dac/ti-dac082s085.txt  | 34 ++++++++++++++++++++++\n>  1 file changed, 34 insertions(+)\n>  create mode 100644 Documentation/devicetree/bindings/iio/dac/ti-dac082s085.txt\n> \n> diff --git a/Documentation/devicetree/bindings/iio/dac/ti-dac082s085.txt b/Documentation/devicetree/bindings/iio/dac/ti-dac082s085.txt\n> new file mode 100644\n> index 000000000000..9cb0e10df704\n> --- /dev/null\n> +++ b/Documentation/devicetree/bindings/iio/dac/ti-dac082s085.txt\n> @@ -0,0 +1,34 @@\n> +Texas Instruments 8/10/12-bit 2/4-channel DAC driver\n> +\n> +Required properties:\n> + - compatible:\t\tMust be one of:\n> +\t\t\t\"ti,dac082s085\"\n> +\t\t\t\"ti,dac102s085\"\n> +\t\t\t\"ti,dac122s085\"\n> +\t\t\t\"ti,dac084s085\"\n> +\t\t\t\"ti,dac104s085\"\n> +\t\t\t\"ti,dac124s085\"\n> + - reg: \t\tChip select number.\n> + - spi-cpha, spi-cpol:\tSPI mode (0,1) or (1,0) must be used, so specify\n> +\t\t\teither spi-cpha or spi-cpol (but not both).\n> + - vref-supply: \tPhandle to the external reference voltage supply.\n> +\n> +For other required and optional properties of SPI slave nodes please refer to\n> +../../spi/spi-bus.txt.\n> +\n> +Example:\n> +\tvref_2v5_reg: regulator-vref {\n> +\t\tcompatible = \"regulator-fixed\";\n> +\t\tregulator-name = \"2v5\";\n> +\t\tregulator-min-microvolt = <2500000>;\n> +\t\tregulator-max-microvolt = <2500000>;\n> +\t\tregulator-always-on;\n> +\t};\n> +\n> +\tdac@0 {\n> +\t\tcompatible = \"ti,dac082s085\";\n> +\t\treg = <0>;\n> +\t\tspi-max-frequency = <40000000>;\n> +\t\tspi-cpol;\n> +\t\tvref-supply = <&vref_2v5_reg>;\n> +\t};\n\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","mail.kernel.org;\n\tdmarc=none (p=none dis=none) header.from=kernel.org","mail.kernel.org;\n\tspf=none smtp.mailfrom=jic23@kernel.org"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xqvg55tJWz9s7f\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 01:12:17 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1750807AbdIJPMQ (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tSun, 10 Sep 2017 11:12:16 -0400","from mail.kernel.org ([198.145.29.99]:52788 \"EHLO mail.kernel.org\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1750709AbdIJPMQ (ORCPT <rfc822;devicetree@vger.kernel.org>);\n\tSun, 10 Sep 2017 11:12:16 -0400","from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net\n\t[81.96.234.148])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby mail.kernel.org (Postfix) with ESMTPSA id CF19B2190D;\n\tSun, 10 Sep 2017 15:12:13 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mail.kernel.org CF19B2190D","Date":"Sun, 10 Sep 2017 16:12:11 +0100","From":"Jonathan Cameron <jic23@kernel.org>","To":"Lukas Wunner <lukas@wunner.de>","Cc":"Hartmut Knaack <knaack.h@gmx.de>, Lars-Peter Clausen <lars@metafoo.de>, \n\tPeter Meerwald-Stadler <pmeerw@pmeerw.net>,\n\tMathias Duckeck <m.duckeck@kunbus.de>,\n\tPhil Elwell <phil@raspberrypi.org>, \n\t\"Andrew F. Davis\" <afd@ti.com>, linux-iio@vger.kernel.org,\n\tdevicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,\n\tMark Rutland <mark.rutland@arm.com>","Subject":"Re: [PATCH 1/2] dt-bindings: iio: dac: ti-dac082s085: Document new\n\tdriver","Message-ID":"<20170910161211.617f241f@archlinux>","In-Reply-To":"<cceeb1a985343d36dc90d2708371f3e1a73264f6.1504602350.git.lukas@wunner.de>","References":"<cceeb1a985343d36dc90d2708371f3e1a73264f6.1504602350.git.lukas@wunner.de>","X-Mailer":"Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu)","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1767396,"web_url":"http://patchwork.ozlabs.org/comment/1767396/","msgid":"<20170912215143.j3igltuldvqbo7hi@rob-hp-laptop>","list_archive_url":null,"date":"2017-09-12T21:51:43","subject":"Re: [PATCH 1/2] dt-bindings: iio: dac: ti-dac082s085: Document new\n\tdriver","submitter":{"id":62529,"url":"http://patchwork.ozlabs.org/api/people/62529/","name":"Rob Herring (Arm)","email":"robh@kernel.org"},"content":"On Tue, Sep 05, 2017 at 11:27:00AM +0200, Lukas Wunner wrote:\n> Add device tree bindings for Texas Instruments 8/10/12-bit 2/4-channel\n> DAC driver.\n> \n> Cc: Mathias Duckeck <m.duckeck@kunbus.de>\n> Signed-off-by: Lukas Wunner <lukas@wunner.de>\n> ---\n>  .../devicetree/bindings/iio/dac/ti-dac082s085.txt  | 34 ++++++++++++++++++++++\n>  1 file changed, 34 insertions(+)\n>  create mode 100644 Documentation/devicetree/bindings/iio/dac/ti-dac082s085.txt\n\nAcked-by: Rob Herring <robh@kernel.org> \n\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xsJR83BFjz9t3J\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 07:51:48 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751031AbdILVvq (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tTue, 12 Sep 2017 17:51:46 -0400","from mail-oi0-f68.google.com ([209.85.218.68]:37126 \"EHLO\n\tmail-oi0-f68.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751003AbdILVvq (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Tue, 12 Sep 2017 17:51:46 -0400","by mail-oi0-f68.google.com with SMTP id l9so4334545oib.4;\n\tTue, 12 Sep 2017 14:51:45 -0700 (PDT)","from localhost (216-188-254-6.dyn.grandenetworks.net.\n\t[216.188.254.6]) by smtp.gmail.com with ESMTPSA id\n\te18sm18636964oih.38.2017.09.12.14.51.44\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tTue, 12 Sep 2017 14:51:44 -0700 (PDT)"],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=EYg7I7m7zuzcXN22G3ug3ZawmKsCdF30EW55xeHoL6c=;\n\tb=lJeBoS3oOtcWHQQ7kBAmYdJnRzOX4d/EoFXC5VJAhp911LqdybycFerCdBljOEgfYp\n\tt8uTgYnalcAqllqzWpXXcU/ZN5C1V16eTktmNsOY0MttXTpUTBW7CEcZnVQjNJGpNWEc\n\t4P6OBFCvtf10YDYNooXYIo7ict4OvrbZRxcxwG2yk1xkn114foNfVhf5ducssN6Gby1o\n\tVFbQT4jWIc6G0sUlebI5nDOtJgx3/WnkVRor/KHkPQl5sF63ERzUCB265l/QSGjkGlnJ\n\tDzFxSHjYj103sVNVU0za1/3Sw57iUYBSpo4iNoN5h7ZitiPlcscctgNo8wE4E+YfPbBS\n\tSI3w==","X-Gm-Message-State":"AHPjjUiCBIWYBGgVAt0SUX5BFhKOGxHrcBojQ7XN6EPAV98Wgux20i/v\n\tfx7PeJA1VfEZUQ==","X-Google-Smtp-Source":"AOwi7QBiWZPqJFUL5y7+sGcKd3iOfib1f+bJZajuy8ZH7W3Q1d7ndRHVtfcdsucWv8ky+ltukyz4KA==","X-Received":"by 10.202.230.207 with SMTP id\n\td198mr15905876oih.234.1505253105421; \n\tTue, 12 Sep 2017 14:51:45 -0700 (PDT)","Date":"Tue, 12 Sep 2017 16:51:43 -0500","From":"Rob Herring <robh@kernel.org>","To":"Lukas Wunner <lukas@wunner.de>","Cc":"Jonathan Cameron <jic23@kernel.org>, Hartmut Knaack <knaack.h@gmx.de>,\n\tLars-Peter Clausen <lars@metafoo.de>,\n\tPeter Meerwald-Stadler <pmeerw@pmeerw.net>,\n\tMathias Duckeck <m.duckeck@kunbus.de>,\n\tPhil Elwell <phil@raspberrypi.org>, \n\t\"Andrew F. Davis\" <afd@ti.com>, linux-iio@vger.kernel.org,\n\tdevicetree@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>","Subject":"Re: [PATCH 1/2] dt-bindings: iio: dac: ti-dac082s085: Document new\n\tdriver","Message-ID":"<20170912215143.j3igltuldvqbo7hi@rob-hp-laptop>","References":"<cceeb1a985343d36dc90d2708371f3e1a73264f6.1504602350.git.lukas@wunner.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<cceeb1a985343d36dc90d2708371f3e1a73264f6.1504602350.git.lukas@wunner.de>","User-Agent":"NeoMutt/20170113 (1.7.2)","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1782050,"web_url":"http://patchwork.ozlabs.org/comment/1782050/","msgid":"<20171007091312.GA6890@wunner.de>","list_archive_url":null,"date":"2017-10-07T09:13:12","subject":"Re: [PATCH 2/2] iio: dac: Add Texas Instruments 8/10/12-bit\n\t2/4-channel DAC driver","submitter":{"id":68499,"url":"http://patchwork.ozlabs.org/api/people/68499/","name":"Lukas Wunner","email":"lukas@wunner.de"},"content":"On Sun, Sep 10, 2017 at 04:11:08PM +0100, Jonathan Cameron wrote:\n> On Tue, 5 Sep 2017 11:27:00 +0200 Lukas Wunner <lukas@wunner.de> wrote:\n> > The DACrrcS085 (rr = 08/10/12, c = 2/4) family of SPI DACs was\n> > inherited by TI when they acquired National Semiconductor in 2011.\n> \n> Very nice.  A few really minor comments inline.\n\nD'accord on all your comments except this one:\n\n\n> > +\tret = sscanf(spi->modalias, \"dac%2hhu%1d\",\n> > +\t\t     &ti_dac->resolution, &indio_dev->num_channels);\n> > +\tWARN_ON(ret != 2);\n> \n> Whilst this seems nice and clear now, it may not work if this driver\n> had additional parts added in future. \n> \n> I would prefer an explicit table with this information in it and\n> use an enum to reference into it.\n> \n> This is a bit 'too clever' :)\n\nHm, I looked at the other SPI DACs available from TI and their programming\ninterface is sufficiently different that they don't lend themselves all\ntoo well for integration into this driver.  There might be DACs from other\nvendors with a similar programming interface.\n\nWhat I *could* do is encode the resolution and number of channels in the\ndriver_data field of the spi MODULE_DEVICE_TABLE like this:\n\nstatic const struct spi_device_id ti_dac_spi_id[] = {\n\t{ \"dac082s085\",  8 << 8 + 2 },\n\t{ \"dac102s085\", 10 << 8 + 2 },\n\t...\n\nThen instead of reading the information from the modalias I'd read them\nfrom driver_data.  However it looks a bit redundant and silly to me.\nCan we add this extra complexity when the need for it actually arises?\n\nThanks,\n\nLukas\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y8LQZ1XWsz9t4b\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tSat,  7 Oct 2017 20:13:26 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1750931AbdJGJNP (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tSat, 7 Oct 2017 05:13:15 -0400","from bmailout1.hostsharing.net ([83.223.95.100]:35997 \"EHLO\n\tbmailout1.hostsharing.net\" rhost-flags-OK-OK-OK-OK) by\n\tvger.kernel.org with ESMTP id S1750864AbdJGJNO (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Sat, 7 Oct 2017 05:13:14 -0400","from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (Client CN \"*.hostsharing.net\",\n\tIssuer \"COMODO RSA Organization Validation Secure Server CA\" (not\n\tverified))\n\tby bmailout1.hostsharing.net (Postfix) with ESMTPS id 9E6B0300002B3; \n\tSat,  7 Oct 2017 11:13:12 +0200 (CEST)","by h08.hostsharing.net (Postfix, from userid 100393)\n\tid 7CF4422FAFB; Sat,  7 Oct 2017 11:13:12 +0200 (CEST)"],"Date":"Sat, 7 Oct 2017 11:13:12 +0200","From":"Lukas Wunner <lukas@wunner.de>","To":"Jonathan Cameron <jic23@kernel.org>","Cc":"Hartmut Knaack <knaack.h@gmx.de>, Lars-Peter Clausen <lars@metafoo.de>, \n\tPeter Meerwald-Stadler <pmeerw@pmeerw.net>,\n\tMathias Duckeck <m.duckeck@kunbus.de>,\n\tPhil Elwell <phil@raspberrypi.org>, \n\t\"Andrew F. Davis\" <afd@ti.com>, linux-iio@vger.kernel.org,\n\tdevicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,\n\tMark Rutland <mark.rutland@arm.com>","Subject":"Re: [PATCH 2/2] iio: dac: Add Texas Instruments 8/10/12-bit\n\t2/4-channel DAC driver","Message-ID":"<20171007091312.GA6890@wunner.de>","References":"<cceeb1a985343d36dc90d2708371f3e1a73264f6.1504602350.git.lukas@wunner.de>\n\t<5d861035569248ac4ae971638ce7fd1e50947232.1504602350.git.lukas@wunner.de>\n\t<20170910161108.2ecc34d3@archlinux>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170910161108.2ecc34d3@archlinux>","User-Agent":"Mutt/1.5.23 (2014-03-12)","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1782231,"web_url":"http://patchwork.ozlabs.org/comment/1782231/","msgid":"<20171008111506.78fe5e60@archlinux>","list_archive_url":null,"date":"2017-10-08T10:15:06","subject":"Re: [PATCH 2/2] iio: dac: Add Texas Instruments 8/10/12-bit\n\t2/4-channel DAC driver","submitter":{"id":10151,"url":"http://patchwork.ozlabs.org/api/people/10151/","name":"Jonathan Cameron","email":"jic23@kernel.org"},"content":"On Sat, 7 Oct 2017 11:13:12 +0200\nLukas Wunner <lukas@wunner.de> wrote:\n\n> On Sun, Sep 10, 2017 at 04:11:08PM +0100, Jonathan Cameron wrote:\n> > On Tue, 5 Sep 2017 11:27:00 +0200 Lukas Wunner <lukas@wunner.de> wrote:  \n> > > The DACrrcS085 (rr = 08/10/12, c = 2/4) family of SPI DACs was\n> > > inherited by TI when they acquired National Semiconductor in 2011.  \n> > \n> > Very nice.  A few really minor comments inline.  \n> \n> D'accord on all your comments except this one:\n> \n> \n> > > +\tret = sscanf(spi->modalias, \"dac%2hhu%1d\",\n> > > +\t\t     &ti_dac->resolution, &indio_dev->num_channels);\n> > > +\tWARN_ON(ret != 2);  \n> > \n> > Whilst this seems nice and clear now, it may not work if this driver\n> > had additional parts added in future. \n> > \n> > I would prefer an explicit table with this information in it and\n> > use an enum to reference into it.\n> > \n> > This is a bit 'too clever' :)  \n> \n> Hm, I looked at the other SPI DACs available from TI and their programming\n> interface is sufficiently different that they don't lend themselves all\n> too well for integration into this driver.  There might be DACs from other\n> vendors with a similar programming interface.\n> \n> What I *could* do is encode the resolution and number of channels in the\n> driver_data field of the spi MODULE_DEVICE_TABLE like this:\n> \n> static const struct spi_device_id ti_dac_spi_id[] = {\n> \t{ \"dac082s085\",  8 << 8 + 2 },\n> \t{ \"dac102s085\", 10 << 8 + 2 },\n> \t...\n> \n> Then instead of reading the information from the modalias I'd read them\n> from driver_data.  However it looks a bit redundant and silly to me.\n> Can we add this extra complexity when the need for it actually arises?\n\nDo it the simple if slightly more lengthy way. It's easier to review\nand less likely to be fragile in future.\n\nenum dac082s085_devices {\n\tDAC082S085,\n\tDAC102S085\n};\n\nstruct dac082s085_device_info {\n\tint resolution;\n\tint num_channels;\n};\n\nstatic const struct\n\tdac082s085_device_info dac082s085_devices[dac082s085_devices] = {\n\t\tDAC082S085 = {\n\t\t\t.resolution = 8,\n\t\t\t.num_channels = 2,\n\t\t},\n\t....\t\t\n};\n\nThen pick the relevant structure when you probe.\n\nIt's long code, but it is really easy to tell if it is correct.\nHere we are trading off verbosity for maintainability.\n\nJonathan\n\n> \n> Thanks,\n> \n> Lukas\n> --\n> To unsubscribe from this list: send the line \"unsubscribe linux-iio\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","mail.kernel.org;\n\tdmarc=none (p=none dis=none) header.from=kernel.org","mail.kernel.org;\n\tspf=none smtp.mailfrom=jic23@kernel.org"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y8zlS08CMz9t3F\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tSun,  8 Oct 2017 21:15:16 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751651AbdJHKPN (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tSun, 8 Oct 2017 06:15:13 -0400","from mail.kernel.org ([198.145.29.99]:58118 \"EHLO mail.kernel.org\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1751533AbdJHKPM (ORCPT <rfc822;devicetree@vger.kernel.org>);\n\tSun, 8 Oct 2017 06:15:12 -0400","from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net\n\t[81.96.234.148])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby mail.kernel.org (Postfix) with ESMTPSA id 70AB021878;\n\tSun,  8 Oct 2017 10:15:09 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mail.kernel.org 70AB021878","Date":"Sun, 8 Oct 2017 11:15:06 +0100","From":"Jonathan Cameron <jic23@kernel.org>","To":"Lukas Wunner <lukas@wunner.de>","Cc":"Hartmut Knaack <knaack.h@gmx.de>, Lars-Peter Clausen <lars@metafoo.de>, \n\tPeter Meerwald-Stadler <pmeerw@pmeerw.net>,\n\tMathias Duckeck <m.duckeck@kunbus.de>,\n\tPhil Elwell <phil@raspberrypi.org>, \n\t\"Andrew F. Davis\" <afd@ti.com>, linux-iio@vger.kernel.org,\n\tdevicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,\n\tMark Rutland <mark.rutland@arm.com>","Subject":"Re: [PATCH 2/2] iio: dac: Add Texas Instruments 8/10/12-bit\n\t2/4-channel DAC driver","Message-ID":"<20171008111506.78fe5e60@archlinux>","In-Reply-To":"<20171007091312.GA6890@wunner.de>","References":"<cceeb1a985343d36dc90d2708371f3e1a73264f6.1504602350.git.lukas@wunner.de>\n\t<5d861035569248ac4ae971638ce7fd1e50947232.1504602350.git.lukas@wunner.de>\n\t<20170910161108.2ecc34d3@archlinux>\n\t<20171007091312.GA6890@wunner.de>","X-Mailer":"Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu)","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}}]