From patchwork Wed May 26 15:35:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heikki Krogerus X-Patchwork-Id: 12282149 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BAA2CC47089 for ; Wed, 26 May 2021 15:35:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9A697613D2 for ; Wed, 26 May 2021 15:35:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235193AbhEZPhB (ORCPT ); Wed, 26 May 2021 11:37:01 -0400 Received: from mga03.intel.com ([134.134.136.65]:51469 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232023AbhEZPhA (ORCPT ); Wed, 26 May 2021 11:37:00 -0400 IronPort-SDR: 76/cb8AcpFxHaGYevWn1WqdOhmSv+CVW87ay8WMlyINDJ1OKYlDerFiH9YMk/js2fEZehq5LJs +Tu0Z/Iowj7g== X-IronPort-AV: E=McAfee;i="6200,9189,9996"; a="202529805" X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="202529805" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2021 08:35:28 -0700 IronPort-SDR: 1ydds1PjwrCI9xbX9aY0Xij9f0HuFGXd6BaPte1ufpb20YGsSZIyndjNUb7j9A6ZswRXlyRbeZ fh7z0fr3pvpA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="547236490" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 26 May 2021 08:35:26 -0700 From: Heikki Krogerus To: Greg Kroah-Hartman , Hans de Goede , Li Jun Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] usb: typec: mux: a few improvements Date: Wed, 26 May 2021 18:35:46 +0300 Message-Id: <20210526153548.61276-1-heikki.krogerus@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Hi, The first patch should be trivial cleanup, but in the second one I'm removing the condition that in practice forces the orientation switch to always have the device property named "orientation-switch". This change only impacts connections described with device graph since only in that case the callback function is supplied with the "id" parameter which is the first part of the condition (if the id is not supplied, the function also does not expect the device property to exist). But when the connection between the connector and the switch is described with device graph, I don't see any need for that device property. Therefore let's just remove the condition and the requirement for the device property with it. thanks, Heikki Krogerus (2): usb: typec: mux: Use device type instead of device name for matching usb: typec: mux: Remove requirement for the "orientation-switch" device property drivers/usb/typec/mux.c | 29 ++++++++++------------------- drivers/usb/typec/mux.h | 6 ++++++ 2 files changed, 16 insertions(+), 19 deletions(-) Reviewed-by: Hans de Goede