Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1732972rdb; Tue, 20 Feb 2024 05:37:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV27IUlCUTYsO5toWHXhw/thebBlOoTSLHZLGrQkNRfujWGJKBMhcPLvS953n42ARjJH73a8ygnM29QQYZ5RtzT9XGTIsZUQ3BeJM3D8A== X-Google-Smtp-Source: AGHT+IFtdZiEikVk/oQnPhtFyH82VuZDfoFjOBPB7S1MznNhKydVgHzBLBiVJkpD5nKt3Hdv6U1m X-Received: by 2002:a17:906:3d3:b0:a3e:e3a9:57e5 with SMTP id c19-20020a17090603d300b00a3ee3a957e5mr2005855eja.58.1708436237540; Tue, 20 Feb 2024 05:37:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708436237; cv=pass; d=google.com; s=arc-20160816; b=oaa5loYi5odxEZz6ZxOPUxxoAZgth7FXgqaeb2Jjbw4FNDzcGtPpYlnT3egihou/7a V1W6OaLEnxW31eWq/qIYQmse3TkLiH2Myv88qVFyAvNVMaGz2CqUJ5TXBR8YYLfL/Y8P mQwQVGiIHLWztfAnkTqVbaGyJITR9qwGd3xVMSHhD23qTBhugWf+a+rSqUS3Sbu+Vt7C FQRQ/gNDcCgqH/DELtg0SQrSjtch1VpiiXyIW7aKTfOCOPHKo7d2y+egXEjA3qKOh60o KakLyuepcVWnEiW8FBnG4g+y/trg+M6FaNAWDgJrfHArp3UgBk/onLmyzkJHhkTEFgOg K6bQ== 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:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=lmJhNa6Pj+YXDCxepZDS/382SAKzEEjdpms57STtfOk=; fh=HFXag7lWE2df9Wa6Y3TTXfB4iU9SlWvdfNaqmZYb4Lk=; b=fLy1s9Dbaa+EDq+WMkImkCOluIf48Xuf5YxOIi2iGp3KiS5Hvh/rMpxsCVK7+hdgcn DHfXDyzAl3w0O1t8eMDWV9VQFzpI46/kPgKuDFthtrWr/rSQCFZ3mv2NlKvWPHjeXZ3E BEnOXXEySpH/eWMXfFchvEmJM3E6ECD9cNnFPHggg+KZJ3uTJzQK6EgI9HCE2O34xQS6 lfjAvCKXseJxiAUgz5lCrTh33kjyyAATB4Nc8DW21cyT+91qYM/ADSesa1w88ow07Pew /Qey/egc6HdD9YpdMCekMlppM7aDT9+CFhWkFsPiFvSE0rpUd7VKJ9wN0xz0i5CfGzub aIGg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=K7wiOtjR; 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-73081-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73081-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id hg18-20020a170906f35200b00a3f1a6b346csi126459ejb.311.2024.02.20.05.37.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 05:37:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73081-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=K7wiOtjR; 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-73081-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73081-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 4F5441F23121 for ; Tue, 20 Feb 2024 13:37:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B2C286A341; Tue, 20 Feb 2024 13:37:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="K7wiOtjR" 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 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é