Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933386Ab3CRWGu (ORCPT ); Mon, 18 Mar 2013 18:06:50 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:47808 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754479Ab3CRWGr (ORCPT ); Mon, 18 Mar 2013 18:06:47 -0400 X-Sasl-enc: yRS1kHPv6/NZrSui4xgQeQ1y/zvZeoTjgGdI70lJHZHa 1363644406 From: Alan Ott To: linux-zigbee-devel@lists.sourceforge.net, netdev@vger.kernel.org Cc: Alexander Smirnov , Dmitry Eremin-Solenikov , linux-kernel@vger.kernel.org, Alan Ott Subject: [PATCH 1/4] mrf24j40: pinctrl support Date: Mon, 18 Mar 2013 18:06:40 -0400 Message-Id: <1363644403-11003-2-git-send-email-alan@signal11.us> X-Mailer: git-send-email 1.7.11.2 In-Reply-To: <1363644403-11003-1-git-send-email-alan@signal11.us> References: <1363644403-11003-1-git-send-email-alan@signal11.us> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1482 Lines: 47 Activate pinctrl settings when used with a DT system. Signed-off-by: Alan Ott --- drivers/net/ieee802154/mrf24j40.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c index 3f2c7aa..3106895 100644 --- a/drivers/net/ieee802154/mrf24j40.c +++ b/drivers/net/ieee802154/mrf24j40.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -623,6 +624,7 @@ static int mrf24j40_probe(struct spi_device *spi) int ret = -ENOMEM; u8 val; struct mrf24j40 *devrec; + struct pinctrl *pinctrl; printk(KERN_INFO "mrf24j40: probe(). IRQ: %d\n", spi->irq); @@ -633,6 +635,11 @@ static int mrf24j40_probe(struct spi_device *spi) if (!devrec->buf) goto err_buf; + pinctrl = devm_pinctrl_get_select_default(&spi->dev); + if (IS_ERR(pinctrl)) + dev_warn(&spi->dev, + "pinctrl pins are not configured from the driver"); + spi->mode = SPI_MODE_0; /* TODO: Is this appropriate for right here? */ if (spi->max_speed_hz > MAX_SPI_SPEED_HZ) spi->max_speed_hz = MAX_SPI_SPEED_HZ; -- 1.7.11.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/