Message ID | 20230612161011.86871-1-andriy.shevchenko@linux.intel.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:640b:b0:12b:d5da:ddc2 with SMTP id f11csp18325rwh; Mon, 12 Jun 2023 09:49:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ471Eciy/jxA6VSgE53obrU+Ady3neyPJce3bwo4x5oaD4R4YBvOMvxsSaRU9OkMJ2x+d1S X-Received: by 2002:a05:6a00:2d8b:b0:64a:f730:1552 with SMTP id fb11-20020a056a002d8b00b0064af7301552mr11224241pfb.19.1686588586536; Mon, 12 Jun 2023 09:49:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686588586; cv=none; d=google.com; s=arc-20160816; b=CbtnrnqB23WA77/nHvG5kHd5YNgHVzeXCjtjrR7mfYI/20P7KEIGnpPoq4ujavgN/K VCvSsiKxpH3axjvOQIvqLYsoVzUBM/EBlOSVwVWN02xPrSIjHhB4mVnqtITklWBOpJWF HW2ciKSB/Ekxe7IZ8wQ/qpX11hmJA3HjbhhgnzTY70OKnOYDDDgV3pA4JSD7aq7e2X3N htaenfaohUBGtxIWzYBijFuVK6UFpRDoZklj14gI12FqwcJ8XPNp9KC0VYaQABLxqjeG yZSTEca+kQZ0521IQx+0wlAy0GHgNose8chh7UZfT6IgwMhvt8dRKDp6VkENVPmuYnTY xcsQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o27-20020a63731b000000b00542bcb3d593si7126805pgc.636.2023.06.12.09.49.33; Mon, 12 Jun 2023 09:49:46 -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 S233224AbjFLQM7 (ORCPT <rfc822;rust.linux@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <andriy.shevchenko@linux.intel.com> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Cc: Hans de Goede <hdegoede@redhat.com>, Jens Axboe <axboe@kernel.dk>, Damien Le Moal <dlemoal@kernel.org>, "Rafael J. Wysocki" <rafael@kernel.org>, Len Brown <lenb@kernel.org>, Daniel Scally <djrscally@gmail.com>, Heikki Krogerus <heikki.krogerus@linux.intel.com>, Sakari Ailus <sakari.ailus@linux.intel.com> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768516313696636692?= X-GMAIL-MSGID: =?utf-8?q?1768516313696636692?= |
Series |
device property: Introduce device_is_compatible()
|
|
Message
Andy Shevchenko
June 12, 2023, 4:10 p.m. UTC
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(-)
Comments
On Mon, Jun 12, 2023 at 6:12 PM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > > 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(-) > > -- All applied as 6.5 material, thanks!
On Fri, Jun 16, 2023 at 7:55 PM Rafael J. Wysocki <rafael@kernel.org> wrote: > > On Mon, Jun 12, 2023 at 6:12 PM Andy Shevchenko > <andriy.shevchenko@linux.intel.com> wrote: > > > > 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(-) > > > > -- > > All applied as 6.5 material, thanks! But I see that Greg has taken it too, so I'll drop it.
On Fri, Jun 16, 2023 at 09:07:06PM +0200, Rafael J. Wysocki wrote: > On Fri, Jun 16, 2023 at 7:55 PM Rafael J. Wysocki <rafael@kernel.org> wrote: > > On Mon, Jun 12, 2023 at 6:12 PM Andy Shevchenko > > <andriy.shevchenko@linux.intel.com> wrote: > > > -- > > > > All applied as 6.5 material, thanks! > > But I see that Greg has taken it too, so I'll drop it. Yep, thank you, guys!