Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1734432rdb; Tue, 20 Feb 2024 05:40:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUJJtLLLWfHGjdvp3zb7stwuRKSsHKfKi/5Ssh8pvwOC1ovQDU1i3XgLTpCq1pqIkEjUhJ4vp0RkARb1jD2E/af7cZqg/ZHQ7PyJ/gk2g== X-Google-Smtp-Source: AGHT+IFdTpXo73NIxxxkvGL+NPFd4nZy43iGOQZGtawGEa9xmiTli/krqseapG/55gqmjrc/gHxe X-Received: by 2002:a17:90b:33d1:b0:299:592a:7d19 with SMTP id lk17-20020a17090b33d100b00299592a7d19mr6992820pjb.3.1708436406347; Tue, 20 Feb 2024 05:40:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708436406; cv=pass; d=google.com; s=arc-20160816; b=baxjF9SSdmjevVQ7WoTaIIUrkItCk0YKYnPcxspQL9KPvFdIFo2/CSqVphNAHnE/Ts l9uKhcdEVYO6/PnYDlgRhOMLukCOlMF8EccssrEFMP2klINj80srjYNb6y01Vmu8yMKX IJJfORxf/3xiG7Hk3nCUkK0zmbJxnBxdovb431FLuGVM+mVjXdgmaNu0KHaeYvCC6RSH PCUb9OL2RBLcp+WIuoikQwZS3AgjC89aW7RsEt6CRP4Ie/ATbUkkzD8N9brbj4MSGiGf RpTjZMNcOGWNyhtbEbmcPJMOYanhCqzqVzP0eODb8S4DJmer7Asi4awQMUUbhzjX6FZi DnNQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=JR5bxG1GSyiF5ERk11qYZtMLEqsuYC3EasEln4G35iQ=; fh=QafpXXBPN+evVxhvNLO0vOTmFz/JzXhK29Onx49STnY=; b=ArPzeMLq9xxAWYHoW90ViHhJ2PgrbobLvbaUtXEcuarLEDi5jqIz1rSzwNtfS1vK8W UebJqnNx4wNAuHGOY6E2uD1Kfx26esZBXn8nUYn4YeqcI9N8oPPI77ke49Pu/ptXTHyj wCkYCbn5NILvxiVE0VKn0UMI9jlIiIT4llCf9zeQVDEDbWMCUF6FY3s5gSWpCukvB7s4 KMF2w94+I7jhQ1M84necG+/KZ+ZV2yzLnGR0PKI5n57wIgt/bfUDlf4gNrtG+S7fv4/I +ozh6rClCf3uI/dKJwaJfUfQItA250c1DfQak/HjTBpce3AJubHL3+6xvwoUfaN2i8j6 NRTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=D0wVH8Zx; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-73083-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73083-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id a2-20020a17090abe0200b002993be51a7dsi6311383pjs.163.2024.02.20.05.40.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 05:40:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73083-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=D0wVH8Zx; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-73083-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73083-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 88ED9285940 for ; Tue, 20 Feb 2024 13:40:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B4B1B6A34C; Tue, 20 Feb 2024 13:40:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="D0wVH8Zx" Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (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 5DE384C60; Tue, 20 Feb 2024 13:39:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708436399; cv=none; b=sT6n54azLk5rQuURgA8PyR1VIW8iRE//RDEMoIAEfV55s4I/Vlsfs3zouF/2gS+kx9Ia3+3lGpBnRYvKAzjSK+SRBUhxnUb6R1YLpwjMmr4u/Falqj2uIo2nG1bxlAAe3QsZB5V4ltTKyHqlR4hlnUurIVcSAem22FJgWhjj8Yo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708436399; c=relaxed/simple; bh=maUOB1I/kGF7pxO+VAjAEbO4lZcaywIU34qr1xonNlU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=l0IMDBQv6nIZbI1FIpsSp2FQyVf80i4yQHkfMroHCz3lAmrfin4viRvoxSuiPTuJ/P7e+boJQf9r7NlNy+UUP+QQHrO0TjFh59AqIOEybXjEVEjRDiTQwvBhzwpCi99oMvrKvkBxfk6S0un534QnX0S1wHrsNbiluwmj7j2EEdM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=D0wVH8Zx; arc=none smtp.client-ip=217.70.183.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPA id D42FF20004; Tue, 20 Feb 2024 13:39:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708436395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JR5bxG1GSyiF5ERk11qYZtMLEqsuYC3EasEln4G35iQ=; b=D0wVH8ZxwoErTe+VqwqvA29q5zZjYHP66v8cKgfbdKh70MIQBuqFMtf1xTc9Bcyf9i+wT5 vFvkzyHA8FdGvsppHWxBjlVYwDEFbOvEV/Ew3H68t4aVwwVbECf0uGX/c1RrMkGId8aL3U YNkEkee0IPomt0KwmWaPdTPign4o/Ds85GxDvmAW88LTWiWY8Ye1UJHyR2GEsJ+S034PjA +1dIqXA5f3yKos+E54FvA5r/DSe9XV3msVL2TiqAqFNfK8K3KAm9eH1bmHjZAN/3uq0b7u ZcQCZ0FPn9DermON9GYt9tW+fjnKm0G1bkoTrzUPc6w4UnNdNvyW8wWK0RuHIA== From: Herve Codina To: Linus Walleij , Bartosz Golaszewski , Pavel Machek , Lee Jones Cc: Saravana Kannan , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, Luca Ceresoli , Thomas Petazzoni , Herve Codina Subject: [PATCH RESEND 0/2] leds: gpio: Add devlink between the leds-gpio device and the gpio used. Date: Tue, 20 Feb 2024 14:39:47 +0100 Message-ID: <20240220133950.138452-1-herve.codina@bootlin.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: herve.codina@bootlin.com Hi, Note: Resent this series with Saravana added in Cc. When a gpio used by the leds-gpio device is removed, the leds-gpio device continues to use this gpio. Also, when the gpio is back, the leds-gpio still uses the old removed gpio. A consumer/supplier relationship is missing between the leds-gpio device (consumer) and the gpio used (supplier). This series adds an addionnal devlink between this two device. With this link when the gpio is removed, the leds-gpio device is also removed. Best regards, Hervé Codina Herve Codina (2): gpiolib: Introduce gpiod_device_add_link() leds: gpio: Add devlinks between the gpio consumed and the gpio leds device drivers/gpio/gpiolib.c | 32 ++++++++++++++++++++++++++++++++ drivers/leds/leds-gpio.c | 15 +++++++++++++++ include/linux/gpio/consumer.h | 5 +++++ 3 files changed, 52 insertions(+) -- 2.43.0