From patchwork Wed Mar 27 16:43:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heikki Krogerus X-Patchwork-Id: 10873771 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 74F6F17E0 for ; Wed, 27 Mar 2019 16:44:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E498289A1 for ; Wed, 27 Mar 2019 16:44:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 511D628A49; Wed, 27 Mar 2019 16:44:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EAC3C289A1 for ; Wed, 27 Mar 2019 16:44:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727379AbfC0Qno (ORCPT ); Wed, 27 Mar 2019 12:43:44 -0400 Received: from mga12.intel.com ([192.55.52.136]:62434 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727172AbfC0Qno (ORCPT ); Wed, 27 Mar 2019 12:43:44 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Mar 2019 09:43:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,277,1549958400"; d="scan'208";a="158912680" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 27 Mar 2019 09:43:38 -0700 From: Heikki Krogerus To: "Rafael J. Wysocki" Cc: Greg Kroah-Hartman , Andy Shevchenko , Chunfeng Yun , Biju Das , Hans de Goede , linux-acpi@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/3] device property: fwnode_is_compatible() helper Date: Wed, 27 Mar 2019 19:43:36 +0300 Message-Id: <20190327164339.31205-1-heikki.krogerus@linux.intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, Basically the helper is just a generic version of the function of_device_is_compatible() that should work also with ACPI and software nodes. As the first user for the helper, I'm converting in this series the USB role switch code to expect the "compatible" property to have the value "usb-role-switch" instead of expecting a boolean property named "usb-role-switch". I'm doing the same for the USB Type-C mux code. thanks, Heikki Krogerus (3): device property: Add fwnode_is_compatible() and device_is_compatible() helpers usb: roles: Use the "compatible" property instead of a boolean property usb: typec: mux: Use the "compatible" property instead of a boolean property drivers/base/property.c | 35 +++++++++++++++++++++++++++++++++++ drivers/usb/roles/class.c | 2 +- drivers/usb/typec/mux.c | 8 ++------ include/linux/property.h | 3 +++ 4 files changed, 41 insertions(+), 7 deletions(-) Reviewed-by: Andy Shevchenko