All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Robinson <pbrobinson@gmail.com>
To: Stefano Babic <sbabic@denx.de>,
	Fabio Estevam <festevam@gmail.com>,
	Breno Lima <breno.lima@nxp.com>,
	Francesco Montefoschi <francesco.montefoschi@udoo.org>,
	u-boot@lists.denx.de
Cc: Peter Robinson <pbrobinson@gmail.com>
Subject: [PATCH 1/4] udoo_neo: Call gpio_request()
Date: Tue, 21 Dec 2021 12:32:46 +0000	[thread overview]
Message-ID: <20211221123249.455347-1-pbrobinson@gmail.com> (raw)

Calling gpio_request() prior to its usage is now mandatory.

This fixes the following GPIO errors:
gpio@20a8000: set_dir_flags: error: gpio GPIO4_16 not reserved
gpio@20a8000: set_dir_flags: error: gpio GPIO4_13 not reserved
gpio@20a8000: set_dir_flags: error: gpio GPIO4_0 not reserved
gpio@20a8000: get_value: error: gpio GPIO4_13 not reserved
gpio@20a8000: get_value: error: gpio GPIO4_0 not reserved
gpio@20a0000: set_dir_flags: error: gpio GPIO2_1 not reserved
gpio@20a0000: set_value: error: gpio GPIO2_1 not reserved

Fixes: 191840ae99 ("ARM: imx: udoo_neo: Enable OF_CONTROL and DM gpio/pin control")
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
 board/udoo/neo/neo.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c
index ce005d31cc..61195be744 100644
--- a/board/udoo/neo/neo.c
+++ b/board/udoo/neo/neo.c
@@ -249,6 +249,7 @@ static int setup_fec(void)
 					 ARRAY_SIZE(phy_control_pads));
 
 	/* Reset PHY */
+	gpio_request(IMX_GPIO_NR(2, 1), "enet_rst");
 	gpio_direction_output(IMX_GPIO_NR(2, 1) , 0);
 	udelay(10000);
 	gpio_set_value(IMX_GPIO_NR(2, 1), 1);
@@ -280,6 +281,7 @@ int board_init(void)
 					 ARRAY_SIZE(peri_3v3_pads));
 
 	/* Active high for ncp692 */
+	gpio_request(IMX_GPIO_NR(4, 16), "ncp692");
 	gpio_direction_output(IMX_GPIO_NR(4, 16) , 1);
 
 #ifdef CONFIG_SYS_I2C_MXC
@@ -296,6 +298,8 @@ static int get_board_value(void)
 	imx_iomux_v3_setup_multiple_pads(board_recognition_pads,
 					 ARRAY_SIZE(board_recognition_pads));
 
+	gpio_request(IMX_GPIO_NR(4, 13), "r184");
+	gpio_request(IMX_GPIO_NR(4, 0), "r185");
 	gpio_direction_input(IMX_GPIO_NR(4, 13));
 	gpio_direction_input(IMX_GPIO_NR(4, 0));
 
-- 
2.33.1


             reply	other threads:[~2021-12-21 12:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-21 12:32 Peter Robinson [this message]
2021-12-21 12:32 ` [PATCH 2/4] udoo_neo: Fixes for booting from the mSD card Peter Robinson
2021-12-21 13:37   ` Fabio Estevam
2022-01-07 17:02   ` Tom Rini
2021-12-21 12:32 ` [PATCH 3/4] udoo_neo: Fix ethernet Peter Robinson
2021-12-21 13:38   ` Fabio Estevam
2022-01-07 17:02   ` Tom Rini
2021-12-21 12:32 ` [PATCH 4/4] udoo_neo: Enable support for USB and storage Peter Robinson
2021-12-21 13:38   ` Fabio Estevam
2022-01-07 17:02   ` Tom Rini
2021-12-21 13:37 ` [PATCH 1/4] udoo_neo: Call gpio_request() Fabio Estevam
2022-01-07 17:02 ` Tom Rini

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=20211221123249.455347-1-pbrobinson@gmail.com \
    --to=pbrobinson@gmail.com \
    --cc=breno.lima@nxp.com \
    --cc=festevam@gmail.com \
    --cc=francesco.montefoschi@udoo.org \
    --cc=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.