From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 298C2C61DA4 for ; Thu, 2 Feb 2023 08:11:01 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7955885ECB; Thu, 2 Feb 2023 09:10:00 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.b="pUfimaJf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7679185E40; Thu, 2 Feb 2023 09:08:35 +0100 (CET) Received: from mta-64-226.siemens.flowmailer.net (mta-64-226.siemens.flowmailer.net [185.136.64.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4405E85E40 for ; Thu, 2 Feb 2023 09:08:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jan.kiszka@siemens.com Received: by mta-64-226.siemens.flowmailer.net with ESMTPSA id 202302020808025797ea5b7b7fbb1338 for ; Thu, 02 Feb 2023 09:08:02 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=jan.kiszka@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:References:In-Reply-To; bh=OIpD5rEg/5WgAPTm4ZIkaKdlsjrhb5aoei3YwSQtu10=; b=pUfimaJffX7l/LTFCySqWxirfcZz55vsQ4gQtpmNDFUNUmyxVt21Y0mn+J+voQGVk06WDq pbu0/I0jQuA+yoSGQ4rbi8byEgCkhWAz1/pj0CP3eTNIENU7ghzSgJi8MOTudQqXknLwVkIn Uzq214Sl8r4ZJ3Sk4lNCKNQHJqYQY=; From: Jan Kiszka To: U-Boot Mailing List Subject: [PATCH V4 13/14] board: siemens: iot2050: use the named gpio to control the user-button Date: Thu, 2 Feb 2023 09:07:58 +0100 Message-Id: <667e6eff5ef358cbdf3e0d33db741196110a1938.1675325279.git.jan.kiszka@siemens.com> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: chao zeng User-button is controlled by the mcu domain gpio number 25. But main0 main1 mcu domain all have gpio number 25. To identify where the gpio is from, Using gpio controll base as the prefix to indicate the gpio resource. Signed-off-by: chao zeng --- board/siemens/iot2050/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c index 57d7009e8c7..2735ae3fb74 100644 --- a/board/siemens/iot2050/board.c +++ b/board/siemens/iot2050/board.c @@ -183,7 +183,7 @@ static bool user_button_pressed(void) memset(&gpio, 0, sizeof(gpio)); - if (dm_gpio_lookup_name("25", &gpio) < 0 || + if (dm_gpio_lookup_name("gpio@42110000_25", &gpio) < 0 || dm_gpio_request(&gpio, "USER button") < 0 || dm_gpio_set_dir_flags(&gpio, GPIOD_IS_IN) < 0) return false; -- 2.35.3