From nobody Wed May 7 22:15:33 2025 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64BCD1F1921 for <linux-kernel@vger.kernel.org>; Tue, 1 Apr 2025 12:46:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743511620; cv=none; b=dQxempce3M1n+aIleSkUgY6AUp6KhWIreb71M9hj7sD7c2HpGSES1695dtzdypTtom+ZICwMzBsGxhYwoAaiksP+CP9155+3nf7L1V4vjGRqwCDMSIvVBInJ16rmO1zM4iJJRK9YeIta3uTHaBw216LrfpAFgWkvlHHVMqz0wHs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743511620; c=relaxed/simple; bh=temwGwuAaoC5zTFBClo/qvp6AjaDT4RZkI46P4DarK8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CnQ0173a1bF/9MFUJvKNJp7RSCJJaU+I1Y/5wUIzGz8LF3vW0Z6W9iJd8iOdIJgcUsi9iYSbCjTTYzKN1yoftRn4ufnP0fRyW+R1eYGs24hfvvram5BO2vBORS25H8rjzbPr9OO0UOH57Z9K1EYsL0RBkpRUoST9Lcfmf+97q/A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=eqAcMubW; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="eqAcMubW" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-43d0359b1fcso36134825e9.0 for <linux-kernel@vger.kernel.org>; Tue, 01 Apr 2025 05:46:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1743511617; x=1744116417; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=xe7kdEUowiq8TBvJ84z72BfPVI79Uk7veEXXBETFIOc=; b=eqAcMubWKJ4gAC3rO+37fSR7TlLQ7k/fWNGqDef4ArA05UeyAczxmOQcyZ18aFt0wf 5qLyY/WGRvCEHAogvEVMGTI8GizsByFt4N6RN/VFGCxvc6haqqNYt6PZ5U3vvEvlN2Gy vmVRMKj4RpvdZf9GYPMUzGpMWUWwpUmWcb6Pu5L3gDAGrUopJxbga90w69ywmpTXlWA7 ALwOFCbJTmtzwUrq1h4qS4sCiSUwCjIpSrpvmQI16ye0U1YsNLp7Z38xSxa60KShB/ef ObhpWN2A9DATZ3lhIGa8xNdt+d2S70eUxJ0eMKVkNp8fKB5wJmog0TV/O6eGhuVnQ14Q h/oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743511617; x=1744116417; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xe7kdEUowiq8TBvJ84z72BfPVI79Uk7veEXXBETFIOc=; b=T569i9uNo0s3zXTosH76I74mvvuEEVpm98q042Cu630xruv6c4OjBEXaXR3UWyaSN7 y1yhsYpBNt7nftBt54YVhNMn/yRS+cnMXaV51YlRmCLOXboiKGIsgbUSNpZBZzME0Rcq 1RcH0sb4oFki+mvfseXPWPZjmjcvk+/hUZxVe05x8YI6Q6uz9UYTnmV1UxkfISLe+LEB CTWiXHpuhNRnkNfDXfRJfYyMvgj01YZ1NO8FDLfF3H33OMmD5Rm4O9sqHeaLNoSs2PLQ fRd3Rchm11mbEWUm0zfNuUvfIlG7irHZ4Q52njI9+Ef7mKC0MFy3SWzWtcyxRSCpgzb6 IMmQ== X-Forwarded-Encrypted: i=1; AJvYcCXGQZ1PfwROYXmBi7cgjiJ+D/xxyo8hGLTv0i+OD0gJVwsHBrz+ly11K5V4+1xI3luZ2N5DCw4H8qfiylE=@vger.kernel.org X-Gm-Message-State: AOJu0YwEzoU0cteex/F4TE2ig0pJjb5EhFZHcP0ryn/d1BJnHfr3iEhm YRmkvrEumla8KkXWJE05rdkuLflNwpIvywQGTVznziCt9OKuvtdWYRRBNLwvx9ppzRFV8HWOHgw 3 X-Gm-Gg: ASbGnctcxWyUc/VBoLKY5uuT6ppu3u/Lwro+qqbDdnjEO/vgTUbUD3vFf0ywEYImugb y8YUXs6kxQWJ9yDS4phQMwaYyVTbrBiuhD5xDcj+UWG+vGVJSG5ELZE5qyce5IFaUn6ga7L7Aih JhOEF+3H4IeSmt58aHiV0ET9ji4kfxPTM81RsAElcyEeUmipNKTdoqSAoXRKsfA0lv2YVWEKOaD 7CScfF46TtfiFaosWqvW7EQul+I7dv487J1c/sg+SOySRM7uWL9Dou4JWRO+4JdrnceRiNwsUmc gHrvZz/r7zSl42sr/+4Uya1/ICcnChOlwrZ/ X-Google-Smtp-Source: AGHT+IGf0u46IWU3CO/BVxxVBOy8SucBu63MYXRuUp8B+WfcdRIPeQ6B7KQe1s4LIVosuvQteU9tqg== X-Received: by 2002:a05:600c:6b6a:b0:43c:ec72:3daf with SMTP id 5b1f17b1804b1-43d9118f70cmr145110815e9.14.1743511616731; Tue, 01 Apr 2025 05:46:56 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:a1d1:bbb:e2a6:2a9c]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d8fbc1889sm154711095e9.16.2025.04.01.05.46.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Apr 2025 05:46:56 -0700 (PDT) From: Bartosz Golaszewski <brgl@bgdev.pl> Date: Tue, 01 Apr 2025 14:46:42 +0200 Subject: [PATCH v2 1/4] gpio: deprecate the GPIOD_FLAGS_BIT_NONEXCLUSIVE flag Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250401-gpio-todo-remove-nonexclusive-v2-1-7c1380797b0d@linaro.org> References: <20250401-gpio-todo-remove-nonexclusive-v2-0-7c1380797b0d@linaro.org> In-Reply-To: <20250401-gpio-todo-remove-nonexclusive-v2-0-7c1380797b0d@linaro.org> To: Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl>, Mark Brown <broonie@kernel.org> Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski <bartosz.golaszewski@linaro.org> X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=923; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=Q2fStXzgr+tzcMl62MNu7piyURnbnFyqKrL7W40dDzY=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBn6+A+b3G/t7nNpboJqZXMuCSfP94fJXXp8nKTZ eJ1E6+JUW+JAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCZ+vgPgAKCRARpy6gFHHX cixzD/9nSVZXqJagl5jSQHjbsNryvTmOQsXiTQ0JT42XW8WAgd+yJi+SbFEv+z8viaawLoo6mTf Rf7qLG6rhFTV2idbRaXe3/YepxKRfP85PXbPqq8eoKHaruClgNG3x3heEDt1dFqRfuaEbvnovDE 3awvA2RHnuSWRsiohCpVToG34tUmQhgMRYkqC/fKuHIa5Ie3CDPpygXwDRn0Xbjmahvtt+5HNpT HOi8knpnYwRiC3mv29XzJ+YpGPAXuwiRo+HwHBE+9AJ6Yz0L9Fk03Wq7zaOlugwFAZSohhAqRP9 +EPTRivj40N9t/T4QkBkv3CC7ebd/BkeMowK/2Z8PeuKwWYdxxVdFOMWofyevKYoNmGu1Qzpjrd lhiAok2kdsFv0OcqRz16dU/QkcCoi/cpqCuV9umKdXNW4kDld3BmTLw5J5DBEV7mgh2oIYEU/Se mDOLE28+QBdylpgcr4F2ZDQtatXvCikmZLpHGe0ChLDDCZxC7oVkf5u2NfymRMO3ZwyV37N62B6 Reenbux3KkyuLLIpWleo6YLn5fTqENagSjVR6DrACPaSqrKIUjFlQISPn0rIgghzkL+RZVEJjc9 DDLofhQ8DQ0y0N29vsmymNWW0hzIbHInAfXsVlv4UosMFf0OBx7PG3qsFP8O3Hd1Mfac9k+Zb1m iSgISzMBWwYQhvQ== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> The non-exclusive GPIO request flag looks like a functional feature but is in fact a workaround for a corner-case that got out of hand. It should be removed so deprecate it officially so that nobody uses it anymore. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> --- include/linux/gpio/consumer.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h index 45b651c05b9c..8adc8e9cb4a7 100644 --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h @@ -31,6 +31,7 @@ struct gpio_descs { #define GPIOD_FLAGS_BIT_DIR_OUT BIT(1) #define GPIOD_FLAGS_BIT_DIR_VAL BIT(2) #define GPIOD_FLAGS_BIT_OPEN_DRAIN BIT(3) +/* GPIOD_FLAGS_BIT_NONEXCLUSIVE is DEPRECATED, don't use in new code. */ #define GPIOD_FLAGS_BIT_NONEXCLUSIVE BIT(4) =20 /** --=20 2.45.2 From nobody Wed May 7 22:15:33 2025 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 17D1B20126C for <linux-kernel@vger.kernel.org>; Tue, 1 Apr 2025 12:46:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743511621; cv=none; b=YVFm+uFKcB3yVeepAC9jOo6RB8ESRxgUTvLYosoLf5qWqTl0m65RfynDr04TAiD54VbelEVH0hqAQ0AqgpcO9ydKijQh2ZGH3fSGTpXRh0TE6WEwSWe7CCGJdvGi5FRtCmPNSyIiFNd4V6lqyZJ61acTo2Xt4Nl2Dm134ijJ1Os= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743511621; c=relaxed/simple; bh=AbV7U5pUCyJPC11rcx6UA9F6fd4wqEjqeKr5InyqrcA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=l7ItQFDxzu/sSg21tTA6CFXt3wbnhwW91Tg9wgtGNV3MjE43kg4B76e2LNMTWxhxKOzUiIIPCAlkCNZCm0cM8ebSNWU815E88papJL76tNX61GK8yZe8KlR2jDh5kXa/JFT1vY9qeiuUhukvKCASR6py1aoCdmrhdnnVDYqmU80= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=TJGzMwTe; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="TJGzMwTe" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-43d2d952eb1so38395885e9.1 for <linux-kernel@vger.kernel.org>; Tue, 01 Apr 2025 05:46:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1743511617; x=1744116417; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=NXRKyXT3LiGw8+HSSKP+LYizolwv9vZJ9qmmSzI6jpU=; b=TJGzMwTe2ydsFJjMkm9jMevoDJ2PHOex7KkURzYbG9wU2pN6cK+xDnSWdUb/nJIbsV 5jYiYuNvAEhsz+ttfWOzG8rrFSsnkxsgVZPXh3vyOYFTR8854DXsvY8g/KN7VlAlwrRT RKW9fcQ5wJHOI959ba0921LvBooTdCrV5aCWqpXt22OqcJU0Jv4bxd+m86QTOlk/oUnA YAEqW3jlZD6LJ0HjNwS1R1xgnuuZuEBQI4WeGlhEN9MXk2zIo4m1vxcCXFo0y1IHhKse 3HS87PqEoSofTXWVi0jfMxbp+TFeHRQCOV7tOYKX1CzPs5LNtw7iZy8uCgxP4MZ5xz64 Ct3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743511617; x=1744116417; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NXRKyXT3LiGw8+HSSKP+LYizolwv9vZJ9qmmSzI6jpU=; b=p9pbS2bimANtEb9fdfZfOjvwLcIHfn66qLifhnBlhDjLaUgLbLb7avrevUP3VOW1Tc k6V5gK4HBFhG2fx3VrsMvSJZ8RC7kQuJ6COt0dr3vjZG2qPFjJPAY7LTn54lns3FjIgW LF697ZZWLW6XhY72VdqvNyqgbgw7kNlNwVO9WryEIjMamkQ7o0VsTt6oEwSu/YxY0nLm UUkUf1YA+uf4Da0bxewcIYWiAcDdBSW0xDTuCxRVhk286eHJPyeXDA4nUu5ageie2ra8 cT5u8E9GU5qaQl2QscY5cAmwc4Hxd5wAUAyvWIMXTcniAF8qvh1GhOcKlAE4x76tvF3f 2JMw== X-Forwarded-Encrypted: i=1; AJvYcCWnrF0xMlR0bh/XroeSKkhe0wP3uk4oh2FBZxSXzVASazSj5O4DZGGdTfSGoHTKE2bjXjcRxhqORVkwDMc=@vger.kernel.org X-Gm-Message-State: AOJu0YwUJaoOmT6X06eXDIIVSEWIC/HNZu7FdKc5g42vxhKQcdegkA7O CahfyPgKW4WjkmgNR9jg4IEsrtZyoMOeZfsLhcKkH1VHdzPGZXD/juhbsaIZqJFHYau2SzYOrgt o X-Gm-Gg: ASbGncsZt6MgpM+q0vbnvZGaFMVd242uk+biCG5a80roiaGNcSAlY0joSy8aR4fYwjJ x1UGSTlFw8Iu0RkDyuD7gH1KCaKbJG5LrvrTezyr7AMGmN9cBWYT6Ch0ZOQkUo+2AyTaW3+4xDp cMNnqutlUVNFZJ2A1zM+pZMFUccRgyMvZOrODwyUjdw4ugz43XVPU6wgYk8IeNn97ZJryMtb/aV gUtnUIUdCTvCsG7TrAXJPXXPiVom7/Y91RLRmfz2fTM5uesxgfroJPcN5F+/SbaSTCWblYEJfK9 nmLPR0WRa1zWFlJmrIz6jo/+AyM7sXKh1yEJ X-Google-Smtp-Source: AGHT+IHaLlLegdzZ27WF3+EP/qqq6kVpqc4ibSdXPq8IpfN6BBr6SIN3vM0ZVDpugyRjl2BsAWhwEA== X-Received: by 2002:a05:600c:1c1f:b0:43d:7413:cb3f with SMTP id 5b1f17b1804b1-43ea1fdc23cmr53880905e9.5.1743511617320; Tue, 01 Apr 2025 05:46:57 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:a1d1:bbb:e2a6:2a9c]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d8fbc1889sm154711095e9.16.2025.04.01.05.46.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Apr 2025 05:46:57 -0700 (PDT) From: Bartosz Golaszewski <brgl@bgdev.pl> Date: Tue, 01 Apr 2025 14:46:43 +0200 Subject: [PATCH v2 2/4] gpio: deprecate devm_gpiod_unhinge() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250401-gpio-todo-remove-nonexclusive-v2-2-7c1380797b0d@linaro.org> References: <20250401-gpio-todo-remove-nonexclusive-v2-0-7c1380797b0d@linaro.org> In-Reply-To: <20250401-gpio-todo-remove-nonexclusive-v2-0-7c1380797b0d@linaro.org> To: Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl>, Mark Brown <broonie@kernel.org> Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski <bartosz.golaszewski@linaro.org> X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1313; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=WbtXMBP/Lx9tJ7UhDb7HOi5xtDCb5dGgjCHO5zGis6M=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBn6+A+N4yVcT7sWbctWbTS7q1ERLNVyT6RkRHzD 9qh7g7uNlyJAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCZ+vgPgAKCRARpy6gFHHX chetEAC+00cV1S0cRNMEFzRJdv/r6HrmFnq3EGDYE9D5V0FjSjAKiBCAKSXmQjgYWx4RPzBGQDG uUFxUuTSC+5sYnvO6JssdDqKTX7KSvX3T/jIC7vgAfsDkfjLSOLD9Nj+jjKZtihQHKsLAiZhh5v r8ueH1nBOwMFimGEEiGPw9FHUu6uRO2NsLiUEEN1aLQcb3qo77XLZpHiVgcowqppSgS3fUbXHWt yOaRGKD3bIFTNmN2qy5QmBC3odQPS2R3J4M95Z0ySkfS2+KE8lGoeX3C9RwcDYXk1QPcgUBRSeR ZEgl2gphsjBBFtV67ZXv/U/+bpb99Xg3EebwCBeKUJftrWehPbD7gR8/jnyppQ0HLFfqEkzX7jw Qvsvcip8M90nI2C1MBkjCL2dV672xX3Atp/FwmMPRVCFhk5m87EXOfaCSnLFPrITM3SJtR5X46J 45GLuCPsRNkRcWGZGPgf3unddIpxBmqyV/VdkPjDfbW4p9FEe5nDmwXfdCxQD/HQ80b0MdCzNb3 VvyrVqTLYaSZldpUIlOSt0nKYTdgP3387GzpJ9vy7jg6GM38OaQQmnVlEjgfJlm8AWuImbInBfB MnLLQnil0z4QB2q6CVBMK6PCwc7wOfxnBYHYVDZSKL6lKG22vhYMsqKrG4bgnwtyfH3lWbQd03J 0EIxGF3F8QHILGw== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> This function was introduced as a workaround for an issue with resource ownership in the regulator subsystem. Rather than passing the ownership of a GPIO, we should make the regulator core be able to deal with resources it didn't request. Deprecate this function so that we don't get more users in the tree. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> --- drivers/gpio/gpiolib-devres.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpiolib-devres.c b/drivers/gpio/gpiolib-devres.c index 08205f355ceb..120d1ec5af3b 100644 --- a/drivers/gpio/gpiolib-devres.c +++ b/drivers/gpio/gpiolib-devres.c @@ -317,11 +317,15 @@ EXPORT_SYMBOL_GPL(devm_gpiod_put); * @dev: GPIO consumer * @desc: GPIO descriptor to remove resource management from * + * *DEPRECATED* + * This function should not be used. It's been provided as a workaround for + * resource ownership issues in the regulator framework and should be repl= aced + * with a better solution. + * * Remove resource management from a GPIO descriptor. This is needed when * you want to hand over lifecycle management of a descriptor to another * mechanism. */ - void devm_gpiod_unhinge(struct device *dev, struct gpio_desc *desc) { int ret; --=20 2.45.2 From nobody Wed May 7 22:15:33 2025 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DAABF202F9D for <linux-kernel@vger.kernel.org>; Tue, 1 Apr 2025 12:47:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743511622; cv=none; b=kv8Nmw6gORD4LKRuTAaFFKhoPXFFR3lJoXp9TS291NF0oiI2FT8/BIe4h+wrikW0yhyqQxA8/heFkY3jNNRbhW+LW2qwh3Ohqht+oibhQo9YFgHizVRXJ2RkofrbCI1yxTwwstENxhUt3MUH+sfH7/2fOhaTQQYn+5Lcr+K350w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743511622; c=relaxed/simple; bh=JkOG18MioYu8ChggNN0A+zNlGCZjt2SjnCv8Qzb6PLw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mTEgpnj0/FZh90c1OyD4NBKxtw3HvhKjlFnXjOg4kbNBt+KsCsLNEmTYtDcgPQ2vRoKli7OcjFj4IKJGlmCB0WaGWRXWofB+536e453cStsCQOv05L87sXOeaWnsYRj4O7n7rb30ti65db11kwTMkCwlQ6R/4MZ4takUReTnPk8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=xeQfMXP1; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="xeQfMXP1" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-43cfba466b2so55218455e9.3 for <linux-kernel@vger.kernel.org>; Tue, 01 Apr 2025 05:47:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1743511619; x=1744116419; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=O973o4r5OZyC9BZfOU3kqAN8fnVRgLDLcQzrk76LOqQ=; b=xeQfMXP1+fT/dsZ0xON4nKlAB108A1G3BTNUsTi3Zr+VhS0DJOIbMT+6/DQK3dKjdt Vm/X5dVOvqrsCRs7Sa894fJcv9sD8l1ZPPV3hlicjdJEM9h1hnhhtW4fTvBei5wsv3da THHFzkVzn+fF99o+aUt9trMfVsNyUH3/5+1P/a1OgjpzrbHwdJd/rRDOkBDFlUeEE5rO lmlyGk2gIy+fx/wMlbcjrIDzUxdwm7g6Q1BjNB3aLlbEQ9h30eqPECm/0NMOQVd9Dy7w NF1dEWJByf9SI1nG5RFsv6IzccGmXibQc0Nwq0qUTRJvnnsEeuqeSaqExCj+OZf4CykL ii0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743511619; x=1744116419; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=O973o4r5OZyC9BZfOU3kqAN8fnVRgLDLcQzrk76LOqQ=; b=kQAZ1NXaHJAhVfraLwXLMxoZddBB/DbFH9t2w7mQ3HDJDzMggwoJW0kQf8yaxjNMTq jA9GKNE0LU88fVToAy8osEOpaLwIlrnK0OgHx5CqwQLGQDW0Cbx0xTjMPZcW0+YruS7O Eg3HbkqWytrHRIAvXEtS3baU0INvRqa0/t/wjQwDsO0V9kMVnNhhUdeuueA3l5ftMJhG pPCxtjBD8FvwBqimo3u/ttuW9TjTJD2YZPyV4toVZCrs1BZ4onGCE1nXcPr/QiM1R9Sr c9ju8CveaUjZ8BQ1sMlXxvJCtzXVLXVUB0N196qgz7py3IHw+fReyHtWxVWER4XVLwU4 64Xw== X-Forwarded-Encrypted: i=1; AJvYcCWCxPRqwP5EwGWg2GMnC0NsBjHmkyazOqUbh4Et/XcgtTgz70IsEsXA3l7vLIwUNUPgqGAvdRaxT1lilfU=@vger.kernel.org X-Gm-Message-State: AOJu0Yy7DH+zdvBj2Aem0qY51xG9A4ByWKq2SqCXFlVgLo5MIAJbmuqk VCiFpNbvcgDKS+mac//W7Gjsvid/Sz6EXnRkff4QVhGf6DV7R6Gnz7fu3ravOJRrgQaI1RFRwF2 e X-Gm-Gg: ASbGncuBhwAYELYgLyY3jPoAseDUvdA22ymGgAb2dK82O7Um+klEzqwcupLvosjgb8L zPMJmEffiHJYbEIOfvaTxBmzAOLaG/WoJ9VlvYzSC8BjnGI2xPiYoHQXGUxDvsrjHeGKvGuVa6k oMgyKGE+pUwnKpXaNcStmHOZW1EZb4dqkmxeeVQiFV9fXmZADA1ATXs/1QJKgZGDOX+OWDUDPfF YI771IfRhdUiMjos8pgeGHYUmw+YmqpwtOT8Wdsmta61WSAqo9DEBgzabaE37QAd4syLFFznR4f kUSHOdvnxEP0b7/mDGVfNqJdXJd3rwVc29Et X-Google-Smtp-Source: AGHT+IGVViAJd2BFboWMnm9/8gwix+c7PzYTgEUC6yQjbYfGsDLLy/NtUnA6k9FYa+zAPP3wsDcCTg== X-Received: by 2002:a05:600c:4705:b0:43c:fffc:7855 with SMTP id 5b1f17b1804b1-43db6249861mr118603305e9.15.1743511618977; Tue, 01 Apr 2025 05:46:58 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:a1d1:bbb:e2a6:2a9c]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d8fbc1889sm154711095e9.16.2025.04.01.05.46.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Apr 2025 05:46:57 -0700 (PDT) From: Bartosz Golaszewski <brgl@bgdev.pl> Date: Tue, 01 Apr 2025 14:46:44 +0200 Subject: [PATCH v2 3/4] MAINTAINERS: add more keywords for the GPIO subsystem entry Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250401-gpio-todo-remove-nonexclusive-v2-3-7c1380797b0d@linaro.org> References: <20250401-gpio-todo-remove-nonexclusive-v2-0-7c1380797b0d@linaro.org> In-Reply-To: <20250401-gpio-todo-remove-nonexclusive-v2-0-7c1380797b0d@linaro.org> To: Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl>, Mark Brown <broonie@kernel.org> Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski <bartosz.golaszewski@linaro.org> X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=814; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=pMJ2ejTqSuURn65EkjVC6Jv3tiwHgCNsCp47X6QxcOY=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBn6+A/8aahbPoNTEGgiXVAM+kIMRz0Jj/rHociv ncxAtmlNaaJAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCZ+vgPwAKCRARpy6gFHHX cuVjD/9w9IWz2tPsJvuXLNlGXcEOwMrx5we5lWrKpa1ucn91TaKhbSMDIwDWLTFYTa8KVmecYoy GOJyr2FmbqiwVZpBAaTJujcL3bUOC/PjRJBKjwxRPgaQ29yJ6tKGtM3buP43qbO4k9/VErmP8H5 pD+MnyYa+weouY3ePnyogo/i3Q1eHLfzvRSq/alQkt2WtuaC4HvpJq9NXlst6NTn4wVhA+x+88p NApBI5Pe8Z6suGEMarymJLqcQaJGSPbvCPcPvnUgx4xBrdeEbUGCM0EAz1996YJt95nKsI4EGga xHi6zntJ140VEyEMkub5+ibTci+MpTRu2qNg4muvHXcA/gihai3tAYgrEL0pUjNB6sSCQs8Stwe gOQb7A/HysiJC4BqtPOSdHSxukW1SVd+KrZYkSyi5eNB5QZt5sU3FpqlD++mKp13Rgr2IOkysOG gD2HgnD9ddn/86bGA6Goy8vtLNrjEmDTFT4TX7ICMbYhZHGbHDmscbNP4EbK7SV29dak3RJqHaO w5vkvgXCQR1lJbZXJLPWbmf5z4gWkt/Ciao1Hj/m7itrrFAX3zj4A7KTuI2NURcG0iy1zmKLqIn NTuubW/CcR6L3A3wkhlkOEkz8h6dsFNSk00N5D338VQwNj2rBEVaFxs1rFaf73M66swsyesojZH 6AjiN4QHkfjMpRA== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Add GPIOD_FLAGS_BIT_NONEXCLUSIVE and devm_gpiod_unhinge as keywords to the GPIO entry so that we get notified if anybody tries to use these deprecated symbols. We'll drop them from here once we remove them from the kernel. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index ce2b64f4568d..0ce265332577 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10151,6 +10151,8 @@ F: include/linux/gpio.h F: include/linux/gpio/ F: include/linux/of_gpio.h K: (devm_)?gpio_(request|free|direction|get|set) +K: GPIOD_FLAGS_BIT_NONEXCLUSIVE +K: devm_gpiod_unhinge =20 GPIO UAPI M: Bartosz Golaszewski <brgl@bgdev.pl> --=20 2.45.2 From nobody Wed May 7 22:15:33 2025 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD0BC203709 for <linux-kernel@vger.kernel.org>; Tue, 1 Apr 2025 12:47:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743511623; cv=none; b=QBmJOQdJtSHK+OPefdtrSdpK9YYCqSeFhQgn7AOqz+3cd/6z7UJE1EuoNdOI7frVimlnXDIbIKp8zSuphBES8gn0rMuWTVEGqASgFiedzWo0m8xeGFkA5Ib6dc2X4Co/y22p7RgOjOvlzkHeQwGDLZJ9Kux1pW3WGjW30khNUVI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743511623; c=relaxed/simple; bh=GnrucwK3wBDJOuGf993QhhGPNa9SjUynbuL3Y9sy9PU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ev3cAVZPbZPZyvRk0yX0/hlvu+GXrX3ctslUXY9Km6ZtcyNmiNuTNdMVq/Ri5IUqs6rPGqZrMnaRyWQIp7+LbYzlDyek4zlNqx+WswSr3+fOSfiEMCb+um/0mm11R2D5oDwXEyHcMiYF4CfOFY5Guuw5wmYIxlGc019CItYPy6s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=DVqHWIUW; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="DVqHWIUW" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-43690d4605dso37782395e9.0 for <linux-kernel@vger.kernel.org>; Tue, 01 Apr 2025 05:47:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1743511620; x=1744116420; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Ru/kCs6fPOtEnmEL1xXoiZTrgpc2bJaLexsQ8fcTImU=; b=DVqHWIUWpie5gEHBtHKIqUDzasR+bZ0tE5zP2fEA6s0gk3xRR9h7sGO5f0pZL76iWE u0Of6kwnrmo0LthNMZNljJxNGysgmjJ37VAGUFtIIihIwzcfQVBikwD79W70oIljOkNu BNHWIgWlH756qkV6Bv8LmT86DMKny1A7DbbCIdgjTKTDbQIcuQ6K6FaQliPO8oZQ67uE XOTI6cmkWX2BzPL0qAh6tKAmxthEO58CwnRYPqX3+mMMfik8smdc1yNXhRLNWhj3BMxs bEy2u0oUSkgQ41MQI3u5gqqfxy6t9fvhKEDQPKdQZQcuFrappX0jnSrimabIIrg7PrZD S8kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743511620; x=1744116420; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ru/kCs6fPOtEnmEL1xXoiZTrgpc2bJaLexsQ8fcTImU=; b=U1gqYG034PjzbOvUaBBR2MoKk2rZQnwX/CpYQxDgVlG6FPi35YFWQlw+eSdy5+Kg3/ goEFx3YcezR9W1UcQY+APNBfkzskq5AOdMPqM9AXF4TPzeBMBlgK/yX44DYhB6gFuYgg aJv2GyH6hvenZaa0pYoj1kEErXt0sBN42vIvWcywbzR8FxlyTVst9DxzcjubWTMZDYWd OvnT7G2iTBvZoXZCVFw31B35MDAIxTiTpYfVHwtJJGJDhreZWvzrVDCtru8D08+fytcK CEV+jI86eI3hZ3yBEh4LhEoFyLMJS7mdt6FHoJm+SKLkeaqy+yyyriGgkaetzqVuyGpE FzEw== X-Forwarded-Encrypted: i=1; AJvYcCWjt3GCUKO1aTiKg4R+Pvm/NjBlOxBk+IbDKbWJ2fNsDEvSvYk4m9zu0NC342uVNKEZ2liy/CHnFQfu75U=@vger.kernel.org X-Gm-Message-State: AOJu0YyZ5bVl299hh2WvjyJBt+c8CR02qW23hHWTtDq0Ug2Nlxzdhojs Oy8h9MKXPTu7dxD198i8Z5XXSN5QA7h0XdyM9QlBkcCOFD8hGklIsRhSRYxEKhCJxKE7v4kG4PO + X-Gm-Gg: ASbGncspC3aOaJHSiwqVDxd0GCv0PBfe2U4ul4JUV0WGNw1Wmp6xML78ezPWhyKeuxM vTBEamB03BBZgI0LVKgbZ9Q7Kb9TISI8VU2uBr9/b2IWfuwfWomfdQK+goyx93uZPZLr0Q/0XKP 0u1n8ndSEbmg8toHIEEnd0wrodskNb11399WTxKH8cJ3OWAIW4pdm6vzmNNhZahGLU8d/GTHKio W2YG6WgBswACLkaKSpT683jd93xy2EaeHgNn3/Vg/0I4CESjtMQycAR/hj3ivuxRSI+rdMJUrm3 P+ck6ebR6o4wZuVtZkRou4jsXGKhZwWyR+uO X-Google-Smtp-Source: AGHT+IHItyHH2EZ4mRoUhQ9o3NHL0wZrgwkzTBEFAtYB1xr5BdYYW0bABHCjSUvE7hwZnh5gnfHZ8g== X-Received: by 2002:a05:600c:3d9b:b0:43d:10c:2f60 with SMTP id 5b1f17b1804b1-43db62b763dmr116400685e9.24.1743511619813; Tue, 01 Apr 2025 05:46:59 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:a1d1:bbb:e2a6:2a9c]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d8fbc1889sm154711095e9.16.2025.04.01.05.46.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Apr 2025 05:46:59 -0700 (PDT) From: Bartosz Golaszewski <brgl@bgdev.pl> Date: Tue, 01 Apr 2025 14:46:45 +0200 Subject: [PATCH v2 4/4] gpio: TODO: track the removal of regulator-related workarounds Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250401-gpio-todo-remove-nonexclusive-v2-4-7c1380797b0d@linaro.org> References: <20250401-gpio-todo-remove-nonexclusive-v2-0-7c1380797b0d@linaro.org> In-Reply-To: <20250401-gpio-todo-remove-nonexclusive-v2-0-7c1380797b0d@linaro.org> To: Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl>, Mark Brown <broonie@kernel.org> Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski <bartosz.golaszewski@linaro.org> X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=2684; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=zc1zKN3/KwCiY/o3NNRg2Y1Q2MbeVO4dJU8b/Lwp/As=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBn6+A/6+i4htRXdHudS4uj3buYx3Z220bI+AxQo xOYk8MMoxGJAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCZ+vgPwAKCRARpy6gFHHX cijsD/wJ7YiUVP0UYIZ8BUaAUNToJYtnpFiE0Pqy/HNjTu1WLJe+lXN891Vm80+KmsDxzq7zTYA vemMk401D7rmc7DcBQotzV2NVGEyp5RMiiQH7sLPFtICJaiLzQgOs4I7FPGuEy4hVmoxplm6Td/ 47rEpNdnIHBlV1LIF58v9iCTxXcuBxC837cyQglzUNQc+ZZVu9CjmS3axBO2UlaIFUe2iOsTTwk q+pOoQvNSqq2o68z2Mx9UdHBsIXXEYJziJcLhK3ocDTbcfglJmwd75muvbQ6aWUpeMzp+gE6tTP JBvJD1HyUCmaWpYoYdpnyZSFrhJ10ICG5gBxKVPdEjozOymJ65zXD0cTDWKerTs3gy7FqQF1Ey+ Gg28WcmVvMhE7Pwbt4ZMERl5vkfs7kOcT4SPeW2EDLk6Oi4Yg3MlF4lXX8YyMVlLsrc77KBI2Qy +j203DMerbur9A4o+KVf1FuiiJVFxIVikEtvgs553R0h5pcgCqgn4apCCxpf2Ky0rTiM78TpzKP ecbB3ntZ1ICjgQZytaW53GN+Eh7BsM8p6v7lvHu7lRRcb3FUsX6E658AvdgKA1PXvZLlCEtLvRZ BuUchLgz7YVK1BfVE+7GaAGMwVFnOjwR2EakSX40zTjg6fVv0WZTwChurOXRap+7i5YUxWhgktz BvcLoVlMI76pmig== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> The GPIOD_FLAGS_BIT_NONEXCLUSIVE flag and devm_gpiod_unhinge() function should be replaced with a better solution. The pwrseq subsystem is a good candidate. GPIOs themselves should remain a unique resource. Add a task for tracking the removal of these deprecated symbols. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> --- drivers/gpio/TODO | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/drivers/gpio/TODO b/drivers/gpio/TODO index b5f0a7a2e1bf..4b70cbaa1caa 100644 --- a/drivers/gpio/TODO +++ b/drivers/gpio/TODO @@ -186,3 +186,37 @@ their hardware offsets within the chip. =20 Encourage users to switch to using them and eventually remove the existing global export/unexport attribues. + +--------------------------------------------------------------------------= ----- + +Remove GPIOD_FLAGS_BIT_NONEXCLUSIVE + +GPIOs in the linux kernel are meant to be an exclusive resource. This means +that the GPIO descriptors (the software representation of the hardware con= cept) +are not reference counted and - in general - only one user at a time can +request a GPIO line and control its settings. The consumer API is designed +around full control of the line's state as evidenced by the fact that, for +instance, gpiod_set_value() does indeed drive the line as requested, inste= ad +of bumping an enable counter of some sort. + +A problematic use-case for GPIOs is when two consumers want to use the same +descriptor independently. An example of such a user is the regulator subsy= stem +which may instantiate several struct regulator_dev instances containing +a struct device but using the same enable GPIO line. + +A workaround was introduced in the form of the GPIOD_FLAGS_BIT_NONEXCLUSIVE +flag but its implementation is problematic: it does not provide any +synchronization of usage nor did it introduce any enable count meaning the +non-exclusive users of the same descriptor will in fact "fight" for the +control over it. This flag should be removed and replaced with a better +solution, possibly based on the new power sequencing subsystem. + +--------------------------------------------------------------------------= ----- + +Remove devm_gpiod_unhinge() + +devm_gpiod_unhinge() is provided as a way to transfer the ownership of man= aged +enable GPIOs to the regulator core. Rather than doing that however, we sho= uld +make it possible for the regulator subsystem to deal with GPIO resources t= he +lifetime of which it doesn't control as logically, a GPIO obtained by a ca= ller +should also be freed by it. --=20 2.45.2