From: Anthony Brandon <anthony@amarulasolutions.com>
To: robh+dt@kernel.org, mark.rutland@arm.com, lee.jones@linaro.org,
patches@opensource.cirrus.com, ckeepax@opensource.cirrus.com,
alberto@amarulasolutions.com, devicetree@vger.kernel.org
Cc: Anthony Brandon <anthony@amarulasolutions.com>
Subject: [PATCH v2 4/4] mfd: wm8994: Allow to configure CS/ADDR Pulldown from dts
Date: Mon, 9 Jul 2018 19:46:46 +0200 [thread overview]
Message-ID: <1531158406-18646-4-git-send-email-anthony@amarulasolutions.com> (raw)
In-Reply-To: <1531158406-18646-1-git-send-email-anthony@amarulasolutions.com>
From: Alberto Panizzo <alberto@amarulasolutions.com>
For designs where CS/ADDR pin is floating, it is useful to
allow dts to define whether to keep internal pull down or not.
Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com>
Signed-off-by: Anthony Brandon <anthony@amarulasolutions.com>
---
drivers/mfd/wm8994-core.c | 4 ++++
include/linux/mfd/wm8994/pdata.h | 6 ++++++
2 files changed, 10 insertions(+)
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index fa4b1b7..22bd652 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -304,6 +304,8 @@ static int wm8994_set_pdata_from_of(struct wm8994 *wm8994)
pdata->spkmode_pu = of_property_read_bool(np, "wlf,spkmode-pu");
+ pdata->csnaddr_pd = of_property_read_bool(np, "wlf,csnaddr-pd");
+
pdata->ldo[0].enable = of_get_named_gpio(np, "wlf,ldo1ena", 0);
if (pdata->ldo[0].enable < 0)
pdata->ldo[0].enable = 0;
@@ -562,6 +564,8 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
if (pdata->spkmode_pu)
pulls |= WM8994_SPKMODE_PU;
+ if (pdata->csnaddr_pd)
+ pulls |= WM8994_CSNADDR_PD;
/* Disable unneeded pulls */
wm8994_set_bits(wm8994, WM8994_PULL_CONTROL_2,
diff --git a/include/linux/mfd/wm8994/pdata.h b/include/linux/mfd/wm8994/pdata.h
index 90c6052..b19c370 100644
--- a/include/linux/mfd/wm8994/pdata.h
+++ b/include/linux/mfd/wm8994/pdata.h
@@ -222,6 +222,12 @@ struct wm8994_pdata {
*/
bool spkmode_pu;
+ /*
+ * CS/ADDR must be pulled internally by the device on this
+ * system.
+ */
+ bool csnaddr_pd;
+
/**
* Maximum number of channels clocks will be generated for,
* useful for systems where and I2S bus with multiple data
--
2.7.4
next prev parent reply other threads:[~2018-07-09 17:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180709160631.GU18740@imbe.wolfsonmicro.main>
2018-07-09 17:46 ` [PATCH v2 1/4] dt-bindings: sound: wm8994: document wlf,spkmode-pu property Anthony Brandon
2018-07-09 17:46 ` [PATCH v2 2/4] mfd: wm8994: Allow to configure Speaker Mode Pullup from dts Anthony Brandon
2018-07-10 8:12 ` Charles Keepax
2018-07-13 7:38 ` Lee Jones
2018-07-09 17:46 ` [PATCH v2 3/4] dt-bindings: sound: wm8994: document wlf,csnaddr-pd property Anthony Brandon
2018-07-10 8:12 ` Charles Keepax
2018-07-11 19:14 ` Rob Herring
2018-07-09 17:46 ` Anthony Brandon [this message]
2018-07-10 8:13 ` [PATCH v2 4/4] mfd: wm8994: Allow to configure CS/ADDR Pulldown from dts Charles Keepax
2018-07-13 7:38 ` Lee Jones
2018-07-10 8:12 ` [PATCH v2 1/4] dt-bindings: sound: wm8994: document wlf,spkmode-pu property Charles Keepax
2018-07-11 19:13 ` Rob Herring
2018-07-16 15:43 ` Anthony Brandon
2018-07-16 16:27 ` Rob Herring
2018-07-16 18:44 ` Anthony Brandon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1531158406-18646-4-git-send-email-anthony@amarulasolutions.com \
--to=anthony@amarulasolutions.com \
--cc=alberto@amarulasolutions.com \
--cc=ckeepax@opensource.cirrus.com \
--cc=devicetree@vger.kernel.org \
--cc=lee.jones@linaro.org \
--cc=mark.rutland@arm.com \
--cc=patches@opensource.cirrus.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).