Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2699532rdb; Mon, 12 Feb 2024 13:32:19 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXRzDdM5agbPSl3mELClxbaWQC33QfNJS+e9G+fxrfNT6TyUpZ+sRAbr3zGHQQ5yjKaPWE7xFnWEK+EP5m3HFA12u+4bt6SmC5dzwUa2Q== X-Google-Smtp-Source: AGHT+IHAZi46Hs2LCjr8RH/BVjfxtTKELgKOGfemcpAtBf/+T3feMIDsdmdow2jpZMh1RIH2kU5S X-Received: by 2002:a05:6808:2190:b0:3c0:2b52:267a with SMTP id be16-20020a056808219000b003c02b52267amr10699310oib.11.1707773539408; Mon, 12 Feb 2024 13:32:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707773539; cv=pass; d=google.com; s=arc-20160816; b=uZVmRlGn5EC/FUiVmlX18dFXubId5Mm4MDMqKlIJdfFqdpGc5Wtwv9nNA0UeTzr5eo gMZDznPedo14tMtWcI0NZBM5Oh7IyfHKP+Kc3A4vBV290647r+8Fh69+F3giW6A8tvQm sZNUyXVJibxFlR8tg24bezZ0QvOx2phfW5/6oFEbcK+Pu2bYKUA3I//n0tgmX0ILE8s4 oSvytZ+rJwgSBj03cbYxomi+n89n2jzXmJ92RmfwRWoU513geEZp+v0qEDffVY9mlVYp OOuQuelMTHbpGFerKdW98xLJq6MV+co9hMsMcf1gNhsSoam7w9+GQeXwuOlnsiDs09U6 0qrw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:references:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:in-reply-to:date :dkim-signature; bh=+K3jZfz6ZJpM1n2dt5cwkWjr08+sSZMq2mLrsQ52mPs=; fh=VmVVRHRKKz5SuFUhKuWMTktrzRVMFxRsD1HKIgRXCl4=; b=skhSxSjp8OPO88qQjkSiLgQGKc9R2RINf+cozQfIPi5E1A5k9u9EV/X5iQ3QA9iYgP G5uwk824XjueZiGx/qfNx0B2EgMGNZSKINATOo7pd+aevLwOj2KK8Q0kCX9dCZWk5WIc t8gE8VgEuvuEZ7HNqVIjzPaF2m7LU9W7u3LZius29RSM0FNtjInNMPtf2wlo5uv/1trn KHoRUd48jWxWfpvinm65kbtsWNAYNBMTkLtYYNNnSEOD4KH/CTBMB9zbIZLJ/fgXvMHz p4hQZghLuPUGJNzC7RL+4IB0FS7kQx9G1LIu2fjMNydasl16fcCxE+xoX+RrjQun9+tK F2CA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=SWwCTANO; arc=pass (i=1 spf=pass spfdomain=flex--saravanak.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-62393-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62393-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=2; AJvYcCVoQnfTRtadVSjAa+w+Oa+CjkF0kEXjurPNRYdpr2/X5f9uw4Ojm+Z67M3lsICcYc5FT5EdJu/xh+Yuj9sbCBPovlKUbMh0ZNaXWME9EA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d12-20020a05620a204c00b007832f29a421si6529738qka.361.2024.02.12.13.32.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 13:32:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62393-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=SWwCTANO; arc=pass (i=1 spf=pass spfdomain=flex--saravanak.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-62393-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62393-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 29D461C22518 for ; Mon, 12 Feb 2024 21:32:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3239C4D5B4; Mon, 12 Feb 2024 21:31:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="SWwCTANO" Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (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 86A524CE0F for ; Mon, 12 Feb 2024 21:31:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707773517; cv=none; b=NQXzR3OYrUSeGtLmVg0zJvhAvfSpnfCRt2g5VULik7dV0ohAAkBnnfp3S90K9THQy+qKhg/EsEXI/KQWcAkzLI7dw5w5M5KFaGEPxgrol6een3cBpR7miNmFPSdfpd6ekEzs1LoUBiaGyPYdMBmem2O6o7uchDEPvENM2aKif2U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707773517; c=relaxed/simple; bh=sWUmF3vh9o4HGU5Ho8G3VWDldprPEGq5gO9RSRL2L2Q=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Cc:Content-Type; b=Ah8zi9AJvpKgf9rgFIBQw+QsTzrUic9YVfYE5cMaUDzewrMq5BaAjT1DoJ77xTy/jlxRJsf+u+P24jCgHgnKcnrslvNZN+74phB/0b2a24rkuridT20/3e5EioFTYMViw/1SPAvcS4cIogNgdITbev86Zu5N7cUM3v6m1dw+/Xk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--saravanak.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=SWwCTANO; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--saravanak.bounces.google.com Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dcc4563611cso335279276.3 for ; Mon, 12 Feb 2024 13:31:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707773513; x=1708378313; darn=vger.kernel.org; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=+K3jZfz6ZJpM1n2dt5cwkWjr08+sSZMq2mLrsQ52mPs=; b=SWwCTANOSojhEP/TPDLG2MAkbnsPBHvzOb4nHKVYPKWax76GqlWab2GpaaCa6UEPAA 5gnnbwcWHNXCo7tHkn4SPZxMhPcLGrZPwDeDpl+OhncIHOL+uA8d5IGFvBpvVXeXdfwV ttirQYu4301FK7s4Ft3838L6fsr6OvpW6qhR5uC8FfItmGy5vbdPmXBDTKsGT1HXqQLn 1vL+J9B4FSuypUKGV0WHDoGOX9BxrKjAlFqaMtlHlA8BKiTSSiZtkFgM0KBLq0efn0oU LG7YI8aVleZ2lRMhC0zPI7EKctU0GQmSPHllimq8RhwaO/vIVDm9B+UmDDMjNbBxqJ3Z +yYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707773513; x=1708378313; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+K3jZfz6ZJpM1n2dt5cwkWjr08+sSZMq2mLrsQ52mPs=; b=QlNyM3jTIhpP4/6YnnMhoDvHGJhJBHMGvR5vfUU3RLvTI28m4WWrMZGpS2Y2idBcIM pQnNC1bWmlQYuFNPYCZnkuPJbCAqK/9dccO2mgSxJjq6Iu50AUdzdU3SVTcuDLRNCMhK IKUV8FQ4bN/g7VPnuHrhDa7HV6M7DPtOlVgJpNndB+j/Fc7Mnsu5WjuWAsS4JAriIJbo 4XGLR16bRkjY0F3DccZWc3MfnO6Qb4YAQXR5qktOD7i8tIDE+nIGU/pOo52EW75LX1y7 l5RAN/aqXoLIDYiwYv8Ak0rJ44wJFmuHtLBkcTR8ozmaAQf7a3UVW2MkuqjOGCcMjv53 G2ew== X-Forwarded-Encrypted: i=1; AJvYcCUIzmq/1K40kjsf1QFf9Q+Dh4WXZgKGLYENjBpqBOyBVyQHfuhHmrkLAc9KiUwXqrysg058NeTHHSH+3dpS3P79W+cD28gajvMHI0n0 X-Gm-Message-State: AOJu0YwaGNj5XI9ELEUtrcijWJGQvzvaVNGtKzutDR1tsSXZkWlMWWN4 jUtw43r3/kY+eJyHOfdQsF5pEg4Y5CpFiPWArYeAWmNYzf18+j28CkHRCFzMCLMPDar4Px3xaSv E/Qpfc57riCIRtg== X-Received: from saravanak.san.corp.google.com ([2620:15c:2d:3:496d:5de1:a404:8bee]) (user=saravanak job=sendgmr) by 2002:a05:6902:728:b0:dc2:466a:23c4 with SMTP id l8-20020a056902072800b00dc2466a23c4mr2039431ybt.4.1707773513682; Mon, 12 Feb 2024 13:31:53 -0800 (PST) Date: Mon, 12 Feb 2024 13:31:42 -0800 In-Reply-To: <20240212213147.489377-1-saravanak@google.com> Message-Id: <20240212213147.489377-2-saravanak@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240212213147.489377-1-saravanak@google.com> X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog Subject: [PATCH v2 1/4] driver core: Adds flags param to fwnode_link_add() From: Saravana Kannan To: Saravana Kannan , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Greg Kroah-Hartman , "Rafael J. Wysocki" , Ard Biesheuvel , Frank Rowand , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus Cc: kernel-team@android.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-efi@vger.kernel.org, linux-acpi@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Allow the callers to set fwnode link flags when adding fwnode links. Signed-off-by: Saravana Kannan --- drivers/base/core.c | 5 +++-- drivers/firmware/efi/sysfb_efi.c | 2 +- drivers/of/property.c | 2 +- include/linux/fwnode.h | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index 14d46af40f9a..33055001e08e 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -92,12 +92,13 @@ static int __fwnode_link_add(struct fwnode_handle *con, return 0; } -int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup) +int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup, + u8 flags) { int ret; mutex_lock(&fwnode_link_lock); - ret = __fwnode_link_add(con, sup, 0); + ret = __fwnode_link_add(con, sup, flags); mutex_unlock(&fwnode_link_lock); return ret; } diff --git a/drivers/firmware/efi/sysfb_efi.c b/drivers/firmware/efi/sysfb_efi.c index 456d0e5eaf78..cc807ed35aed 100644 --- a/drivers/firmware/efi/sysfb_efi.c +++ b/drivers/firmware/efi/sysfb_efi.c @@ -336,7 +336,7 @@ static int efifb_add_links(struct fwnode_handle *fwnode) if (!sup_np) return 0; - fwnode_link_add(fwnode, of_fwnode_handle(sup_np)); + fwnode_link_add(fwnode, of_fwnode_handle(sup_np), 0); of_node_put(sup_np); return 0; diff --git a/drivers/of/property.c b/drivers/of/property.c index 39a3ee1dfb58..751c11a28f33 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -1085,7 +1085,7 @@ static void of_link_to_phandle(struct device_node *con_np, tmp_np = of_get_next_parent(tmp_np); } - fwnode_link_add(of_fwnode_handle(con_np), of_fwnode_handle(sup_np)); + fwnode_link_add(of_fwnode_handle(con_np), of_fwnode_handle(sup_np), 0); } /** diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h index 2a72f55d26eb..c964749953e3 100644 --- a/include/linux/fwnode.h +++ b/include/linux/fwnode.h @@ -210,7 +210,8 @@ static inline void fwnode_dev_initialized(struct fwnode_handle *fwnode, } extern bool fw_devlink_is_strict(void); -int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup); +int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup, + u8 flags); void fwnode_links_purge(struct fwnode_handle *fwnode); void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode); -- 2.43.0.687.g38aa6559b0-goog