get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/808140/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 808140,
    "url": "http://patchwork.ozlabs.org/api/patches/808140/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/devicetree-bindings/patch/20170831084947.13793-1-peter.ujfalusi@ti.com/",
    "project": {
        "id": 37,
        "url": "http://patchwork.ozlabs.org/api/projects/37/?format=api",
        "name": "Devicetree Bindings",
        "link_name": "devicetree-bindings",
        "list_id": "devicetree.vger.kernel.org",
        "list_email": "devicetree@vger.kernel.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170831084947.13793-1-peter.ujfalusi@ti.com>",
    "list_archive_url": null,
    "date": "2017-08-31T08:49:47",
    "name": "[v2] ASoC: tlv320aic3x: Support for OCMV configuration",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "03054c50cbff56e2178e3fa83a1e8142453123d8",
    "submitter": {
        "id": 9142,
        "url": "http://patchwork.ozlabs.org/api/people/9142/?format=api",
        "name": "Peter Ujfalusi",
        "email": "peter.ujfalusi@ti.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/devicetree-bindings/patch/20170831084947.13793-1-peter.ujfalusi@ti.com/mbox/",
    "series": [
        {
            "id": 773,
            "url": "http://patchwork.ozlabs.org/api/series/773/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/devicetree-bindings/list/?series=773",
            "date": "2017-08-31T08:49:47",
            "name": "[v2] ASoC: tlv320aic3x: Support for OCMV configuration",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/773/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/808140/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/808140/checks/",
    "tags": {},
    "related": [],
    "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>)",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ti.com header.i=@ti.com header.b=\"AMXSvlFG\"; \n\tdkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xjbf61qMRz9t2M\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 18:49:34 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1750816AbdHaItc (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tThu, 31 Aug 2017 04:49:32 -0400",
            "from lelnx193.ext.ti.com ([198.47.27.77]:36275 \"EHLO\n\tlelnx193.ext.ti.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1750790AbdHaItb (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Thu, 31 Aug 2017 04:49:31 -0400",
            "from dflxv15.itg.ti.com ([128.247.5.124])\n\tby lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v7V8nPuZ004010; \n\tThu, 31 Aug 2017 03:49:25 -0500",
            "from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24])\n\tby dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v7V8nPfu004607;\n\tThu, 31 Aug 2017 03:49:25 -0500",
            "from DFLE104.ent.ti.com (10.64.6.25) by DFLE103.ent.ti.com\n\t(10.64.6.24) with Microsoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34;\n\tThu, 31 Aug 2017 03:49:25 -0500",
            "from dflp33.itg.ti.com (10.64.6.16) by DFLE104.ent.ti.com\n\t(10.64.6.25) with Microsoft SMTP Server (version=TLS1_0,\n\tcipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend\n\tTransport; Thu, 31 Aug 2017 03:49:25 -0500",
            "from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153])\n\tby dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v7V8nNVr028934; \n\tThu, 31 Aug 2017 03:49:24 -0500"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com;\n\ts=ti-com-17Q1; t=1504169365;\n\tbh=NNEtr0MM55zxU2r98Nd9F9S4gYR1aPOQt70EcKmK/To=;\n\th=From:To:CC:Subject:Date;\n\tb=AMXSvlFGVCZ7ri1f+XKD7CkXj/t43T7BDqdv3aBghEJ5YOXKBJ7iIDSvcVYwVlKou\n\tYyC/fjJr6eK/kLej1hHMWSJLlhV543nBnx6HGmxr6Ewl+nEjui/IiQuqS9iEWVgR4B\n\ttN5nrPHb81G2ESXZVRhgyA0Rd0aXOa40tOB+cvxM=",
        "From": "Peter Ujfalusi <peter.ujfalusi@ti.com>",
        "To": "<broonie@kernel.org>, <lgirdwood@gmail.com>, <robh+dt@kernel.org>",
        "CC": "<alsa-devel@alsa-project.org>, <devicetree@vger.kernel.org>",
        "Subject": "[PATCH v2] ASoC: tlv320aic3x: Support for OCMV configuration",
        "Date": "Thu, 31 Aug 2017 11:49:47 +0300",
        "Message-ID": "<20170831084947.13793-1-peter.ujfalusi@ti.com>",
        "X-Mailer": "git-send-email 2.14.1",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "quoted-printable",
        "X-EXCLAIMER-MD-CONFIG": "e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180",
        "Sender": "devicetree-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<devicetree.vger.kernel.org>",
        "X-Mailing-List": "devicetree@vger.kernel.org"
    },
    "content": "In aic3x class of devices Output Common-Mode Voltage can be configured for\nbetter analog performance.\nThe OCMV value depends on the Analog and digital domain power supply\nvoltage configuration.\n\nThe default OCMV of 1.35V gives best performance when AVDD is around 2.7V\nand DVDD is 1.525V, but for higher AVDD/DVDD higher OCMV setting is\nrecommended.\n\nThe patch gives an automatic way of guessing the best OCMV which can be\noverwritten by a DT parameter if needed.\n\nSigned-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>\n---\nHi,\n\nChange since v1:\n- Correction for the lower supported voltage range (when OCMV would be set to\n  1.35V)\n\nRegards,\nPeter\n \n .../devicetree/bindings/sound/tlv320aic3x.txt      |  5 +++\n sound/soc/codecs/tlv320aic3x.c                     | 45 ++++++++++++++++++++++\n sound/soc/codecs/tlv320aic3x.h                     |  8 ++++\n 3 files changed, 58 insertions(+)",
    "diff": "diff --git a/Documentation/devicetree/bindings/sound/tlv320aic3x.txt b/Documentation/devicetree/bindings/sound/tlv320aic3x.txt\nindex 47a213c411ce..ba5b45c483f5 100644\n--- a/Documentation/devicetree/bindings/sound/tlv320aic3x.txt\n+++ b/Documentation/devicetree/bindings/sound/tlv320aic3x.txt\n@@ -26,6 +26,11 @@ Optional properties:\n \t3 - MICBIAS output is connected to AVDD,\n \tIf this node is not mentioned or if the value is incorrect, then MicBias\n \tis powered down.\n+- ai3x-ocmv - Output Common-Mode Voltage selection:\n+\t0 - 1.35V,\n+\t1 - 1.5V,\n+\t2 - 1.65V,\n+\t3 - 1.8V\n - AVDD-supply, IOVDD-supply, DRVDD-supply, DVDD-supply : power supplies for the\n   device as covered in Documentation/devicetree/bindings/regulator/regulator.txt\n \ndiff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c\nindex 405f4602888a..06f92571eba4 100644\n--- a/sound/soc/codecs/tlv320aic3x.c\n+++ b/sound/soc/codecs/tlv320aic3x.c\n@@ -93,6 +93,8 @@ struct aic3x_priv {\n \n \t/* Selects the micbias voltage */\n \tenum aic3x_micbias_voltage micbias_vg;\n+\t/* Output Common-Mode Voltage */\n+\tu8 ocmv;\n };\n \n static const struct reg_default aic3x_reg[] = {\n@@ -1572,6 +1574,10 @@ static int aic3x_init(struct snd_soc_codec *codec)\n \t\tbreak;\n \t}\n \n+\t/*  Output common-mode voltage = 1.5 V */\n+\tsnd_soc_update_bits(codec, HPOUT_SC, HPOUT_SC_OCMV_MASK,\n+\t\t\t    aic3x->ocmv << HPOUT_SC_OCMV_SHIFT);\n+\n \treturn 0;\n }\n \n@@ -1699,6 +1705,43 @@ static const struct snd_soc_codec_driver soc_codec_dev_aic3x = {\n \t},\n };\n \n+static void aic3x_configure_ocmv(struct i2c_client *client)\n+{\n+\tstruct device_node *np = client->dev.of_node;\n+\tstruct aic3x_priv *aic3x = i2c_get_clientdata(client);\n+\tu32 value;\n+\tint dvdd, avdd;\n+\n+\tif (np && !of_property_read_u32(np, \"ai3x-ocmv\", &value)) {\n+\t\t/* OCMV setting is forced by DT */\n+\t\tif (value <= 3) {\n+\t\t\taic3x->ocmv = value;\n+\t\t\treturn;\n+\t\t}\n+\t}\n+\n+\tdvdd = regulator_get_voltage(aic3x->supplies[1].consumer);\n+\tavdd = regulator_get_voltage(aic3x->supplies[2].consumer);\n+\n+\tif (avdd > 3600000 || dvdd > 1950000) {\n+\t\tdev_warn(&client->dev,\n+\t\t\t \"Too high supply voltage(s) AVDD: %d, DVDD: %d\\n\",\n+\t\t\t avdd, dvdd);\n+\t} else if (avdd == 3600000 && dvdd == 1950000) {\n+\t\taic3x->ocmv = HPOUT_SC_OCMV_1_8V;\n+\t} else if (avdd > 3300000 && dvdd > 1800000) {\n+\t\taic3x->ocmv = HPOUT_SC_OCMV_1_65V;\n+\t} else if (avdd > 3000000 && dvdd > 1650000) {\n+\t\taic3x->ocmv = HPOUT_SC_OCMV_1_5V;\n+\t} else if (avdd >= 2700000 && dvdd >= 1525000) {\n+\t\taic3x->ocmv = HPOUT_SC_OCMV_1_35V;\n+\t} else {\n+\t\tdev_warn(&client->dev,\n+\t\t\t \"Invalid supply voltage(s) AVDD: %d, DVDD: %d\\n\",\n+\t\t\t avdd, dvdd);\n+\t}\n+}\n+\n /*\n  * AIC3X 2 wire address can be up to 4 devices with device addresses\n  * 0x18, 0x19, 0x1A, 0x1B\n@@ -1816,6 +1859,8 @@ static int aic3x_i2c_probe(struct i2c_client *i2c,\n \t\tgoto err_gpio;\n \t}\n \n+\taic3x_configure_ocmv(i2c);\n+\n \tif (aic3x->model == AIC3X_MODEL_3007) {\n \t\tret = regmap_register_patch(aic3x->regmap, aic3007_class_d,\n \t\t\t\t\t    ARRAY_SIZE(aic3007_class_d));\ndiff --git a/sound/soc/codecs/tlv320aic3x.h b/sound/soc/codecs/tlv320aic3x.h\nindex 89fa692df206..34c35196aa0d 100644\n--- a/sound/soc/codecs/tlv320aic3x.h\n+++ b/sound/soc/codecs/tlv320aic3x.h\n@@ -243,6 +243,14 @@\n #define MICBIAS_LEVEL_SHIFT\t(6)\n #define MICBIAS_LEVEL_MASK\t(3 << 6)\n \n+/* HPOUT_SC */\n+#define HPOUT_SC_OCMV_MASK\t(3 << 6)\n+#define HPOUT_SC_OCMV_SHIFT\t(6)\n+#define HPOUT_SC_OCMV_1_35V\t0\n+#define HPOUT_SC_OCMV_1_5V\t1\n+#define HPOUT_SC_OCMV_1_65V\t2\n+#define HPOUT_SC_OCMV_1_8V\t3\n+\n /* headset detection / button API */\n \n /* The AIC3x supports detection of stereo headsets (GND + left + right signal)\n",
    "prefixes": [
        "v2"
    ]
}