From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (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 AFB3269D0B; Tue, 20 Feb 2024 13:37:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708436229; cv=none; b=dMcpikVZ2VZjDNNCXL2j8U3FLhy8dXcRxV4CW6YeB+WperkG0mWAO/q33AGivCFKZOtVLleZutKVBou+pvVOafJqOZbz2j7IXSNgsC+7RqIc/svW7NaVmgd55dLXvpDVdy3E5cceQCiQ9+hu7XZCIUIHDq20kJG3DnDKkMjiNcs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708436229; c=relaxed/simple; bh=8pyWLegVqBLuGiX9D3EQNf/dKDuFEepE0jrXaB9ywGA=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=J7UnBePJnNKiEYAYMAnooBsK17aGKhCK49qbGlfd1kERevSS+E9HErM2tGUP8Yb0Udrfp7Iwp837RC6Ap0PnK1cGM9zCiB8BD0ooBgG6p8jDMhP+z1d7a5RI2Vwr4qMHu9rl9yHZKbtGbsSLd5odhjKaOj59FReFOAzw1OG1cNk= 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=K7wiOtjR; arc=none smtp.client-ip=217.70.183.196 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="K7wiOtjR" Received: by mail.gandi.net (Postfix) with ESMTPSA id DBDC0E000A; Tue, 20 Feb 2024 13:36:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708436219; 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: in-reply-to:in-reply-to:references:references; bh=lmJhNa6Pj+YXDCxepZDS/382SAKzEEjdpms57STtfOk=; b=K7wiOtjRIaT1+CE4MNIdZSF3Z78QuqUf+XMm9968VrTMHxfeTT2Cyjils/3Qq0scGqWzPP hYPKoUUFBkGnXvOzaiWV70SKY52gQnNf1TEml31cHuo+a/MmEkcRAIXtHjtXD5/ZJWXZM4 NHJUzC7644g7O6BYu2wNsX1d5ULyNMJoP0uFwkHSxQuTusCtXVNDkx5XbihDDLZOxSEFr7 cyUyllKdR5wmRlLip8pg38hjl0ZpPFhVdfEO6xTG0Chxfsow3aljqBvT0TjkyknCxlTxiI ISMn32efHQeSFvIuJENafzjqroKlGAogyU4UaLvcU3x2ZYerPWUk0UVpvYFyGA== Date: Tue, 20 Feb 2024 14:36:57 +0100 From: Herve Codina To: Bartosz Golaszewski Cc: Saravana Kannan , Linus Walleij , Pavel Machek , Lee Jones , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, Luca Ceresoli , Thomas Petazzoni Subject: Re: [PATCH 0/2] leds: gpio: Add devlink between the leds-gpio device and the gpio used. Message-ID: <20240220143657.78c2d3f9@bootlin.com> In-Reply-To: References: <20240220111111.133826-1-herve.codina@bootlin.com> Organization: Bootlin X-Mailer: Claws Mail 4.2.0 (GTK 3.24.38; x86_64-redhat-linux-gnu) 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 Bartosz, On Tue, 20 Feb 2024 12:40:17 +0100 Bartosz Golaszewski wrote: > On Tue, Feb 20, 2024 at 12:11 PM Herve Codina wrote: > > > > Hi, > > > > 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 > > > > You should probably Cc Saravana on anything devlink related. > Sure, I am going to resend the whole series adding Saravana. Regards, Hervé