Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/808142/?format=api
{ "id": 808142, "url": "http://patchwork.ozlabs.org/api/patches/808142/?format=api", "web_url": "http://patchwork.ozlabs.org/project/devicetree-bindings/patch/E1dnLnk-0004fD-Mr@debutante/", "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": "<E1dnLnk-0004fD-Mr@debutante>", "list_archive_url": null, "date": "2017-08-31T09:30:16", "name": "Applied \"ASoC: tlv320aic3x: Support for OCMV configuration\" to the asoc tree", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": true, "hash": "03054c50cbff56e2178e3fa83a1e8142453123d8", "submitter": { "id": 24878, "url": "http://patchwork.ozlabs.org/api/people/24878/?format=api", "name": "Mark Brown", "email": "broonie@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/devicetree-bindings/patch/E1dnLnk-0004fD-Mr@debutante/mbox/", "series": [ { "id": 775, "url": "http://patchwork.ozlabs.org/api/series/775/?format=api", "web_url": "http://patchwork.ozlabs.org/project/devicetree-bindings/list/?series=775", "date": "2017-08-31T09:30:16", "name": "Applied \"ASoC: tlv320aic3x: Support for OCMV configuration\" to the asoc tree", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/775/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/808142/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/808142/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=sirena.org.uk header.i=@sirena.org.uk\n\theader.b=\"h+1dxmFK\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xjcYD0Xx0z9sRW\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 19:30:24 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1750942AbdHaJaW (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tThu, 31 Aug 2017 05:30:22 -0400", "from heliosphere.sirena.org.uk ([172.104.155.198]:33542 \"EHLO\n\theliosphere.sirena.org.uk\" rhost-flags-OK-OK-OK-OK) by\n\tvger.kernel.org with ESMTP id S1750930AbdHaJaV (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Thu, 31 Aug 2017 05:30:21 -0400", "from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3]\n\thelo=debutante) by heliosphere.sirena.org.uk with esmtpsa\n\t(TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89)\n\t(envelope-from <broonie@sirena.org.uk>)\n\tid 1dnLnl-0001MU-4m; Thu, 31 Aug 2017 09:30:17 +0000", "from broonie by debutante with local (Exim 4.89)\n\t(envelope-from <broonie@sirena.org.uk>)\n\tid 1dnLnk-0004fD-Mr; Thu, 31 Aug 2017 10:30:16 +0100" ], "DKIM-Signature": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=sirena.org.uk; s=20170815-heliosphere;\n\th=Date:Message-Id:In-Reply-To:\n\tSubject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References:\n\tList-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:\n\tList-Archive; bh=tFSq+PDTD21KnE6UA9slBxXKg9EGgnUoJ8D+KQ7kjL8=;\n\tb=h+1dxmFKDZpX\n\tR7tH0wkrjUnjbQRkK8DaZI6FQ2eF99ixYMFfmpcvjHxL5impZ6/tCUjnwQGDHnJig2tHjhcf4fK+f\n\tx2y6MhyXg67aruDX/MWqWEzhlLRBAiQBlIhhQuTLi3nEjk5qwP0MWwtc4LdmVW9+KTpsEZVAC02+g\n\t1sqMw=;", "From": "Mark Brown <broonie@kernel.org>", "To": "Peter Ujfalusi <peter.ujfalusi@ti.com>", "Cc": "Mark Brown <broonie@kernel.org>, broonie@kernel.org,\n\tlgirdwood@gmail.com, robh+dt@kernel.org,\n\tdevicetree@vger.kernel.org, alsa-devel@alsa-project.org,\n\talsa-devel@alsa-project.org", "Subject": "Applied \"ASoC: tlv320aic3x: Support for OCMV configuration\" to the\n\tasoc tree", "In-Reply-To": "<20170831084947.13793-1-peter.ujfalusi@ti.com>", "Message-Id": "<E1dnLnk-0004fD-Mr@debutante>", "Date": "Thu, 31 Aug 2017 10:30:16 +0100", "Sender": "devicetree-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<devicetree.vger.kernel.org>", "X-Mailing-List": "devicetree@vger.kernel.org" }, "content": "The patch\n\n ASoC: tlv320aic3x: Support for OCMV configuration\n\nhas been applied to the asoc tree at\n\n git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git \n\nAll being well this means that it will be integrated into the linux-next\ntree (usually sometime in the next 24 hours) and sent to Linus during\nthe next merge window (or sooner if it is a bug fix), however if\nproblems are discovered then the patch may be dropped or reverted. \n\nYou may get further e-mails resulting from automated or manual testing\nand review of the tree, please engage with people reporting problems and\nsend followup patches addressing any issues that are reported if needed.\n\nIf any updates are required or you are submitting further changes they\nshould be sent as incremental updates against current git, existing\npatches will not be replaced.\n\nPlease add any relevant lists and maintainers to the CCs when replying\nto this mail.\n\nThanks,\nMark\n\n>From 19b0fa11bb1c0c24296c9f670a37c091bd3c815d Mon Sep 17 00:00:00 2001\nFrom: Peter Ujfalusi <peter.ujfalusi@ti.com>\nDate: Thu, 31 Aug 2017 11:49:47 +0300\nSubject: [PATCH] ASoC: tlv320aic3x: Support for OCMV configuration\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\nIn 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>\nSigned-off-by: Mark Brown <broonie@kernel.org>\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 29bf8c81ae02..ca880859f0c3 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 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": [] }