From patchwork Thu Mar 7 13:49:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13585704 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D66FDC54798 for ; Thu, 7 Mar 2024 13:51:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2NQt5gTc2bLxGZj72Tu0bq8G4X8UebGiX4U8+DPcTLw=; b=2OsqNKW6k+0hZm y2nixv38k3zgzV6sGPKnSjNux5a/h+OjqV4o8buSrMyfzY/VuKAOxrTW96xqDvGwPdsjikoe38HJz h7ED5Pjf7ZtRuRuR6DWxb0nd1fBv1lLxkqYEUnWGdcCo8ZUhyj+8ac43gRs0TfjP4VcK3U2Mjp9BY 3jcO+H3wf2a46SjqIIjvcvkHDpIgQOsaMYgs+jG2nIQE7POOjJ12/sfvJyLTqibvBE0FfLJbvvzM/ H4EWqSwzLU7rZZE3TmyL/gRP+7A4MDLOPZtOdfMtlrThiBg0kbCLR7lrUCCW+rSVpUY2QWs8d9dUZ plCZzKkWx76GFm3L7Imw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1riE9d-00000004s1F-2HRb; Thu, 07 Mar 2024 13:51:25 +0000 Received: from mgamail.intel.com ([198.175.65.9]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1riE9Z-00000004rw4-0nT1 for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2024 13:51:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709819481; x=1741355481; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ygVU4Yd+yAg3WNCryrpv6ThnAM7OpsqhmDWwhxQC6j4=; b=Z9kskp3ET8G1abFktIME2MC6PbmvbDklcKcKRMD9zJXGvl+UR4aALaTf li1VTouLzDqh24TEDZy2kIRuo+8J4C5b9XAdAi+r0RQZZ0TlUXuXQYgpg AMy6nwDCxulYKcPHr4N8HO1932PwY1iwUB5UBpfEp/aL09I2HmwBLxuW/ ryVaGPWBmaKGd+jNcyTz8RnA5Xe+MiAAKIp/ppdR+p/1o/9Xn0h3ASqFR URAuqfLHUWEs9X/ncRJZ9ld2IMuunCaxmIiBtk8Q9VRbyff05A2wz40rA dMcfLb5Hee7I67CqzX9hOa76pgaa6SukJTpjZA1yiZM8q86nWtqSKcUrX A==; X-IronPort-AV: E=McAfee;i="6600,9927,11005"; a="26960338" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="26960338" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 05:51:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11005"; a="937046160" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="937046160" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 07 Mar 2024 05:51:12 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 052F23C0; Thu, 7 Mar 2024 15:51:10 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Linus Walleij , Bartosz Golaszewski , Jonathan Corbet , Alex Shi , Yanteng Si , Hu Haowen <2023002089@link.tyut.edu.cn>, Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King Subject: [PATCH v1 1/3] ARM: pxa: spitz: Open code gpio_request_array() Date: Thu, 7 Mar 2024 15:49:03 +0200 Message-ID: <20240307135109.3778316-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240307135109.3778316-1-andriy.shevchenko@linux.intel.com> References: <20240307135109.3778316-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240307_055121_335221_8D1026F3 X-CRM114-Status: GOOD ( 13.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In order to prerare for removal of gpio_request_array(), open code the latter. Note, we are not using gpio_request_one() as it's also deprecated, hence reducing legacy API usage to the very basic ones. Signed-off-by: Andy Shevchenko --- arch/arm/mach-pxa/spitz_pm.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c index 8bc4ea51a0c1..03b4b347f11a 100644 --- a/arch/arm/mach-pxa/spitz_pm.c +++ b/arch/arm/mach-pxa/spitz_pm.c @@ -35,18 +35,20 @@ static int spitz_last_ac_status; -static struct gpio spitz_charger_gpios[] = { - { SPITZ_GPIO_KEY_INT, GPIOF_IN, "Keyboard Interrupt" }, - { SPITZ_GPIO_SYNC, GPIOF_IN, "Sync" }, - { SPITZ_GPIO_AC_IN, GPIOF_IN, "Charger Detection" }, - { SPITZ_GPIO_ADC_TEMP_ON, GPIOF_OUT_INIT_LOW, "ADC Temp On" }, - { SPITZ_GPIO_JK_B, GPIOF_OUT_INIT_LOW, "JK B" }, - { SPITZ_GPIO_CHRG_ON, GPIOF_OUT_INIT_LOW, "Charger On" }, -}; - static void spitz_charger_init(void) { - gpio_request_array(ARRAY_AND_SIZE(spitz_charger_gpios)); + gpio_request(SPITZ_GPIO_KEY_INT, "Keyboard Interrupt"); + gpio_direction_input(SPITZ_GPIO_KEY_INT); + gpio_request(SPITZ_GPIO_SYNC, "Sync"); + gpio_direction_input(SPITZ_GPIO_SYNC); + gpio_request(SPITZ_GPIO_AC_IN, "Charger Detection"); + gpio_direction_input(SPITZ_GPIO_AC_IN); + gpio_request(SPITZ_GPIO_ADC_TEMP_ON, "ADC Temp On"); + gpio_direction_output(SPITZ_GPIO_ADC_TEMP_ON, 0); + gpio_request(SPITZ_GPIO_JK_B, "JK B"); + gpio_direction_output(SPITZ_GPIO_JK_B, 0); + gpio_request(SPITZ_GPIO_CHRG_ON, "Charger On"); + gpio_direction_output(SPITZ_GPIO_CHRG_ON, 0); } static void spitz_measure_temp(int on)