From patchwork Tue Aug 21 19:31:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Folkesson X-Patchwork-Id: 10572333 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 410E31575 for ; Tue, 21 Aug 2018 19:55:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C3DA2AAB6 for ; Tue, 21 Aug 2018 19:55:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E3C32AACF; Tue, 21 Aug 2018 19:55:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DD402AAB6 for ; Tue, 21 Aug 2018 19:55:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726813AbeHUXRE (ORCPT ); Tue, 21 Aug 2018 19:17:04 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:37259 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726628AbeHUXRE (ORCPT ); Tue, 21 Aug 2018 19:17:04 -0400 Received: by mail-lf1-f68.google.com with SMTP id j8-v6so14508877lfb.4; Tue, 21 Aug 2018 12:55:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=BX6PJuVzM2m4l/CyH1Gv9PMcmEF3U7/AEVuq4Oeh2S8=; b=cqMDl/5iNMscjj3WP1hZNkb4WUjVuzXlW1R3LOxBevu0HJu2vDqKsp8AWkIrwz10Tn hdFFc0mfBdNZ8NIoIhu4fp+PqQh9eRXznBAQV+mq8ddXdYlcnzFm9sXTys7jSPSZWrYB 0Qe87J73nbmIULHNQ9cKWWPJcYxGfxBCgU+MSN9xuKP8YSUmE+yGHJa7+Ju9fhDqfAZM qwRL5wC2/EfjKqQ8DZSIqGomgWZHomGZqiWEJe2oyLIIwn5qJvGu10AYGBN8oN840gDK xP2sAMPZA+ck6DZRoTkIn/0ihH+64A3Sw23FNnmHrXzJd0kO6gacdME/iSfc0Vl9DFNu UdGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BX6PJuVzM2m4l/CyH1Gv9PMcmEF3U7/AEVuq4Oeh2S8=; b=QMjBrSHnT+cYKp0E2KfIJrdzsSUmldm393YajjRFjWaf+pPhIEjdW1eja44MUuobOL K8ri56WPEqRvca83AKvxPivUgMjyW8RCLGzdgG5y8eB03Fl7xa1ruNxq1CZec7v89KtA 1ZkTvKKDEtBHsl0FkQYnZRC3mAQCIgL8eDVQeQfZwCaRBoRWgyg3wqBScFsgkMHvM3kB SVQS2Lic1QBu2wbYcpMwIZFF5g37ycy08drdyf7Qd3ZqkSjS0i398ZvbK8LfZfrt3u9J 1N4yCNlnV8O3cwGATgT9wYzjwYbAl773kTFm3H/nOW0ottfE+NwSIn9tl5roDLOIWRPA rzzQ== X-Gm-Message-State: AOUpUlFh68B/lyAR1Wj1EH4SsRjinyr/72v+pIK5R3Vvdidu8273DHW2 mxTmXwJ70Yv7M9HCflwIppQ= X-Google-Smtp-Source: AA+uWPxolu5B/xbXXOaalWPnvBUaEsW6iDL8+RRSsx1nljTEjZpQEqVhQVAfsO8eJU7N/P2zYTVgtw== X-Received: by 2002:a19:4b15:: with SMTP id y21-v6mr9156281lfa.118.1534881329542; Tue, 21 Aug 2018 12:55:29 -0700 (PDT) Received: from localhost.localdomain (c-2ec26f18-74736162.cust.telenor.se. [46.194.111.24]) by smtp.gmail.com with ESMTPSA id l141-v6sm2449374lfg.55.2018.08.21.12.55.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Aug 2018 12:55:28 -0700 (PDT) From: Marcus Folkesson To: Marcus Folkesson , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] iio: dac: add support for ltc1660 Date: Tue, 21 Aug 2018 21:31:24 +0200 Message-Id: <20180821193126.15733-1-marcus.folkesson@gmail.com> X-Mailer: git-send-email 2.11.0.rc2 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP LTC1665/LTC1660 is a 8/10-bit Digital-to-Analog Converter (DAC) with eight individual channels. Signed-off-by: Marcus Folkesson --- Notes: v2: - rename all instances of ltc166x to ltc1660 - read regulator value "in-place" instead of cache voltage - fix error handling in ltc1660_write_raw drivers/iio/dac/Kconfig | 10 ++ drivers/iio/dac/Makefile | 1 + drivers/iio/dac/ltc1660.c | 250 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 261 insertions(+) create mode 100644 drivers/iio/dac/ltc1660.c diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig index 76db0768e454..cbee80bd111e 100644 --- a/drivers/iio/dac/Kconfig +++ b/drivers/iio/dac/Kconfig @@ -120,6 +120,16 @@ config AD5624R_SPI Say yes here to build support for Analog Devices AD5624R, AD5644R and AD5664R converters (DAC). This driver uses the common SPI interface. +config LTC1660 + tristate "Linear Technology LTC1660/LTC1665 DAC SPI driver" + depends on SPI + help + Say yes here to build support for Linear Technology + LTC1660 and LTC1665 Digital to Analog Converters. + + To compile this driver as a module, choose M here: the + module will be called ltc1660. + config LTC2632 tristate "Linear Technology LTC2632-12/10/8 DAC spi driver" depends on SPI diff --git a/drivers/iio/dac/Makefile b/drivers/iio/dac/Makefile index 81e710ed7491..e446eeb09c85 100644 --- a/drivers/iio/dac/Makefile +++ b/drivers/iio/dac/Makefile @@ -26,6 +26,7 @@ obj-$(CONFIG_CIO_DAC) += cio-dac.o obj-$(CONFIG_DPOT_DAC) += dpot-dac.o obj-$(CONFIG_DS4424) += ds4424.o obj-$(CONFIG_LPC18XX_DAC) += lpc18xx_dac.o +obj-$(CONFIG_LTC1660) += ltc1660.o obj-$(CONFIG_LTC2632) += ltc2632.o obj-$(CONFIG_M62332) += m62332.o obj-$(CONFIG_MAX517) += max517.o diff --git a/drivers/iio/dac/ltc1660.c b/drivers/iio/dac/ltc1660.c new file mode 100644 index 000000000000..10866838c72a --- /dev/null +++ b/drivers/iio/dac/ltc1660.c @@ -0,0 +1,250 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Driver for Linear Technology LTC1665/LTC1660, 8 channels DAC + * + * Copyright (C) 2018 Marcus Folkesson + */ +#include +#include +#include +#include +#include +#include +#include +#include + +#define LTC1660_REG_WAKE 0x0 +#define LTC1660_REG_DAC_A 0x1 +#define LTC1660_REG_DAC_B 0x2 +#define LTC1660_REG_DAC_C 0x3 +#define LTC1660_REG_DAC_D 0x4 +#define LTC1660_REG_DAC_E 0x5 +#define LTC1660_REG_DAC_F 0x6 +#define LTC1660_REG_DAC_G 0x7 +#define LTC1660_REG_DAC_H 0x8 +#define LTC1660_REG_SLEEP 0xe + +#define LTC1660_NUM_CHANNELS 8 + +static const struct regmap_config ltc1660_regmap_config = { + .reg_bits = 4, + .val_bits = 12, +}; + +enum ltc1660_supported_device_ids { + ID_LTC1660, + ID_LTC1665, +}; + +struct ltc1660_priv { + struct spi_device *spi; + struct regmap *regmap; + struct regulator *vref_reg; + unsigned int value[LTC1660_NUM_CHANNELS]; + unsigned int vref_mv; +}; + +static int ltc1660_read_raw(struct iio_dev *indio_dev, + struct iio_chan_spec const *chan, + int *val, + int *val2, + long mask) +{ + struct ltc1660_priv *priv = iio_priv(indio_dev); + + switch (mask) { + case IIO_CHAN_INFO_RAW: + *val = priv->value[chan->channel]; + return IIO_VAL_INT; + case IIO_CHAN_INFO_SCALE: + *val = regulator_get_voltage(priv->vref_reg); + if (*val < 0) { + dev_err(&priv->spi->dev, "failed to read vref regulator: %d\n", + *val); + return *val; + } + + /* Convert to mV */ + *val /= 1000; + *val2 = chan->scan_type.realbits; + return IIO_VAL_FRACTIONAL_LOG2; + default: + return -EINVAL; + } +} + +static int ltc1660_write_raw(struct iio_dev *indio_dev, + struct iio_chan_spec const *chan, + int val, + int val2, + long mask) +{ + struct ltc1660_priv *priv = iio_priv(indio_dev); + int ret; + + switch (mask) { + case IIO_CHAN_INFO_RAW: + if (val2 != 0) + return -EINVAL; + + if (val < 0 || val > GENMASK(chan->scan_type.realbits - 1, 0)) + return -EINVAL; + + ret = regmap_write(priv->regmap, chan->channel, + (val << chan->scan_type.shift)); + if (!ret) + priv->value[chan->channel] = val; + + return ret; + default: + return -EINVAL; + } +} + +#define LTC1660_CHAN(chan, bits) { \ + .type = IIO_VOLTAGE, \ + .indexed = 1, \ + .output = 1, \ + .channel = chan, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ + .scan_type = { \ + .sign = 'u', \ + .realbits = (bits), \ + .storagebits = 16, \ + .shift = 12 - (bits), \ + }, \ +} + +#define LTC1660_OCTAL_CHANNELS(bits) { \ + LTC1660_CHAN(LTC1660_REG_DAC_A, bits), \ + LTC1660_CHAN(LTC1660_REG_DAC_B, bits), \ + LTC1660_CHAN(LTC1660_REG_DAC_C, bits), \ + LTC1660_CHAN(LTC1660_REG_DAC_D, bits), \ + LTC1660_CHAN(LTC1660_REG_DAC_E, bits), \ + LTC1660_CHAN(LTC1660_REG_DAC_F, bits), \ + LTC1660_CHAN(LTC1660_REG_DAC_G, bits), \ + LTC1660_CHAN(LTC1660_REG_DAC_H, bits), \ +} + +static const struct iio_chan_spec ltc1660_channels[][LTC1660_NUM_CHANNELS] = { + [ID_LTC1660] = LTC1660_OCTAL_CHANNELS(10), + [ID_LTC1665] = LTC1660_OCTAL_CHANNELS(8), +}; + +static const struct iio_info ltc1660_info = { + .read_raw = <c1660_read_raw, + .write_raw = <c1660_write_raw, +}; + +static int __maybe_unused ltc1660_suspend(struct device *dev) +{ + struct ltc1660_priv *priv = iio_priv(spi_get_drvdata( + to_spi_device(dev))); + return regmap_write(priv->regmap, LTC1660_REG_SLEEP, 0x00); +} + +static int __maybe_unused ltc1660_resume(struct device *dev) +{ + struct ltc1660_priv *priv = iio_priv(spi_get_drvdata( + to_spi_device(dev))); + return regmap_write(priv->regmap, LTC1660_REG_WAKE, 0x00); +} +static SIMPLE_DEV_PM_OPS(ltc1660_pm_ops, ltc1660_suspend, ltc1660_resume); + +static int ltc1660_probe(struct spi_device *spi) +{ + struct iio_dev *indio_dev; + struct ltc1660_priv *priv; + const struct spi_device_id *id = spi_get_device_id(spi); + int ret; + + indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*priv)); + if (indio_dev == NULL) + return -ENOMEM; + + priv = iio_priv(indio_dev); + priv->regmap = devm_regmap_init_spi(spi, <c1660_regmap_config); + if (IS_ERR(priv->regmap)) { + dev_err(&spi->dev, "failed to register spi regmap %ld\n", + PTR_ERR(priv->regmap)); + return PTR_ERR(priv->regmap); + } + + priv->vref_reg = devm_regulator_get(&spi->dev, "vref"); + if (IS_ERR(priv->vref_reg)) { + dev_err(&spi->dev, "vref regulator not specified\n"); + return PTR_ERR(priv->vref_reg); + } + + ret = regulator_enable(priv->vref_reg); + if (ret) { + dev_err(&spi->dev, "failed to enable vref regulator: %d\n", + ret); + return ret; + } + + priv->spi = spi; + spi_set_drvdata(spi, indio_dev); + indio_dev->dev.parent = &spi->dev; + indio_dev->info = <c1660_info; + indio_dev->modes = INDIO_DIRECT_MODE; + indio_dev->channels = ltc1660_channels[id->driver_data]; + indio_dev->num_channels = LTC1660_NUM_CHANNELS; + indio_dev->name = id->name; + + ret = iio_device_register(indio_dev); + if (ret) { + dev_err(&spi->dev, "failed to register iio device: %d\n", + ret); + goto error_disable_reg; + } + + return 0; + +error_disable_reg: + regulator_disable(priv->vref_reg); + + return ret; +} + +static int ltc1660_remove(struct spi_device *spi) +{ + struct iio_dev *indio_dev = spi_get_drvdata(spi); + struct ltc1660_priv *priv = iio_priv(indio_dev); + + iio_device_unregister(indio_dev); + regulator_disable(priv->vref_reg); + + return 0; +} + +static const struct of_device_id ltc1660_dt_ids[] = { + { .compatible = "lltc,ltc1660", .data = (void *)ID_LTC1660 }, + { .compatible = "lltc,ltc1665", .data = (void *)ID_LTC1665 }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, ltc1660_dt_ids); + +static const struct spi_device_id ltc1660_id[] = { + {"ltc1660", ID_LTC1660}, + {"ltc1665", ID_LTC1665}, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(spi, ltc1660_id); + +static struct spi_driver ltc1660_driver = { + .driver = { + .name = "ltc1660", + .of_match_table = ltc1660_dt_ids, + .pm = <c1660_pm_ops, + }, + .probe = ltc1660_probe, + .remove = ltc1660_remove, + .id_table = ltc1660_id, +}; +module_spi_driver(ltc1660_driver); + +MODULE_AUTHOR("Marcus Folkesson "); +MODULE_DESCRIPTION("Linear Technology LTC1660/LTC1665 DAC"); +MODULE_LICENSE("GPL v2"); From patchwork Tue Aug 21 19:31:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Folkesson X-Patchwork-Id: 10572335 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 52E191575 for ; Tue, 21 Aug 2018 19:55:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FC902AAB6 for ; Tue, 21 Aug 2018 19:55:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 43B1A2AACF; Tue, 21 Aug 2018 19:55:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA0312AAB6 for ; Tue, 21 Aug 2018 19:55:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727396AbeHUXRH (ORCPT ); Tue, 21 Aug 2018 19:17:07 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:47001 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726810AbeHUXRG (ORCPT ); Tue, 21 Aug 2018 19:17:06 -0400 Received: by mail-lj1-f195.google.com with SMTP id 203-v6so15229311ljj.13; Tue, 21 Aug 2018 12:55:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DVE6PpUvFq4CLprqWo6Eq7kEfRGyHyMeIbkuOnlqoVM=; b=t2QVljyRVOUZfHdd3+38A9geIXIxptfDLvujhaluJzsnAdgDAJ6dMtlUX56swlW+wH RuNjAHt0LW7aleGLnKoyKw7c9DWjueL/wrL0TY5CPXyA4d4Tosa83nuigmYKtd6GHyJF kcjRc5HXIrBUIXfU/EIuJm9QFH6N8+16pLaVLQuTKipMejUinwkBkd8SOyrQeLQmiQXN tSEwKc4mkH0fNgO0hKyWZi4JztErCE16K6x2040lhQeDVNnkZ0KKdTPfdEcYRhNmBkQn t4wxPyOHnhAPQErI1dUcoLy4FjBvmnTMf0obt94ICFJFHwhAj2jQ5m/P0tFeDsLyjT69 a56g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DVE6PpUvFq4CLprqWo6Eq7kEfRGyHyMeIbkuOnlqoVM=; b=AyTg9XKJdCLFnuCYpGUhcOGOHhcAFl56s+CZoWFIXrbfEdVJ5GrjcwKmGsYOCcKJWf xDJgHN97XDFKunI0IzYfwllix2pgxGzJGSxitllSKFnVyRjltu3Yw7MYiJKG/IO05H96 i3A3mqANWV5nDMOiyF4OQfr8vn+EckWdtQuOj/jV8gWfrrNPUYS4n3cdyR1Z1vkG0pdD NUVKDZ9g0borSnHEbQlakwk84drlD8JqK0VZiAWFX0KnbbXdllSGHLCINwWMqkEpdbzR vBw9RJBnoRQm4tq+/Mf0cwX7n50GYODTZGVfXmpaKslY4sG96HgiLlVnhJJsmJNHM6cy jrBQ== X-Gm-Message-State: APzg51DnDOoYdSKkxVAcYjazI2/7S7aiEPpiiWb4G1qpJcj5u1tiOWLZ v9GH9znlsObylBgQsipYoQTwVj0uEh8= X-Google-Smtp-Source: AA+uWPxovMc5FaeIeuZnFWnWt9c/3mVklbm0Nt08ESRmmxCaKLaEeyV/W+kVuXQpe+ljyScNA1FINg== X-Received: by 2002:a2e:9c0f:: with SMTP id s15-v6mr4745649lji.97.1534881331663; Tue, 21 Aug 2018 12:55:31 -0700 (PDT) Received: from localhost.localdomain (c-2ec26f18-74736162.cust.telenor.se. [46.194.111.24]) by smtp.gmail.com with ESMTPSA id l141-v6sm2449374lfg.55.2018.08.21.12.55.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Aug 2018 12:55:30 -0700 (PDT) From: Marcus Folkesson To: Marcus Folkesson , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/3] dt-bindings: iio: dac: add bindings for ltc1660 Date: Tue, 21 Aug 2018 21:31:25 +0200 Message-Id: <20180821193126.15733-2-marcus.folkesson@gmail.com> X-Mailer: git-send-email 2.11.0.rc2 In-Reply-To: <20180821193126.15733-1-marcus.folkesson@gmail.com> References: <20180821193126.15733-1-marcus.folkesson@gmail.com> Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP LTC1665/LTC1660 is a 8/10-bit Digital-to-Analog Converter (DAC) with eight individual channels. Signed-off-by: Marcus Folkesson Reviewed-by: Rob Herring --- Notes: v2: - rename file, ltc166x -> ltc1660 .../devicetree/bindings/iio/dac/ltc1660.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/dac/ltc1660.txt diff --git a/Documentation/devicetree/bindings/iio/dac/ltc1660.txt b/Documentation/devicetree/bindings/iio/dac/ltc1660.txt new file mode 100644 index 000000000000..c5b5f22d6c64 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/ltc1660.txt @@ -0,0 +1,21 @@ +* Linear Technology Micropower octal 8-Bit and 10-Bit DACs + +Required properties: + - compatible: Must be one of the following: + "lltc,ltc1660" + "lltc,ltc1665" + - reg: SPI chip select number for the device + - vref-supply: Phandle to the voltage reference supply + +Recommended properties: + - spi-max-frequency: Definition as per + Documentation/devicetree/bindings/spi/spi-bus.txt. + Max frequency for this chip is 5 MHz. + +Example: +dac@0 { + compatible = "lltc,ltc1660"; + reg = <0>; + spi-max-frequency = <5000000>; + vref-supply = <&vref_reg>; +}; From patchwork Tue Aug 21 19:31:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Folkesson X-Patchwork-Id: 10572337 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 11D2E14BD for ; Tue, 21 Aug 2018 19:55:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B9D82AABE for ; Tue, 21 Aug 2018 19:55:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F1B182AAD4; Tue, 21 Aug 2018 19:55:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 956A32AABE for ; Tue, 21 Aug 2018 19:55:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727450AbeHUXRJ (ORCPT ); Tue, 21 Aug 2018 19:17:09 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:41685 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726628AbeHUXRI (ORCPT ); Tue, 21 Aug 2018 19:17:08 -0400 Received: by mail-lj1-f193.google.com with SMTP id y17-v6so15256192ljy.8; Tue, 21 Aug 2018 12:55:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=F2Zsdo1XhZLTDDIIKfjmSMVlN8EgCFbdSj37gG9c69o=; b=rdamasACz0U1QlG2x9NFrkLy7AdGkW/CAfdPuVlpGitPcChmXYuSzAv4e/47GtdnVl 0McL5A6/u/F8O71Re9cvG9sBWTHjja675S4Rl9r5/+uTeWOKKUcswDH0c2BRwdmhGwOo 3FrAxPvofu3qb1L1cAVlKIZLbTMHSoV5rWDcH5E44LfgGNlBCtzVvcMBFZz1xHj6eBhK rgHsttCXOViDvcKiVC3m/ZThu1sIVewffp7mYGXu9KeLAThye1+QBU8OTZmDwf4YxUkg YagbBVdWxW9+UOmNIs9x5F5hs8uIL8hQRfC9y3G+TclkUQCLsE80v1KyczexI1Bd2tOp Wm8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=F2Zsdo1XhZLTDDIIKfjmSMVlN8EgCFbdSj37gG9c69o=; b=UQOiFZq8PUWysl8fl5hsYNTu0GXSxv5qMPcjg9VICWehnNb8UUWRbXUd5aHEiFSAaO uB/YZcbU8emzsf9bIbbk8X5Dg15ObWs+8MiBN44jXpYF0SG2+RI2m4xH+E9nYDpeo1TY irf8xyzEmHAJ2Ea2zcuKZYn8z5tor6eg0jC4UDiD+A4BJXsIb3ByU7dTiBNTdisjg0tt NgrsAL6dE3TRc/pBIPGgw05YkzvLJNFI1/h7TW1FPwHGOLoo0Yieb2Wp2Z5nM7qHsGkZ ZB+IGE2fROMnLuPA4Cznh56MzoQad6odL2zJrWCAMef2fVeP7ctQyqcMx8TVbSbizfmQ qGdw== X-Gm-Message-State: AOUpUlG4I5obr124AaCy6zVOvSskL/tEiEC4JWY9qPsrlnEjzaVxZGFy 6HYz+aj6k7kjavupdDX4L1Q= X-Google-Smtp-Source: AA+uWPyWe8s1oAHuzyn1W2Kn5P1Yy52Mt1Xp0dIuMmhm7x8a84dGw7kYf0JF3kpY8IMnmsnRROEFHQ== X-Received: by 2002:a2e:97c8:: with SMTP id m8-v6mr37476355ljj.52.1534881334030; Tue, 21 Aug 2018 12:55:34 -0700 (PDT) Received: from localhost.localdomain (c-2ec26f18-74736162.cust.telenor.se. [46.194.111.24]) by smtp.gmail.com with ESMTPSA id l141-v6sm2449374lfg.55.2018.08.21.12.55.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Aug 2018 12:55:32 -0700 (PDT) From: Marcus Folkesson To: Marcus Folkesson , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] MAINTAINERS: add entry for ltc1660 DAC driver Date: Tue, 21 Aug 2018 21:31:26 +0200 Message-Id: <20180821193126.15733-3-marcus.folkesson@gmail.com> X-Mailer: git-send-email 2.11.0.rc2 In-Reply-To: <20180821193126.15733-1-marcus.folkesson@gmail.com> References: <20180821193126.15733-1-marcus.folkesson@gmail.com> Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add entry for ltc1660 DAC driver and add myself as maintainer of this driver. Signed-off-by: Marcus Folkesson --- Notes: v2: - rename enumerated files, ltc166x* -> ltc1660* MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9276da915d9d..3db1edaf68bd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8363,6 +8363,13 @@ L: linux-scsi@vger.kernel.org S: Maintained F: drivers/scsi/sym53c8xx_2/ +LTC1660 DAC DRIVER +M: Marcus Folkesson +L: linux-iio@vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/iio/dac/ltc1660.txt +F: drivers/iio/dac/ltc1660.c + LTC4261 HARDWARE MONITOR DRIVER M: Guenter Roeck L: linux-hwmon@vger.kernel.org