From patchwork Tue Jan 14 02:23:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Ranostay X-Patchwork-Id: 11331177 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3B89E6C1 for ; Tue, 14 Jan 2020 02:23:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 197102080D for ; Tue, 14 Jan 2020 02:23:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=konsulko.com header.i=@konsulko.com header.b="mDy+EZ6X" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729425AbgANCX4 (ORCPT ); Mon, 13 Jan 2020 21:23:56 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:41253 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729518AbgANCX4 (ORCPT ); Mon, 13 Jan 2020 21:23:56 -0500 Received: by mail-lf1-f66.google.com with SMTP id m30so8499682lfp.8 for ; Mon, 13 Jan 2020 18:23:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bNSyMZF9468DIDJcjhlMXesbT1C4yGPmOXHzox1YDqw=; b=mDy+EZ6X5GgilJ9ne51v8HMqJsX5282eBEYmoKxUiatJeNZOf7eEnKdxCBa81I3RDP KUjiusCvUD+Fslh74IXzwHPXX0VPvtPs5jptWAUisfxesxOvprxo4tpCo1DU4X1x2omb HimwcXe1DM+v8ul5cO5BW1Yq/3POxrPYQWO/I= 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:mime-version:content-transfer-encoding; bh=bNSyMZF9468DIDJcjhlMXesbT1C4yGPmOXHzox1YDqw=; b=EYMk2pR4cF6fc4ogrgf/VtkCianeQkRlIMwqcPvmQdIXGKC9PtJhK/ZEdEeye97svw uWYvDriIG7wrT+wHZtD0cBf7ZtnhpIIq1pemeINcJmF5+CgJBD4t9AXuRPIPES7+lqHY wYACP4WkpqVOpvKUT3/DZi1FPBQdXlHzX+9OBgFDPRQoOy7vP3igg+gb4jWoUeqO9Yh5 haWO1sCMZvMLhGw9kmgzPE2t2Hgl/B/79kK51aA7Hpo3NbgjVFj7lBClPZpMyOFyKpEV aZtO5mL47aMVZ5l029v6Rt2fuAUyMXxW/BNCrkgmmOctW5tLg/3fvy4dmyxl1WC5HSTu G9Ug== X-Gm-Message-State: APjAAAXIvH5KQ1nvqh5s0BdTT/GcmXaL+tWGqZ6o27otYE6M+LNaBkXz fMdmmEIq5tovS2Y147N4AfmlC/+zNt+dkg== X-Google-Smtp-Source: APXvYqyENUZJ+5q7004mp0P/6TVE3O0zjTt1Io9N3/+x6sbrFC0G/mchWxfXbdz0mLcs3XjXzQe7qg== X-Received: by 2002:ac2:43a7:: with SMTP id t7mr250965lfl.125.1578968634312; Mon, 13 Jan 2020 18:23:54 -0800 (PST) Received: from taos.konsulko.bg (lan.nucleusys.com. [92.247.61.126]) by smtp.gmail.com with ESMTPSA id r26sm6388648lfm.82.2020.01.13.18.23.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2020 18:23:53 -0800 (PST) From: Matt Ranostay To: linux-iio@vger.kernel.org Cc: jic23@vger.kernel.org, Matt Ranostay Subject: [PATCH v2 1/3] iio: chemical: atlas-sensor: allow probe without interrupt line Date: Tue, 14 Jan 2020 04:23:46 +0200 Message-Id: <20200114022348.8676-2-matt.ranostay@konsulko.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200114022348.8676-1-matt.ranostay@konsulko.com> References: <20200114022348.8676-1-matt.ranostay@konsulko.com> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Sensors don't actually need a interrupt line to give valid readings, and can triggered with CONFIG_IIO_HRTIMER_TRIGGER as well. Remove the required check for interrupt, and continue along in the probe function. Signed-off-by: Matt Ranostay --- drivers/iio/chemical/atlas-sensor.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/drivers/iio/chemical/atlas-sensor.c b/drivers/iio/chemical/atlas-sensor.c index 2f0a6fed2589..2e34c82cb65d 100644 --- a/drivers/iio/chemical/atlas-sensor.c +++ b/drivers/iio/chemical/atlas-sensor.c @@ -572,11 +572,6 @@ static int atlas_probe(struct i2c_client *client, if (ret) return ret; - if (client->irq <= 0) { - dev_err(&client->dev, "no valid irq defined\n"); - return -EINVAL; - } - ret = chip->calibration(data); if (ret) return ret; @@ -596,16 +591,18 @@ static int atlas_probe(struct i2c_client *client, init_irq_work(&data->work, atlas_work_handler); - /* interrupt pin toggles on new conversion */ - ret = devm_request_threaded_irq(&client->dev, client->irq, - NULL, atlas_interrupt_handler, - IRQF_TRIGGER_RISING | - IRQF_TRIGGER_FALLING | IRQF_ONESHOT, - "atlas_irq", - indio_dev); - if (ret) { - dev_err(&client->dev, "request irq (%d) failed\n", client->irq); - goto unregister_buffer; + if (client->irq <= 0) { + /* interrupt pin toggles on new conversion */ + ret = devm_request_threaded_irq(&client->dev, client->irq, + NULL, atlas_interrupt_handler, + IRQF_TRIGGER_RISING | + IRQF_TRIGGER_FALLING | IRQF_ONESHOT, + "atlas_irq", + indio_dev); + + if (ret) + dev_warn(&client->dev, + "request irq (%d) failed\n", client->irq); } ret = atlas_set_powermode(data, 1); From patchwork Tue Jan 14 02:23:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Ranostay X-Patchwork-Id: 11331179 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C34C96C1 for ; Tue, 14 Jan 2020 02:23:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A34F221556 for ; Tue, 14 Jan 2020 02:23:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=konsulko.com header.i=@konsulko.com header.b="AhXZ3Vdv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729543AbgANCX6 (ORCPT ); Mon, 13 Jan 2020 21:23:58 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:33367 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729522AbgANCX6 (ORCPT ); Mon, 13 Jan 2020 21:23:58 -0500 Received: by mail-lj1-f196.google.com with SMTP id y6so12515664lji.0 for ; Mon, 13 Jan 2020 18:23:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9an7fiwpJoV9YjTyVejbkq6+w6Nj3B8gpVIV6VF2yoc=; b=AhXZ3VdvkGEo750iK2H02umzWOnGu+52LDw2C1RX33b96Nrq1o8iY6b6uSd2zkKeaF xA0F5Y35gp2zHPF04hAYjuRz6i2V85GvGg34xh2TMa7aVq/uTxwVKxRrqKsk9pnCk9To fX1yhRCLGo5jjEeTRxKrOVUTi82DweaNItusM= 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:mime-version:content-transfer-encoding; bh=9an7fiwpJoV9YjTyVejbkq6+w6Nj3B8gpVIV6VF2yoc=; b=rEkTf5HCmeZSC0HBkOju79ijJtl/ixGtOUEXTZjgw/NUAGoVETyBV+gODbdWbtecDA gWYgqhoH62WiVB/fExpTB+rH9kMyzJO6q3WtsLHUA9BoRa7oZ2/PvQvcpejcF5rsQntb xsXWKBlOpB4ZoY5kUa8kT0104Z7nxg2Th7x8aDXD0SMScl4ZPB+vMx2RJ604rZDmGBbz q6JNXewECSvKShEQp9lgAX9kFy/RWBXf0/2gpcC2C/ehIV7FTBKge3BSCnn/5Fa+WEls LvOYuNEWmNycvr5aE33+btfSZ7ZOuuYnS60kn/DlaWwAqsobwcZzQ7BbFasoU6hFHgnp VySw== X-Gm-Message-State: APjAAAWIrT8UcsxJ3/KFIGGnQcO8kkOjOLVV7+MoD7gPd/2rXGYaMc/x nwAATqj2LaxQCz3tUGH4PQXvyueLjXUxOw== X-Google-Smtp-Source: APXvYqyHDiuRiEMak6AWHYZo6hWpmX5XoaKtnG5Xm+GA571FizlEUNzhZmiKeu5ZEn/P6unKgYo9tA== X-Received: by 2002:a2e:9b12:: with SMTP id u18mr10892824lji.274.1578968635257; Mon, 13 Jan 2020 18:23:55 -0800 (PST) Received: from taos.konsulko.bg (lan.nucleusys.com. [92.247.61.126]) by smtp.gmail.com with ESMTPSA id r26sm6388648lfm.82.2020.01.13.18.23.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2020 18:23:54 -0800 (PST) From: Matt Ranostay To: linux-iio@vger.kernel.org Cc: jic23@vger.kernel.org, Matt Ranostay Subject: [PATCH v2 2/3] iio: chemical: atlas-sensor: add DO-SM module support Date: Tue, 14 Jan 2020 04:23:47 +0200 Message-Id: <20200114022348.8676-3-matt.ranostay@konsulko.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200114022348.8676-1-matt.ranostay@konsulko.com> References: <20200114022348.8676-1-matt.ranostay@konsulko.com> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Atlas Scientific DO-SM OEM sensor reads disolved oxygen in a solution. This is reported back as mg/L which maps direc to ppm and so the IIO_CONCENTRATION channel type can be used. Signed-off-by: Matt Ranostay --- drivers/iio/chemical/atlas-sensor.c | 64 +++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 4 deletions(-) diff --git a/drivers/iio/chemical/atlas-sensor.c b/drivers/iio/chemical/atlas-sensor.c index 2e34c82cb65d..919d408869be 100644 --- a/drivers/iio/chemical/atlas-sensor.c +++ b/drivers/iio/chemical/atlas-sensor.c @@ -48,6 +48,11 @@ #define ATLAS_REG_EC_CALIB_STATUS_LOW BIT(2) #define ATLAS_REG_EC_CALIB_STATUS_HIGH BIT(3) +#define ATLAS_REG_DO_CALIB_STATUS 0x09 +#define ATLAS_REG_DO_CALIB_STATUS_MASK 0x03 +#define ATLAS_REG_DO_CALIB_STATUS_PRESSURE BIT(0) +#define ATLAS_REG_DO_CALIB_STATUS_DO BIT(1) + #define ATLAS_REG_PH_TEMP_DATA 0x0e #define ATLAS_REG_PH_DATA 0x16 @@ -60,14 +65,19 @@ #define ATLAS_REG_ORP_CALIB_STATUS 0x0d #define ATLAS_REG_ORP_DATA 0x0e +#define ATLAS_REG_DO_TEMP_DATA 0x12 +#define ATLAS_REG_DO_DATA 0x22 + #define ATLAS_PH_INT_TIME_IN_MS 450 #define ATLAS_EC_INT_TIME_IN_MS 650 #define ATLAS_ORP_INT_TIME_IN_MS 450 +#define ATLAS_DO_INT_TIME_IN_MS 450 enum { ATLAS_PH_SM, ATLAS_EC_SM, ATLAS_ORP_SM, + ATLAS_DO_SM, }; struct atlas_data { @@ -121,7 +131,7 @@ static const struct iio_chan_spec atlas_ph_channels[] = { }, }; -#define ATLAS_EC_CHANNEL(_idx, _addr) \ +#define ATLAS_CONCENTRATION_CHANNEL(_idx, _addr) \ {\ .type = IIO_CONCENTRATION, \ .indexed = 1, \ @@ -152,8 +162,8 @@ static const struct iio_chan_spec atlas_ec_channels[] = { .endianness = IIO_BE, }, }, - ATLAS_EC_CHANNEL(0, ATLAS_REG_TDS_DATA), - ATLAS_EC_CHANNEL(1, ATLAS_REG_PSS_DATA), + ATLAS_CONCENTRATION_CHANNEL(0, ATLAS_REG_TDS_DATA), + ATLAS_CONCENTRATION_CHANNEL(1, ATLAS_REG_PSS_DATA), IIO_CHAN_SOFT_TIMESTAMP(3), { .type = IIO_TEMP, @@ -182,6 +192,19 @@ static const struct iio_chan_spec atlas_orp_channels[] = { IIO_CHAN_SOFT_TIMESTAMP(1), }; +static const struct iio_chan_spec atlas_do_channels[] = { + ATLAS_CONCENTRATION_CHANNEL(0, ATLAS_REG_DO_DATA), + IIO_CHAN_SOFT_TIMESTAMP(1), + { + .type = IIO_TEMP, + .address = ATLAS_REG_DO_TEMP_DATA, + .info_mask_separate = + BIT(IIO_CHAN_INFO_RAW) | BIT(IIO_CHAN_INFO_SCALE), + .output = 1, + .scan_index = -1 + }, +}; + static int atlas_check_ph_calibration(struct atlas_data *data) { struct device *dev = &data->client->dev; @@ -262,7 +285,31 @@ static int atlas_check_orp_calibration(struct atlas_data *data) dev_warn(dev, "device has not been calibrated\n"); return 0; -}; +} + +static int atlas_check_do_calibration(struct atlas_data *data) +{ + struct device *dev = &data->client->dev; + int ret; + unsigned int val; + + ret = regmap_read(data->regmap, ATLAS_REG_DO_CALIB_STATUS, &val); + if (ret) + return ret; + + if (!(val & ATLAS_REG_DO_CALIB_STATUS_MASK)) { + dev_warn(dev, "device has not been calibrated\n"); + return 0; + } + + if (!(val & ATLAS_REG_DO_CALIB_STATUS_PRESSURE)) + dev_warn(dev, "device missing atmospheric pressure calibration\n"); + + if (!(val & ATLAS_REG_DO_CALIB_STATUS_DO)) + dev_warn(dev, "device missing dissolved oxygen calibration\n"); + + return 0; +} struct atlas_device { const struct iio_chan_spec *channels; @@ -295,6 +342,13 @@ static struct atlas_device atlas_devices[] = { .calibration = &atlas_check_orp_calibration, .delay = ATLAS_ORP_INT_TIME_IN_MS, }, + [ATLAS_DO_SM] = { + .channels = atlas_do_channels, + .num_channels = 3, + .data_reg = ATLAS_REG_DO_DATA, + .calibration = &atlas_check_do_calibration, + .delay = ATLAS_DO_INT_TIME_IN_MS, + }, }; static int atlas_set_powermode(struct atlas_data *data, int on) @@ -507,6 +561,7 @@ static const struct i2c_device_id atlas_id[] = { { "atlas-ph-sm", ATLAS_PH_SM}, { "atlas-ec-sm", ATLAS_EC_SM}, { "atlas-orp-sm", ATLAS_ORP_SM}, + { "atlas-do-sm", ATLAS_DO_SM}, {} }; MODULE_DEVICE_TABLE(i2c, atlas_id); @@ -515,6 +570,7 @@ static const struct of_device_id atlas_dt_ids[] = { { .compatible = "atlas,ph-sm", .data = (void *)ATLAS_PH_SM, }, { .compatible = "atlas,ec-sm", .data = (void *)ATLAS_EC_SM, }, { .compatible = "atlas,orp-sm", .data = (void *)ATLAS_ORP_SM, }, + { .compatible = "atlas,do-sm", .data = (void *)ATLAS_DO_SM, }, { } }; MODULE_DEVICE_TABLE(of, atlas_dt_ids); From patchwork Tue Jan 14 02:23:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Ranostay X-Patchwork-Id: 11331181 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3BC7B1820 for ; Tue, 14 Jan 2020 02:23:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1A62E21556 for ; Tue, 14 Jan 2020 02:23:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=konsulko.com header.i=@konsulko.com header.b="qn5SCN4f" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729522AbgANCX6 (ORCPT ); Mon, 13 Jan 2020 21:23:58 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:35963 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729524AbgANCX6 (ORCPT ); Mon, 13 Jan 2020 21:23:58 -0500 Received: by mail-lj1-f195.google.com with SMTP id r19so12492672ljg.3 for ; Mon, 13 Jan 2020 18:23:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RngI/Es/Qfv7y5Ge7m8PhS9bJ7Hxe1qMCW26BomnGME=; b=qn5SCN4fMCiZNKNEAzqKGBSqNtB2uYv50n4E1SwiNTULDbUQkIu4OCIVw05iOvI47S YH4Z/2y+6GA6UxKpq33TWGdmrwRbLjMelPgOKqp9PD/KzBW5jqGsCv/YYu4HuBCx/IHf 4MbnNrcv6POIZRGRIHsbw1UuYQugLOsl6SM4g= 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:mime-version:content-transfer-encoding; bh=RngI/Es/Qfv7y5Ge7m8PhS9bJ7Hxe1qMCW26BomnGME=; b=eSltu1pgZS6PJr8OEAg5BPAJTNDCFys9ckj7jjfBp+BLAMl0DsRRgGERUDBd9xDp3e B9BJ0ovGKRbALJTwrb1A/gtHlT3wKNBeYk4gRQ7ZmkJBk8ja/nR6Su5thd9EEM3jHtFi k5Dhiyzy+yImVAbRDpoPyNUysESfOOdfDrK74z0e5hF89eOQPDChKST2+mQwYaUsJmPY 082+SqeD9mfFtWe9AFefvWt4Qey4qbTgSl4pjSCFMi+588AsWAR+2GpvKvilcrd2QRYP qut1S8pcfcp+3POvHbN940fZETWxO878wkvEaD5EHrQefqsfZ1Tq99hDLzKsKU9zYBgK dvYQ== X-Gm-Message-State: APjAAAUBQqOSruZ3rIYsFcaIx7BfBgT7LAh5fRmIXpxGPyFQh8PjsgIm WqMZMgXb+wGJZIzUKRt/MAhq5Mlh0tfXGw== X-Google-Smtp-Source: APXvYqy/LSb0cXlg6ty01xizQCWD6n5uUy374gAm98qfcrY1LRH5rLurWFaxScs0giU6s9fJjSoB/Q== X-Received: by 2002:a2e:9804:: with SMTP id a4mr12254443ljj.10.1578968636292; Mon, 13 Jan 2020 18:23:56 -0800 (PST) Received: from taos.konsulko.bg (lan.nucleusys.com. [92.247.61.126]) by smtp.gmail.com with ESMTPSA id r26sm6388648lfm.82.2020.01.13.18.23.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2020 18:23:55 -0800 (PST) From: Matt Ranostay To: linux-iio@vger.kernel.org Cc: jic23@vger.kernel.org, Matt Ranostay , devicetree@vger.kernel.org Subject: [PATCH v2 3/3] dt-bindings: iio: chemical: consolidate atlas-sensor docs Date: Tue, 14 Jan 2020 04:23:48 +0200 Message-Id: <20200114022348.8676-4-matt.ranostay@konsulko.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200114022348.8676-1-matt.ranostay@konsulko.com> References: <20200114022348.8676-1-matt.ranostay@konsulko.com> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Since Atlas Scientific device support only varies from the compatible string is ideal all the respective docs are merged into a single doc named atlas,sensor.txt Cc: devicetree@vger.kernel.org Signed-off-by: Matt Ranostay --- .../bindings/iio/chemical/atlas,ec-sm.txt | 21 ------------ .../bindings/iio/chemical/atlas,orp-sm.txt | 21 ------------ .../bindings/iio/chemical/atlas,ph-sm.txt | 21 ------------ .../bindings/iio/chemical/atlas,sensor.txt | 34 +++++++++++++++++++ 4 files changed, 34 insertions(+), 63 deletions(-) delete mode 100644 Documentation/devicetree/bindings/iio/chemical/atlas,ec-sm.txt delete mode 100644 Documentation/devicetree/bindings/iio/chemical/atlas,orp-sm.txt delete mode 100644 Documentation/devicetree/bindings/iio/chemical/atlas,ph-sm.txt create mode 100644 Documentation/devicetree/bindings/iio/chemical/atlas,sensor.txt diff --git a/Documentation/devicetree/bindings/iio/chemical/atlas,ec-sm.txt b/Documentation/devicetree/bindings/iio/chemical/atlas,ec-sm.txt deleted file mode 100644 index f4320595b851..000000000000 --- a/Documentation/devicetree/bindings/iio/chemical/atlas,ec-sm.txt +++ /dev/null @@ -1,21 +0,0 @@ -* Atlas Scientific EC-SM OEM sensor - -http://www.atlas-scientific.com/_files/_datasheets/_oem/EC_oem_datasheet.pdf - -Required properties: - - - compatible: must be "atlas,ec-sm" - - reg: the I2C address of the sensor - - interrupts: the sole interrupt generated by the device - - Refer to interrupt-controller/interrupts.txt for generic interrupt client - node bindings. - -Example: - -atlas@64 { - compatible = "atlas,ec-sm"; - reg = <0x64>; - interrupt-parent = <&gpio1>; - interrupts = <16 2>; -}; diff --git a/Documentation/devicetree/bindings/iio/chemical/atlas,orp-sm.txt b/Documentation/devicetree/bindings/iio/chemical/atlas,orp-sm.txt deleted file mode 100644 index af1f5a9aa4da..000000000000 --- a/Documentation/devicetree/bindings/iio/chemical/atlas,orp-sm.txt +++ /dev/null @@ -1,21 +0,0 @@ -* Atlas Scientific ORP-SM OEM sensor - -https://www.atlas-scientific.com/_files/_datasheets/_oem/ORP_oem_datasheet.pdf - -Required properties: - - - compatible: must be "atlas,orp-sm" - - reg: the I2C address of the sensor - - interrupts: the sole interrupt generated by the device - - Refer to interrupt-controller/interrupts.txt for generic interrupt client - node bindings. - -Example: - -atlas@66 { - compatible = "atlas,orp-sm"; - reg = <0x66>; - interrupt-parent = <&gpio1>; - interrupts = <16 2>; -}; diff --git a/Documentation/devicetree/bindings/iio/chemical/atlas,ph-sm.txt b/Documentation/devicetree/bindings/iio/chemical/atlas,ph-sm.txt deleted file mode 100644 index 79d90f060327..000000000000 --- a/Documentation/devicetree/bindings/iio/chemical/atlas,ph-sm.txt +++ /dev/null @@ -1,21 +0,0 @@ -* Atlas Scientific pH-SM OEM sensor - -http://www.atlas-scientific.com/_files/_datasheets/_oem/pH_oem_datasheet.pdf - -Required properties: - - - compatible: must be "atlas,ph-sm" - - reg: the I2C address of the sensor - - interrupts: the sole interrupt generated by the device - - Refer to interrupt-controller/interrupts.txt for generic interrupt client - node bindings. - -Example: - -atlas@65 { - compatible = "atlas,ph-sm"; - reg = <0x65>; - interrupt-parent = <&gpio1>; - interrupts = <16 2>; -}; diff --git a/Documentation/devicetree/bindings/iio/chemical/atlas,sensor.txt b/Documentation/devicetree/bindings/iio/chemical/atlas,sensor.txt new file mode 100644 index 000000000000..518327dc71e2 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/chemical/atlas,sensor.txt @@ -0,0 +1,34 @@ +* Atlas Scientific OEM sensors + +Datasheets: + + http://www.atlas-scientific.com/_files/_datasheets/_oem/DO_oem_datasheet.pdf + http://www.atlas-scientific.com/_files/_datasheets/_oem/EC_oem_datasheet.pdf + http://www.atlas-scientific.com/_files/_datasheets/_oem/ORP_oem_datasheet.pdf + http://www.atlas-scientific.com/_files/_datasheets/_oem/pH_oem_datasheet.pdf + +Required properties: + + - compatible: must be one of : + "atlas,do-sm", + "atlas,ec-sm", + "atlas,orp-sm", + "atlas,ph-sm" + + - reg: the I2C address of the sensor + +Optional properties: + + - interrupts: the sole interrupt generated by the device + + Refer to interrupt-controller/interrupts.txt for generic interrupt client + node bindings. + +Example: + +atlas@66 { + compatible = "atlas,orp-sm"; + reg = <0x66>; + interrupt-parent = <&gpio1>; + interrupts = <16 2>; +};