aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorBo Shen <voice.shen@atmel.com>2013-01-11 15:08:31 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-12 00:00:33 +0000
commitea03c81521bde526570e1dec96eaa21fe5ac84a2 (patch)
treeb961b685dbb6ee5c8a8d93e1a55c373ee3885e29 /drivers/misc
parent544ae6b2e676c3c37fb8c93ef9327932fc2e5bc2 (diff)
ASoC: atmel-ssc: add pinctrl selection to driver
Add default pinctrl selection to atmel-ssc driver. The pinctrl is mandatory. Signed-off-by: Bo Shen <voice.shen@atmel.com> [nicolas.ferre@atmel.com: split dtsi and driver changes] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/atmel-ssc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
index 158da5a81a6..3c09cbb70b1 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) {