Received: by 2002:ac8:3b51:0:b0:3f3:9eb6:4eb6 with SMTP id r17csp2762062qtf; Mon, 12 Jun 2023 09:36:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ45GzzDNzera4I37ouocHDFz+0LYzBzJgAsqkMGmbbSjKBdJY0gSb5+QL8TTyXIAL2fsnbS X-Received: by 2002:a17:907:2da1:b0:973:84b0:b077 with SMTP id gt33-20020a1709072da100b0097384b0b077mr10761145ejc.33.1686587781453; Mon, 12 Jun 2023 09:36:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686587781; cv=none; d=google.com; s=arc-20160816; b=QfipSfXjF8qEEFyAMBHOxK5gmdMHvudI0h/aGKAxD/m96lWifBihK7+/+ZwdQ6TTJk ABfTnKuq5J9m5go+TD2K2gmHu97rlZqspd/hp4VDN95ZVDfOrKUU5ourh0nzL5OBSCmV ujXAjShB4dW4dgOYQz+tRvU8VpS8S+sxyAmof2MBqTqlNgCghiCVUwHVTqtwO2IjdsUm hpZ6xPZXeruffna+I/hjCGWgWXtEwqop7dN6AvhVRS6sriDIzvMx+uCZuvqIfzMxoQ1h Nif9xgRQSQdNVVa85lufhkkiYfO6/WbKf7XguoIiHRekFrxpeVDwZ/0C6eKE5g+WnPzG xLAA== 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:dkim-signature; bh=Qbcej2GI+IK3cFWpsXbaWUx7anfW6eLafOXyJvWP0mc=; b=O3RnlfgcWZKi8SDZ09BGc92qpcer04TV/v9Uj52b36aSIifyT4vHJk0Xz4QUYGlH5+ +ec+IYoBU9ELamQuQ23gzcpYsDyQtCtS4bwIG4f5xpMHjoeX2u79WbL6RMCDcZw2zBlI wWstHUvidLK2t0S9vGKWBBAgQE8CJCCJCVQw4tYC5gGb8MwMWL0ftJXu+15Ow2bkTiM4 1mGxS5yEmA6sBmsbctkjgzT+CSm5ErrATPItoNSie+6Pup447EZehwRrHXpxOw4VHCxg Wpy1YqPhFuPL+MnQ7fn4qXxXvxiJvHJwQp7C1gCqI3+6+bVOcWwMN5/8Kg0KXAPDMroJ FEDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gYlSbBLT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v20-20020a17090690d400b0097894b06eccsi5256905ejw.717.2023.06.12.09.35.41; Mon, 12 Jun 2023 09:36:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gYlSbBLT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233213AbjFLQM7 (ORCPT + 99 others); Mon, 12 Jun 2023 12:12:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232273AbjFLQM4 (ORCPT ); Mon, 12 Jun 2023 12:12:56 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16EDA118; Mon, 12 Jun 2023 09:12:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686586376; x=1718122376; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=IYt04gSUqk2jrpPKBFAhlqeGc+makPe+S7hTcL63yKA=; b=gYlSbBLTubETE886ni6fRCuGtHEDtvSVGP1lfjU7pAr8TPS0p4ERQf1M 7SChy4LtG/I77zfwG5nTsFlaPBp0L4LwuWpz1h6CNQWnzDCYioP4ORJce yib/sj6JsSYLaEtPZssCMXUssIgGi9yUzIq8kqYzFzhINE/exX1Q4F5Zn WDoXPrQzcS3Q7vKnRjWcRC5/ey4Pic0d3kOKTfs2PpSn2tWDov/B3PUo8 BGeupxmFk66NBVUC4kPShM8ef58rRiUVkvOvH2iAhSPQNgaqC2dphOj5Z +F/m2uhNSj0k3v3P8I9gU8aW3oLm7Dp/NHlz+5VMoklwvmGqTNg+sqnIM Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10739"; a="360572675" X-IronPort-AV: E=Sophos;i="6.00,236,1681196400"; d="scan'208";a="360572675" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2023 09:10:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10739"; a="824031048" X-IronPort-AV: E=Sophos;i="6.00,236,1681196400"; d="scan'208";a="824031048" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 12 Jun 2023 09:10:05 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id C0544357; Mon, 12 Jun 2023 19:10:13 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Greg Kroah-Hartman , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Cc: Hans de Goede , Jens Axboe , Damien Le Moal , "Rafael J. Wysocki" , Len Brown , Daniel Scally , Heikki Krogerus , Sakari Ailus Subject: [PATCH v3 0/3] device property: Introduce device_is_compatible() Date: Mon, 12 Jun 2023 19:10:08 +0300 Message-Id: <20230612161011.86871-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Introduce a new helper to tell if device (node) is compatible to the given string value. This will help some drivers to get rid of unneeded OF APIs/etc and in may help others to be agnostic to OF/ACPI. While doing it, I have noticed that ACPI_DEVICE_CLASS() macro seems defined in unsuitable location. Move it to the better one. Last patch is an example of what the first two are doing. The entire series can go, I believe, via ACPI (linux-pm) tree in case the last patch gets tag from the respective maintainer. In v3: - added tag to patch 1 (Rafael), patches 2&3 (Sakari) - made commit message text wider in patch 3 (Sakari) In v2: - updated commit message and added kernel doc for a new API (Greg) - also replaced acpi_device_get_match_data() with the agnostic API - tried to keep header inclusions ordered (to some extent) Andy Shevchenko (3): ACPI: Move ACPI_DEVICE_CLASS() to mod_devicetable.h device property: Implement device_is_compatible() ata: ahci_platform: Make code agnostic to OF/ACPI drivers/ata/ahci_platform.c | 8 ++++---- include/linux/acpi.h | 14 -------------- include/linux/mod_devicetable.h | 13 +++++++++++++ include/linux/property.h | 12 ++++++++++++ 4 files changed, 29 insertions(+), 18 deletions(-) -- 2.40.0.1.gaa8946217a0b