Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2411248pxb; Tue, 9 Mar 2021 01:39:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJw4orzxZrt0/knbo4HJPbP8+N4h/con+2IPEXsI7f0IQninXrGbgNdVt6EcaUcq1kBDGHQr X-Received: by 2002:aa7:d54c:: with SMTP id u12mr3142400edr.234.1615282761647; Tue, 09 Mar 2021 01:39:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615282761; cv=none; d=google.com; s=arc-20160816; b=GBGuRfoCOfhe8QwknWVOevSTrfF8lTbFH0M8YUsyAg8xlLIMtLuj/EfNHyQzWLUmF5 TutJ9OcxV9Mi1juVgsUCFiUUL3mHxxWo9UiO4FOJCxggeR8oXsuoNy5N7A6OSswyfDnD ZNfB7iTsey3rIug8jDgfCfMeWTduAUgNFrN2vEfls4woV5KwdKRNIw2z0RBkSpsJrUid Ei+TP9ju6JDX9tOWTAkm9jT8nfmeqyI7I8+pRa0VaF1M7DmIljznSk0afILdWn82hjIJ R4uFpG3BfYoDczjBjtoyajF73xqbWkB0PlcFyyHKrnWskuW4gVFXCL/M9RqN/S6/afXt 5cQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=u3hm4pjnHtVKnM22OL8OHjk5ACw2pbIKYURvr1+rCkE=; b=arR6gIBLngbIAHm8tF6ACN4AY1lA0BBy55Wtmt7nFZmszxBqgXCW3W1sAp67YW5f1M qzj0FdjngW664sOVY6iH6EhjuzEfRn+A+a9nbnXRT7fIizEh6hr/zha4mVrmM57AZ4Yp ZF+rnkK3Y8HGD8yCWnJdw4kApb9b3MZLDPZm0gZ1lwBECTco1Bomo4qN0NYXtPDSUDkq EwGZA5+XYg5RG6ag8kNORu1dySiC5hrfgMLMzZpZh18fB928vUZcGnLF+69jXOdvFhGO FIYo2h8j+LEaqrwFNp4ItBhniRtWvAGA+4jqtoYDB6GYusYG090PKXLNfH8TYFEjRM9S ryLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a7si5097449ejr.564.2021.03.09.01.38.59; Tue, 09 Mar 2021 01:39:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230214AbhCIJiE (ORCPT + 99 others); Tue, 9 Mar 2021 04:38:04 -0500 Received: from mga02.intel.com ([134.134.136.20]:29451 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbhCIJhl (ORCPT ); Tue, 9 Mar 2021 04:37:41 -0500 IronPort-SDR: hiehay2Od8+CHc8TFIjZKaxXAoW2uZtBFKUoxmQ6iE/j7D719j/6UyG1V8TH28fi2Ug2nSP9oz vZF7M9GfOmtw== X-IronPort-AV: E=McAfee;i="6000,8403,9917"; a="175303411" X-IronPort-AV: E=Sophos;i="5.81,234,1610438400"; d="scan'208";a="175303411" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2021 01:37:40 -0800 IronPort-SDR: nr63oc0PNfB2pHc+gU4StUQ9vGCvf6MqbqzJEXz9VUaBkogbsDsWrt4vbIxG0cqJoTjAQuegqi 1WVhRNJ+whCA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,234,1610438400"; d="scan'208";a="369725423" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 09 Mar 2021 01:37:37 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 4B0C11EC; Tue, 9 Mar 2021 11:37:38 +0200 (EET) From: Andy Shevchenko To: Mika Westerberg , Andy Shevchenko , Linus Walleij , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org Cc: Marc Zyngier , Jonathan Corbet , Bartosz Golaszewski , Thomas Gleixner , "Rafael J. Wysocki" Subject: [PATCH v6 0/6] gpiolib: switch to fwnode in the core Date: Tue, 9 Mar 2021 11:37:30 +0200 Message-Id: <20210309093736.67925-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org GPIO library uses of_node and fwnode in the core in non-unified way. The series cleans this up and improves IRQ domain creation for non-OF cases where currently the names of the domain are 'unknown'. This has been tested on Intel Galileo Gen 2. It touches GPIO core parts and it's expected that the series is routed via GPIO tree. In v6: - added tag to the patch 5 (Rafael) - dropped ops temporary variable (Rafael) In v5: - same as v4 + v3 (patches 1-4/5) in order to route via GPIO tree (Bart) In v4: - based on Rafael's bleeding-edge - split the rest to two patches (Rafael) - elaborate WARN() deduplication in the commit message (Rafael) In v3: - fixed subtle bug in gpiod_count - made irq_domain_add_simple() static inline (Marc) In v2: - added a new patch due to functionality in irq_comain_add_simple() (Linus) - tagged patches 2-4 (Linus) - Cc'ed to Rafael Andy Shevchenko (6): irqdomain: Introduce irq_domain_create_simple() API gpiolib: Unify the checks on fwnode type gpiolib: Move of_node operations to gpiolib-of and correct fwnode use gpiolib: Introduce acpi_gpio_dev_init() and call it from core gpiolib: Reuse device's fwnode to create IRQ domain gpiolib: Fold conditionals into a simple ternary operator Documentation/core-api/irq/irq-domain.rst | 22 ++++---- drivers/gpio/gpiolib-acpi.c | 7 +++ drivers/gpio/gpiolib-acpi.h | 4 ++ drivers/gpio/gpiolib-of.c | 6 ++- drivers/gpio/gpiolib.c | 62 +++++++++-------------- include/linux/irqdomain.h | 19 +++++-- kernel/irq/irqdomain.c | 20 ++++---- 7 files changed, 75 insertions(+), 65 deletions(-) -- 2.30.1