From nobody Sat Jul 25 16:44:51 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5841947ECDE; Wed, 15 Jul 2026 18:51:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784141490; cv=none; b=mCDv3ekumAmlGQe83bEfr7xmnhomgdEdid+GnSysmGIrgOyJ9C3ItXYa3RzZApwZB0d2ufNQ67MRzvoJQz/rJZ94GlkXULsO8wpuBUoCE7kLgh1XWHa3x5hijG8L6Yk+k2lmtcWDfmEzg0FmyysbRKlz+bYBvTPr55hYtl5V7yM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784141490; c=relaxed/simple; bh=JwEf2B0/taqBgVcAFv7SQawwrLtkBIODJnPpyfPpuQ8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ovdHxw7MJ4/GQzRtkINi8ltiXiabzmmRZSIeMRhAFJL5n3jPTZVCh0XpJt1g4XAeaC4UpKTJOkNAMxJdsc0ojGZuVHe5ch43ke5yiLW1sr/1CEbq10KM4i7jk7pDqVPz+abR/qC7MuBaa4oo4CkKi/Ua9M2v09mVr9Ajys1rQqk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=mh5SFI97; arc=none smtp.client-ip=198.175.65.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="mh5SFI97" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1784141487; x=1815677487; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JwEf2B0/taqBgVcAFv7SQawwrLtkBIODJnPpyfPpuQ8=; b=mh5SFI97wR9LCkSQ922XRECL58IiQ+7v7z0qtyZ2LePiUO6jcEEr9pbw IKxtYrXv7xZctGCzHzp8r0lGEOT8J77jZLN8qnreMUPBnV3+FUFFupT4y HgIXAQyWmiRSDZHM1RKccfalqVh/IYo6h5tw6KdkrakNu0XaZ6v9RlagS jIbAbOmKnjEjZX/jE9g4xnYcwdpYZy1UvbojBuaWKN8yT5ZCLNVPIJY2/ IbAtotr+0dPQ0lAl0wkUhnMLswA/4EEVSx7uwzxtTxwykR5Gb/IfpM05G CIo3BVv8W8Jm8MrU4/UYQK91ZyNYxl90LQDbeZg0bUg6v+tuHHVFAsAVh Q==; X-CSE-ConnectionGUID: 611ZIsu0SL+2nAM2L619ZQ== X-CSE-MsgGUID: vY3Z5qKtTqekt+QaST2Fwg== X-IronPort-AV: E=McAfee;i="6800,10657,11847"; a="84887495" X-IronPort-AV: E=Sophos;i="6.25,166,1779174000"; d="scan'208";a="84887495" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2026 11:51:21 -0700 X-CSE-ConnectionGUID: OrV9bNQNTGWJhH0jJhKgFg== X-CSE-MsgGUID: 8rEnzpPOQHC01JImubDiYg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,166,1779174000"; d="scan'208";a="280700292" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa001.fm.intel.com with ESMTP; 15 Jul 2026 11:51:17 -0700 Received: by black.igk.intel.com (Postfix, from userid 1003) id EA4F198; Wed, 15 Jul 2026 20:51:15 +0200 (CEST) From: Andy Shevchenko To: Andy Shevchenko , Bradford Love , linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-media@vger.kernel.org Cc: Linus Walleij , Bartosz Golaszewski , Jonathan Corbet , Shuah Khan , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Hauke Mehrtens , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Thomas Bogendoerfer , Mauro Carvalho Chehab Subject: [PATCH v1 1/7] ARM: pxa: spitz: Open code gpio_request_one() Date: Wed, 15 Jul 2026 20:46:41 +0200 Message-ID: <20260715185112.1323510-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260715185112.1323510-1-andriy.shevchenko@linux.intel.com> References: <20260715185112.1323510-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Open code the gpio_request_one() call to be able to kill that API in the follow changes. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij --- arch/arm/mach-pxa/spitz_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c index 03b4b347f11a..f46a3fb7e07c 100644 --- a/arch/arm/mach-pxa/spitz_pm.c +++ b/arch/arm/mach-pxa/spitz_pm.c @@ -108,7 +108,8 @@ static void spitz_presuspend(void) PGSR2 |=3D GPIO_bit(SPITZ_GPIO_KEY_STROBE0); =20 pxa2xx_mfp_config(&gpio18_config, 1); - gpio_request_one(18, GPIOF_OUT_INIT_HIGH, "Unknown"); + gpio_request(18, "Unknown"); + gpio_direction_output(18, 1); gpio_free(18); =20 PRER =3D GPIO_bit(SPITZ_GPIO_KEY_INT); --=20 2.50.1 From nobody Sat Jul 25 16:44:51 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3FC5B494A0B; Wed, 15 Jul 2026 18:51:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784141493; cv=none; b=Er3hSLNAvXCj2+SVSNmFaqaYRTb4FUWZrKl8frokkW270m9MHHi3AVqT1yC7UzdM95JfLosATArakdSrE0aFs6Z8CbPYDjc0dLQSmb/sydueIFmBmTiqco7oC8Loczsxnq8xNo9wbXu0bA4It6H9sz27OmWtuTPNwVMcrApwKO8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784141493; c=relaxed/simple; bh=vlg6EucuLTzH2ahkQ9RKGxIHegwV5NfcPMCjCKbBPYU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ltX3SpuPlGQ9kK58pFKJY6hqzz5yQQrykVIDqYQ0q9MI7OnY1An73ptDZKSvu7MMyUGHh1NBnLhlFRRYmP2zjnOlb7NfGv+qyWoqS1uNYYIqZePFCOdVtlbOHrdIHmmBbpV/0t5Juqtnr5JTGtFxu7A+VG46G+F/iohZzj4o4Ak= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=i3akTg5i; arc=none smtp.client-ip=198.175.65.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="i3akTg5i" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1784141491; x=1815677491; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vlg6EucuLTzH2ahkQ9RKGxIHegwV5NfcPMCjCKbBPYU=; b=i3akTg5iu18JmF/UKPZIOD1FUEptmrkOjaRUbmEi8+/Uc02P3XixJJEK rE/yvKMef12Y73uN2apIll2h6wYFnVVNgE/6p5ChWsMwYNHprhvQcJljy 7ZmDyPcUkBqwa/47v8SII6Zt+Xfy/trVcmg9w+xBX8hdoBFZ8xQjEQj9m H3zeNK4Uo1FWsvjyD5+aQSEbkfc/SpHNJAz5Rlr/pZwcPUCrQ/m/Qq9eK zkuw0TLfb5fyPfpz4VOhjKpFh4CeVHzo3XxSSY73lIRgpbJ1Q20Zu4i4t 3AtEu0O73/yaiiCr348FOZoHjw5tgjUD1paazpPCA7GL9yZp0+D9i691o A==; X-CSE-ConnectionGUID: Z3EigVsITTKbvdqmJJydfg== X-CSE-MsgGUID: 3W5MlCG6SJCAnr4MpGj3dw== X-IronPort-AV: E=McAfee;i="6800,10657,11847"; a="84887515" X-IronPort-AV: E=Sophos;i="6.25,166,1779174000"; d="scan'208";a="84887515" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2026 11:51:22 -0700 X-CSE-ConnectionGUID: A6RZI7cwTZeYovAgsogMaw== X-CSE-MsgGUID: k8B/RJ8pQo6fhlh4cldqlQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,166,1779174000"; d="scan'208";a="280700294" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa001.fm.intel.com with ESMTP; 15 Jul 2026 11:51:17 -0700 Received: by black.igk.intel.com (Postfix, from userid 1003) id EEFE199; Wed, 15 Jul 2026 20:51:15 +0200 (CEST) From: Andy Shevchenko To: Andy Shevchenko , Bradford Love , linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-media@vger.kernel.org Cc: Linus Walleij , Bartosz Golaszewski , Jonathan Corbet , Shuah Khan , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Hauke Mehrtens , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Thomas Bogendoerfer , Mauro Carvalho Chehab Subject: [PATCH v1 2/7] media: em28xx: Split em28xx_pctv_290e_set_lna_gpio() helper Date: Wed, 15 Jul 2026 20:46:42 +0200 Message-ID: <20260715185112.1323510-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260715185112.1323510-1-andriy.shevchenko@linux.intel.com> References: <20260715185112.1323510-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Split em28xx_pctv_290e_set_lna_gpio() helper in order to deduplicate the GPIO request and setting. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij --- drivers/media/usb/em28xx/em28xx-dvb.c | 31 ++++++++++++--------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28= xx/em28xx-dvb.c index 8482fc4045ea..ef148a27c94d 100644 --- a/drivers/media/usb/em28xx/em28xx-dvb.c +++ b/drivers/media/usb/em28xx/em28xx-dvb.c @@ -737,17 +737,14 @@ static void pctv_520e_init(struct em28xx *dev) regs[i].r, regs[i].len); }; =20 -static int em28xx_pctv_290e_set_lna(struct dvb_frontend *fe) +static int em28xx_pctv_290e_set_lna_gpio(struct em28xx *dev, u32 lna) { - struct dtv_frontend_properties *c =3D &fe->dtv_property_cache; - struct em28xx_i2c_bus *i2c_bus =3D fe->dvb->priv; - struct em28xx *dev =3D i2c_bus->dev; #ifdef CONFIG_GPIOLIB_LEGACY struct em28xx_dvb *dvb =3D dev->dvb; int ret; unsigned long flags; =20 - if (c->lna =3D=3D 1) + if (lna =3D=3D 1) flags =3D GPIOF_OUT_INIT_HIGH; /* enable LNA */ else flags =3D GPIOF_OUT_INIT_LOW; /* disable LNA */ @@ -761,11 +758,20 @@ static int em28xx_pctv_290e_set_lna(struct dvb_fronte= nd *fe) return ret; #else dev_warn(&dev->intf->dev, "%s: LNA control is disabled (lna=3D%u)\n", - KBUILD_MODNAME, c->lna); + KBUILD_MODNAME, lna); return 0; #endif } =20 +static int em28xx_pctv_290e_set_lna(struct dvb_frontend *fe) +{ + struct dtv_frontend_properties *c =3D &fe->dtv_property_cache; + struct em28xx_i2c_bus *i2c_bus =3D fe->dvb->priv; + struct em28xx *dev =3D i2c_bus->dev; + + return em28xx_pctv_290e_set_lna_gpio(dev, c->lna); +} + static int em28xx_pctv_292e_set_lna(struct dvb_frontend *fe) { struct dtv_frontend_properties *c =3D &fe->dtv_property_cache; @@ -1920,19 +1926,10 @@ static int em28xx_dvb_init(struct em28xx *dev) goto out_free; } =20 -#ifdef CONFIG_GPIOLIB_LEGACY /* enable LNA for DVB-T, DVB-T2 and DVB-C */ - result =3D gpio_request_one(dvb->lna_gpio, - GPIOF_OUT_INIT_LOW, NULL); - if (result) - dev_err(&dev->intf->dev, - "gpio request failed %d\n", - result); - else - gpio_free(dvb->lna_gpio); + em28xx_pctv_290e_set_lna_gpio(dev, 0); =20 - result =3D 0; /* continue even set LNA fails */ -#endif + /* continue even set LNA fails */ dvb->fe[0]->ops.set_lna =3D em28xx_pctv_290e_set_lna; } =20 --=20 2.50.1 From nobody Sat Jul 25 16:44:51 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6D455494A04; Wed, 15 Jul 2026 18:51:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784141491; cv=none; b=glpcsbM+xHgYo8X8GXqDnhf6VUyXSFFIh5gDwfq8+6JNS6fl/QFhS4Oo1ZeotjQneKVCI/ywQ1wb/ZjC1y7GMDWWN9W4b0sR4MR1xn4rMXG7TSDycrcR5P9CrB3XbaMkxd4pEmgmvsJWTj5Uv5QmpmvJOsLwh7bNvfkc4vCkD64= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784141491; c=relaxed/simple; bh=vikGjvYqHQWSfjuEaJ2t/Txz7aeo0TD65SJMynOCRv8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qvAi1fn8hgGiK/mxwa3t0zzPdo9lE9/LikJ82kF/3YkA4iUwqdlwbDZ9bmKQAASp8ndSrzZLO2tteJRKpicBSQ/MdBAKTNPf9aI+9osi6/yZYvvIn8cokVKqNeXZK6Qg2xOD/5TS5wYLUmQDn6zkUWmbMouKk3KwEWomstcDH34= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=b4RBA2rK; arc=none smtp.client-ip=198.175.65.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="b4RBA2rK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1784141488; x=1815677488; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vikGjvYqHQWSfjuEaJ2t/Txz7aeo0TD65SJMynOCRv8=; b=b4RBA2rKP4+0SAVXOdsjacZzgjT8g+mqNur3nR1M53y7OX+apaeEfRY7 NtJp62ToGduEF/7yrtvF4T8n3C/iM7jNbPga/CczHJbABTfdxR16eha0b JbnmN2/vQyLu+BFbw6sSib9J0mtuD2Yg7VeCUnrMsPMWfAF0l3RdngTOc yHWIjee1S33YJXCRIyBiERkHYqFHOep2cPJkrLQEgH4EgVQBVzoNS/6hm oVlK7nrW+ky2g4aSQKJXWvMYkLg89eEDv9DgLP5cmUve20LyE8XJNTg1k hTLIMnXbQqr32CcLii0T2b8KNeU5ZqaF229fHXq6Tn6cZKh/AeGWDWlzo w==; X-CSE-ConnectionGUID: 6FuVQU7qQtey6Ov+qwC1ng== X-CSE-MsgGUID: N3A9+WJUR3Ss8hqaqjV7uQ== X-IronPort-AV: E=McAfee;i="6800,10657,11847"; a="84887512" X-IronPort-AV: E=Sophos;i="6.25,166,1779174000"; d="scan'208";a="84887512" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2026 11:51:22 -0700 X-CSE-ConnectionGUID: qVpOBhYWRcKlc5QbkDdKdA== X-CSE-MsgGUID: hu45xtIQSaqwTUt4K9bhhA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,166,1779174000"; d="scan'208";a="280700293" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa001.fm.intel.com with ESMTP; 15 Jul 2026 11:51:17 -0700 Received: by black.igk.intel.com (Postfix, from userid 1003) id F3A5C9B; Wed, 15 Jul 2026 20:51:15 +0200 (CEST) From: Andy Shevchenko To: Andy Shevchenko , Bradford Love , linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-media@vger.kernel.org Cc: Linus Walleij , Bartosz Golaszewski , Jonathan Corbet , Shuah Khan , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Hauke Mehrtens , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Thomas Bogendoerfer , Mauro Carvalho Chehab Subject: [PATCH v1 3/7] media: em28xx: Open code gpio_request_one() Date: Wed, 15 Jul 2026 20:46:43 +0200 Message-ID: <20260715185112.1323510-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260715185112.1323510-1-andriy.shevchenko@linux.intel.com> References: <20260715185112.1323510-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Open code the gpio_request_one() call to be able to kill that API in the follow changes. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij --- drivers/media/usb/em28xx/em28xx-dvb.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28= xx/em28xx-dvb.c index ef148a27c94d..d7f8dcf27900 100644 --- a/drivers/media/usb/em28xx/em28xx-dvb.c +++ b/drivers/media/usb/em28xx/em28xx-dvb.c @@ -742,18 +742,14 @@ static int em28xx_pctv_290e_set_lna_gpio(struct em28x= x *dev, u32 lna) #ifdef CONFIG_GPIOLIB_LEGACY struct em28xx_dvb *dvb =3D dev->dvb; int ret; - unsigned long flags; =20 - if (lna =3D=3D 1) - flags =3D GPIOF_OUT_INIT_HIGH; /* enable LNA */ - else - flags =3D GPIOF_OUT_INIT_LOW; /* disable LNA */ - - ret =3D gpio_request_one(dvb->lna_gpio, flags, NULL); - if (ret) + ret =3D gpio_request(dvb->lna_gpio, NULL); + if (ret) { dev_err(&dev->intf->dev, "gpio request failed %d\n", ret); - else + } else { + gpio_direction_output(dvb->lna_gpio, !!(lna =3D=3D 1)); gpio_free(dvb->lna_gpio); + } =20 return ret; #else --=20 2.50.1 From nobody Sat Jul 25 16:44:51 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76B0B41D4F1; Wed, 15 Jul 2026 18:51:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784141486; cv=none; b=qakyRm9iw3FiEPf2ajVEMosZZtX/TwtVvBbFmet74Qec2reFHmFGIMjI199XhlG95mNolyXKbY6ByfokB7Z/WoiKEgRK5HdyeaFEjqtQ6Siwb4C58boiGhtTcgmeta/JyrSTRSDIo/7zGLNLdrBZssoaGEr59G0XqXOrF0ub61k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784141486; c=relaxed/simple; bh=FDPjXoCgRJnJSh11Yjsc76ru2V/iRZPQNxJkLKiuzdo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YNOXLdZKDXbAPV6/7CjmyJ9Sx8R9lBu2deDU1HHgTihewazJbghMj0JC5QgkGLTmd5BNTTNJHLcSxY2t8ByZa34Ajm4F4QT0nidqXQI2a1PmQO8MCIlzEv5vrwMtP6C2kUyTcSLSSolX6xW4wOBOVc/3Dc5ujUG/j275328Paro= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=CdhOBcNd; arc=none smtp.client-ip=198.175.65.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="CdhOBcNd" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1784141483; x=1815677483; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FDPjXoCgRJnJSh11Yjsc76ru2V/iRZPQNxJkLKiuzdo=; b=CdhOBcNdHhk0wRuECIJqo3s7qcMnCZc3F5VVvm+376mstOLNtRtS0z3m 4LxkNCbPCcomnN1VkAV7Qune6EMgZkgHbSdrIUUZMTrIq2cvwi5yBtDEA 89Xw8A7moJpT6kaBNONFf1N6hZLRmtiLr9KcDaMaxzqtKaIJH04wr1RRr e5Plo6nVKobhHVGJMZ+/JcgO3tjnSKdB02heOFxUFrQk8V6zgmrrqNZ7F 8sVhX/P/G6evpZdIjXgulHJrpA7L+F+jbC6nbNlZZsAJ5J9R/jONb0ED2 z7+xBugf51jCFQxETAb/5i6LwQnrrGFgs2K2lodKDc05wBNX1YqB/zYel Q==; X-CSE-ConnectionGUID: cVWdOy7QRNiByj6Df3KDcw== X-CSE-MsgGUID: aoOVFOIGTACQ11vHxIiVPg== X-IronPort-AV: E=McAfee;i="6800,10657,11847"; a="84887477" X-IronPort-AV: E=Sophos;i="6.25,166,1779174000"; d="scan'208";a="84887477" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2026 11:51:21 -0700 X-CSE-ConnectionGUID: c0ePlU7xTLe50ZfQ5a0cZA== X-CSE-MsgGUID: 2XWh0XIhRhen6eEpbG1r2w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,166,1779174000"; d="scan'208";a="280700291" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa001.fm.intel.com with ESMTP; 15 Jul 2026 11:51:17 -0700 Received: by black.igk.intel.com (Postfix, from userid 1003) id 039AE9D; Wed, 15 Jul 2026 20:51:16 +0200 (CEST) From: Andy Shevchenko To: Andy Shevchenko , Bradford Love , linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-media@vger.kernel.org Cc: Linus Walleij , Bartosz Golaszewski , Jonathan Corbet , Shuah Khan , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Hauke Mehrtens , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Thomas Bogendoerfer , Mauro Carvalho Chehab Subject: [PATCH v1 4/7] MIPS: BCM47XX: Open code gpio_request_one() Date: Wed, 15 Jul 2026 20:46:44 +0200 Message-ID: <20260715185112.1323510-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260715185112.1323510-1-andriy.shevchenko@linux.intel.com> References: <20260715185112.1323510-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Open code the gpio_request_one() call to be able to kill that API in the follow changes. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij --- arch/mips/bcm47xx/workarounds.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/mips/bcm47xx/workarounds.c b/arch/mips/bcm47xx/workaround= s.c index 745c6228eb2c..9148d2c219d1 100644 --- a/arch/mips/bcm47xx/workarounds.c +++ b/arch/mips/bcm47xx/workarounds.c @@ -9,11 +9,13 @@ static void __init bcm47xx_workarounds_enable_usb_power(i= nt usb_power) { int err; =20 - err =3D gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power"); - if (err) + err =3D gpio_request(usb_power, "usb_power"); + if (err) { pr_err("Failed to request USB power gpio: %d\n", err); - else + } else { + gpio_direction_output(usb_power, 1); gpio_free(usb_power); + } } =20 void __init bcm47xx_workarounds(void) --=20 2.50.1 From nobody Sat Jul 25 16:44:51 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 56DC9495504; Wed, 15 Jul 2026 18:51:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784141494; cv=none; b=KsMaDd+9uF3Kcy9VmIRr2mHMDOAFJ/XvSe7JcBoYbMPB13y8oQFGtaABeXexzUtaUSEv3xOP4Gcb1siIGC+8NREtnzfyXg2q40evW9VbiqyLBRSrJcjk7SIj4EfFSW+JMPuCSfxxDS/f8LmfcN2iHiSTd7tviY6ZFeTY7sT0yes= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784141494; c=relaxed/simple; bh=vqPRf1eRLI2wPMZNTTk55tYgoCASIBKcTfPQxTtD05k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WcMMykQ1DsYQLMOBvcmBIxcE3Wlk7C3GexMGclMxy1hD5y1qBp7LO9pCIr/fjFItPxqb/4/XRGmB+EuLaUQUhoZu3ihVJGHWhIphMV5xNu7T8+btcxDt+ArNdo/BGCZQCzylUJsGPqGCgl87s+vNjRx5hIkE7bP3ETLHQgA93i8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ZEiYf2qB; arc=none smtp.client-ip=198.175.65.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ZEiYf2qB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1784141492; x=1815677492; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vqPRf1eRLI2wPMZNTTk55tYgoCASIBKcTfPQxTtD05k=; b=ZEiYf2qBhuXo4Z+rrbNBhVM/tAVbcD4KaFW0AIsrCNuZUrIeCKTNrfuE UwQPIrLYxTCpC2X1h98ipHJaFfRnB3tbfOflINfx1/nM87Za6tXCWQPUB 1UBmuyY2xKexUz7+UUTq5ph7qEJnTefiu6kKvVrI485NYiirkBEh2ExBe Ag2VarZSQhiSLi+QJhHqJYVMP9KIO5Ee4XoTCqYWclqZFzLOh+WMFryYn rR1L74wpphuAUk7EKLoDYgzH3mXRpfmavM3Sd1857bjTpqFAxdM0WMF9B v30coAp8jBVj60EPBF3/HoEYe30o3rUmYAoWDXo2jtusCcbuzO1y0zmcW A==; X-CSE-ConnectionGUID: dw5886ZcSQqWjlEjbWy8iw== X-CSE-MsgGUID: Gj6XNr2TQ+O4TgYoLYslsw== X-IronPort-AV: E=McAfee;i="6800,10657,11847"; a="84887526" X-IronPort-AV: E=Sophos;i="6.25,166,1779174000"; d="scan'208";a="84887526" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2026 11:51:25 -0700 X-CSE-ConnectionGUID: 0sRMWxKpQ8aMtUHksXYmvQ== X-CSE-MsgGUID: XwfBQ5UwRna3c2sKskrJyw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,166,1779174000"; d="scan'208";a="280700299" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa001.fm.intel.com with ESMTP; 15 Jul 2026 11:51:21 -0700 Received: by black.igk.intel.com (Postfix, from userid 1003) id 0811F9E; Wed, 15 Jul 2026 20:51:16 +0200 (CEST) From: Andy Shevchenko To: Andy Shevchenko , Bradford Love , linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-media@vger.kernel.org Cc: Linus Walleij , Bartosz Golaszewski , Jonathan Corbet , Shuah Khan , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Hauke Mehrtens , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Thomas Bogendoerfer , Mauro Carvalho Chehab Subject: [PATCH v1 5/7] MIPS: BCM63XX: Remove one time use ephy_reset_gpio_flags Date: Wed, 15 Jul 2026 20:46:45 +0200 Message-ID: <20260715185112.1323510-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260715185112.1323510-1-andriy.shevchenko@linux.intel.com> References: <20260715185112.1323510-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" ephy_reset_gpio_flags exists solely to supply polarity to the reset GPIO. But in practice it's kept all the same and currently only a single user present. Drop the member and use hard coded GPIO flags instead. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij --- arch/mips/bcm63xx/boards/board_bcm963xx.c | 7 +++---- arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 3 --- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/= boards/board_bcm963xx.c index c5617b889b1c..57e916c06792 100644 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c @@ -42,7 +42,7 @@ static struct board_info __initdata board_cvg834g =3D { .expected_cpu_id =3D 0x3368, =20 .ephy_reset_gpio =3D 36, - .ephy_reset_gpio_flags =3D GPIOF_OUT_INIT_HIGH, + .has_pci =3D 1, .has_uart0 =3D 1, .has_uart1 =3D 1, @@ -903,9 +903,8 @@ int __init board_register_devices(void) =20 platform_device_register(&bcm63xx_gpio_leds); =20 - if (board.ephy_reset_gpio && board.ephy_reset_gpio_flags) - gpio_request_one(board.ephy_reset_gpio, - board.ephy_reset_gpio_flags, "ephy-reset"); + if (board.ephy_reset_gpio) + gpio_request_one(board.ephy_reset_gpio, GPIOF_OUT_INIT_HIGH, "ephy-reset= "); =20 return 0; } diff --git a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h b/arch/mip= s/include/asm/mach-bcm63xx/board_bcm963xx.h index 830f53f28e3f..018a56cbc328 100644 --- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h @@ -46,9 +46,6 @@ struct board_info { =20 /* External PHY reset GPIO */ unsigned int ephy_reset_gpio; - - /* External PHY reset GPIO flags from gpio.h */ - unsigned long ephy_reset_gpio_flags; }; =20 #endif /* ! BOARD_BCM963XX_H_ */ --=20 2.50.1 From nobody Sat Jul 25 16:44:51 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58008417D80; Wed, 15 Jul 2026 18:51:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784141489; cv=none; b=KZYrjHaU07mB5uAbhqSPVYzsn/uu+k/+Ye+Ln1EEgUDv366eyK+2qtkhC0DOQz2L2yoTWuC/rozqxpuDqimpbacpsqypTuqIxeSGgvigbXiAeQPXndy0bBI8fdgm8/SDvLzSixqMjdGUv8AyngVBA/1k5J5VwX8YXcUaVniZuG4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784141489; c=relaxed/simple; bh=3RT0bvr0YlMj/g53DZqvYLkN+FeBp21Hqe9FY6G7j0c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sPmR2TjFnPV3eQCQVWYFPyRwrvFkdrWQ6GAIYGACuBUA7k+1wLM04zjVWsQWFQSbXfAG0tWFc1f1mhsuGPtnntRGcwJTUoux8/PAhkVUtwyWKesHIsbQmY65NGpxnyQJsRAMphrhQ+dtaai5NB63UTkE7UWZJj2xsBMiCWeHz5s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=IdLNl6Ne; arc=none smtp.client-ip=198.175.65.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="IdLNl6Ne" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1784141487; x=1815677487; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3RT0bvr0YlMj/g53DZqvYLkN+FeBp21Hqe9FY6G7j0c=; b=IdLNl6Nepy5ODheEFnsreTNDTIeYWvHrJozdgmiGiIiy6wEveldW1zAE 8TJLn3caJrlBoiDi1GMzMkGG6pumhoQdTwgw9GUVuhReaMSf3Krq+DQla SN6WclOoUOV1wFuir5sOGj+jQ1Nhi17lLE1hwrngpZlurzV3YTyOSu3el x+WQaJbm+jnBxWpbxqrD1Bnt/FOwRK8ruUBG9SF7vVDuTlwNT/YEawuNl C7Q7AYwEFDgU6cWlZFn34oZInlwwsMhu6xLntJX5fvC2iWkj/PIisVlG5 E6iESC6MDn52B9dIzc8ZNkxepNmyn5b096Vba7eW7hkz+DBCpcJ//p+Px w==; X-CSE-ConnectionGUID: 0DXV2q8NQ1qx6aagGKw8tw== X-CSE-MsgGUID: J6If2aOyT1W3mv15VTLxzg== X-IronPort-AV: E=McAfee;i="6800,10657,11847"; a="96308574" X-IronPort-AV: E=Sophos;i="6.25,166,1779174000"; d="scan'208";a="96308574" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2026 11:51:25 -0700 X-CSE-ConnectionGUID: lMLnisCeQDm4TCWmtpr1gw== X-CSE-MsgGUID: IPOQ6sDsQcmUjgaIpa0bmQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,166,1779174000"; d="scan'208";a="294491680" Received: from black.igk.intel.com ([10.91.253.5]) by orviesa001.jf.intel.com with ESMTP; 15 Jul 2026 11:51:21 -0700 Received: by black.igk.intel.com (Postfix, from userid 1003) id 0C37BA1; Wed, 15 Jul 2026 20:51:16 +0200 (CEST) From: Andy Shevchenko To: Andy Shevchenko , Bradford Love , linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-media@vger.kernel.org Cc: Linus Walleij , Bartosz Golaszewski , Jonathan Corbet , Shuah Khan , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Hauke Mehrtens , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Thomas Bogendoerfer , Mauro Carvalho Chehab Subject: [PATCH v1 6/7] MIPS: BCM63XX: Open code gpio_request_one() Date: Wed, 15 Jul 2026 20:46:46 +0200 Message-ID: <20260715185112.1323510-7-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260715185112.1323510-1-andriy.shevchenko@linux.intel.com> References: <20260715185112.1323510-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Open code the gpio_request_one() call to be able to kill that API in the follow changes. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij --- arch/mips/bcm63xx/boards/board_bcm963xx.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/= boards/board_bcm963xx.c index 57e916c06792..993341604439 100644 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c @@ -903,8 +903,11 @@ int __init board_register_devices(void) =20 platform_device_register(&bcm63xx_gpio_leds); =20 - if (board.ephy_reset_gpio) - gpio_request_one(board.ephy_reset_gpio, GPIOF_OUT_INIT_HIGH, "ephy-reset= "); + if (board.ephy_reset_gpio) { + gpio_request(board.ephy_reset_gpio, "ephy-reset"); + gpio_direction_output(board.ephy_reset_gpio, 1); + gpio_free(board.ephy_reset_gpio); + } =20 return 0; } --=20 2.50.1 From nobody Sat Jul 25 16:44:51 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5A66400990; Wed, 15 Jul 2026 18:51:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784141491; cv=none; b=NHcJXvCJAge6YWA4rtC2JeJu7V80id4SnM3e6HHE5QqFfRyepP2sNWI/5GFg2iT6mXiU//Gy8vw/kRvOKSZgW1n9BrG0f81lYvr4+4CzqHbJ5Qcd8txhpq07nZvq9gAr/qi70Ln+dXtIvbnREY1CbWdyiokgUsm5QseyBh4+iCs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784141491; c=relaxed/simple; bh=c6hpNb2JXzDFRlDVnT3j7w6ZUzrfVzvezdxIsX1aXGo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=edQqYbHEcoP8V4rkzTHNrPtyTRVcKtrUaD0roJzPoYEW2bzoxC77NWhR9oSAKI3OqTh7WfCSaQIq+pHKZPosM9UpVo2yDgIH75fAiiSivLWd/SMyuyRq2VA8pbYTbbynIgqUXz5l8tNXzw7NyTFZteAhcchIoLwwFXmfV6qVAmU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=cTWaAcwc; arc=none smtp.client-ip=198.175.65.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="cTWaAcwc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1784141488; x=1815677488; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=c6hpNb2JXzDFRlDVnT3j7w6ZUzrfVzvezdxIsX1aXGo=; b=cTWaAcwc07qqDXBshm5F546ngnFEDILpKmwLiri1zoOy6PTo8Vva8vjf 8ZUoAiWV4y1UPrLcgCx2NFwGvmYYOlCh3jBeXHE0GsC7kU6undS15tZ+/ YHDUc5+9LJqyXHoQ9iiaD5iMaOkplz6w60gbVf2VF2VcvFR4+KFtMnrXy ReGU+wkbuHA38P1Kp7KIbnHq0d0Tw53s+hJdp0Hcigh8sGycfflFpyylc wHQoYBa0s9tl3vBuUIcxv3yk8bMj2vBDVz7KlKfXu2QCjL8Gv7AFJC5dY qKvJrshl5N+2zRLp/W7bxKgLKfi+DoRHJb/8doQDeb1w0wbJQN34LJANo g==; X-CSE-ConnectionGUID: 78bUg6S4RfO6eT+/Z4n4pw== X-CSE-MsgGUID: EseFElmiTfm9+SwwYaVLfg== X-IronPort-AV: E=McAfee;i="6800,10657,11847"; a="96308587" X-IronPort-AV: E=Sophos;i="6.25,166,1779174000"; d="scan'208";a="96308587" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2026 11:51:26 -0700 X-CSE-ConnectionGUID: IBaGDHu7QKeuyExlv8l9Uw== X-CSE-MsgGUID: 9Rn3eEowS7mtmEOv0en++Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,166,1779174000"; d="scan'208";a="294491681" Received: from black.igk.intel.com ([10.91.253.5]) by orviesa001.jf.intel.com with ESMTP; 15 Jul 2026 11:51:21 -0700 Received: by black.igk.intel.com (Postfix, from userid 1003) id 1125CA2; Wed, 15 Jul 2026 20:51:16 +0200 (CEST) From: Andy Shevchenko To: Andy Shevchenko , Bradford Love , linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-media@vger.kernel.org Cc: Linus Walleij , Bartosz Golaszewski , Jonathan Corbet , Shuah Khan , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Hauke Mehrtens , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Thomas Bogendoerfer , Mauro Carvalho Chehab Subject: [PATCH v1 7/7] gpiolib: Get rid of not used anymore gpio_request_one() Date: Wed, 15 Jul 2026 20:46:47 +0200 Message-ID: <20260715185112.1323510-8-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260715185112.1323510-1-andriy.shevchenko@linux.intel.com> References: <20260715185112.1323510-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" No more users. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij --- Documentation/driver-api/gpio/consumer.rst | 2 +- drivers/gpio/gpiolib-legacy.c | 31 ---------------------- include/linux/gpio/legacy.h | 8 ------ 3 files changed, 1 insertion(+), 40 deletions(-) diff --git a/Documentation/driver-api/gpio/consumer.rst b/Documentation/dri= ver-api/gpio/consumer.rst index bb3366047fad..03edd9472f07 100644 --- a/Documentation/driver-api/gpio/consumer.rst +++ b/Documentation/driver-api/gpio/consumer.rst @@ -463,7 +463,7 @@ and vice-versa:: The GPIO number returned by desc_to_gpio() can safely be used as a paramet= er of the gpio\_*() functions for as long as the GPIO descriptor `desc` is not f= reed. All the same, a GPIO number passed to gpio_to_desc() must first be properly -acquired using e.g. gpio_request_one(), and the returned GPIO descriptor i= s only +acquired using e.g. gpio_request(), and the returned GPIO descriptor is on= ly considered valid until that GPIO number is released using gpio_free(). =20 Freeing a GPIO obtained by one API with the other API is forbidden and an diff --git a/drivers/gpio/gpiolib-legacy.c b/drivers/gpio/gpiolib-legacy.c index ef3f2ef30cf2..c2b04605b203 100644 --- a/drivers/gpio/gpiolib-legacy.c +++ b/drivers/gpio/gpiolib-legacy.c @@ -21,37 +21,6 @@ void gpio_free(unsigned gpio) } EXPORT_SYMBOL_GPL(gpio_free); =20 -/** - * gpio_request_one - request a single GPIO with initial configuration - * @gpio: the GPIO number - * @flags: GPIO configuration as specified by GPIOF_* - * @label: a literal description string of this GPIO - * - * **DEPRECATED** This function is deprecated and must not be used in new = code. - * - * Returns: - * 0 on success, or negative errno on failure. - */ -int gpio_request_one(unsigned gpio, unsigned long flags, const char *label) -{ - int err; - - err =3D gpio_request(gpio, label); - if (err) - return err; - - if (flags & GPIOF_IN) - err =3D gpio_direction_input(gpio); - else - err =3D gpio_direction_output(gpio, !!(flags & GPIOF_OUT_INIT_HIGH)); - - if (err) - gpio_free(gpio); - - return err; -} -EXPORT_SYMBOL_GPL(gpio_request_one); - /* * **DEPRECATED** This function is deprecated and must not be used in new = code. */ diff --git a/include/linux/gpio/legacy.h b/include/linux/gpio/legacy.h index 557ef635935e..d4273162ed13 100644 --- a/include/linux/gpio/legacy.h +++ b/include/linux/gpio/legacy.h @@ -82,8 +82,6 @@ static inline int gpio_to_irq(unsigned gpio) return gpiod_to_irq(gpio_to_desc(gpio)); } =20 -int gpio_request_one(unsigned gpio, unsigned long flags, const char *label= ); - int devm_gpio_request_one(struct device *dev, unsigned gpio, unsigned long flags, const char *label); =20 @@ -104,12 +102,6 @@ static inline int gpio_request(unsigned gpio, const ch= ar *label) return -ENOSYS; } =20 -static inline int gpio_request_one(unsigned gpio, - unsigned long flags, const char *label) -{ - return -ENOSYS; -} - static inline void gpio_free(unsigned gpio) { might_sleep(); --=20 2.50.1