From: Bo Shen <voice.shen@atmel.com>
To: broonie@opensource.wolfsonmicro.com, plagnioj@jcrosoft.com,
nicolas.ferre@atmel.com
Cc: linux-arm-kernel@lists.infradead.org,
devicetree-discuss@lists.ozlabs.org, linux-sound@vger.kernel.org,
alsa-devel@alsa-project.org, Bo Shen <voice.shen@atmel.com>
Subject: [Resend v6 PATCH 2/2] ASoC: atmel-ssc: add pinctrl consumer
Date: Fri, 16 Nov 2012 06:03:57 +0000 [thread overview]
Message-ID: <1353045837-19474-2-git-send-email-voice.shen@atmel.com> (raw)
In-Reply-To: <1353045837-19474-1-git-send-email-voice.shen@atmel.com>
Add pinctrl consumer for atmel ssc peripheral
Signed-off-by: Bo Shen <voice.shen@atmel.com>
---
Resend:
Split one patch into two.
- one add pinctrl nodes
- one add pinctrl consumer
---
drivers/misc/atmel-ssc.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
index a769719..3b3d0e0 100644
--- a/drivers/misc/atmel-ssc.c
+++ b/drivers/misc/atmel-ssc.c
@@ -19,6 +19,7 @@
#include <linux/module.h>
#include <linux/of.h>
+#include <linux/pinctrl/consumer.h>
/* Serialize access to ssc_list and user count */
static DEFINE_SPINLOCK(user_lock);
@@ -131,6 +132,13 @@ static int ssc_probe(struct platform_device *pdev)
struct resource *regs;
struct ssc_device *ssc;
const struct atmel_ssc_platform_data *plat_dat;
+ struct pinctrl *pinctrl;
+
+ pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+ if (IS_ERR(pinctrl)) {
+ dev_err(&pdev->dev, "Failed to request pinctrl\n");
+ return PTR_ERR(pinctrl);
+ }
ssc = devm_kzalloc(&pdev->dev, sizeof(struct ssc_device), GFP_KERNEL);
if (!ssc) {
--
1.7.9.5
next prev parent reply other threads:[~2012-11-16 6:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-16 6:03 [Resend v6 PATCH 1/2] ARM: at91: atmel-ssc: add pinctrl nodes Bo Shen
2012-11-16 6:03 ` Bo Shen [this message]
2012-11-16 6:12 ` [Resend v6 PATCH 2/2] ASoC: atmel-ssc: add pinctrl consumer Mark Brown
2012-11-16 6:33 ` Bo Shen
2012-11-16 6:41 ` Mark Brown
2012-11-16 6:59 ` Bo Shen
2012-11-20 9:31 ` Bo Shen
2012-11-20 10:27 ` Mark Brown
2012-11-21 1:43 ` Bo Shen
2012-11-21 1:46 ` Mark Brown
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=1353045837-19474-2-git-send-email-voice.shen@atmel.com \
--to=voice.shen@atmel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=plagnioj@jcrosoft.com \
/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