From patchwork Thu May 7 12:23:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 11533427 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D62A61392 for ; Thu, 7 May 2020 12:23:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BCD0021582 for ; Thu, 7 May 2020 12:23:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="IagWuptF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726885AbgEGMXX (ORCPT ); Thu, 7 May 2020 08:23:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726948AbgEGMXW (ORCPT ); Thu, 7 May 2020 08:23:22 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B8A2C05BD09 for ; Thu, 7 May 2020 05:23:21 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id k1so6141349wrx.4 for ; Thu, 07 May 2020 05:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AA7Uxbu2XHegzSCD08X5CYV/vq3ZozqHESt7BO/60Qw=; b=IagWuptFPeh/2lr4Z9leJPvgQ5fKu4rbQleuz/8B9TUXhjaGGy4ekrF4l2LmGNO+2q /DzaZC451JJnk71n6ueaUfaF1eFto6dvTaPxga+MBYmhWEtNRSdmJF+G7bMRSRWZk7LU Y4IRdhXsHVDU8x57ZmAN4X4pZ5izzumygYgxUeO0glHn1SRF4MGlQEb8hfSNUszfs1f5 D77EkGk0wyHAlzetnonG/Wa0YxemdBrGV3gh8PDLCUMCHSpY/vIDGLfQY28ocO4xbvki i5wDN8pz78rF5ft5J2gRrs8yUBnV0bfl3deF8UkRpwkN4+VtlZ7s0hb33Q1Tp85hhv7u jkUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AA7Uxbu2XHegzSCD08X5CYV/vq3ZozqHESt7BO/60Qw=; b=o1kyCqo2YLoJ8UKNZnop9NZvj/9Tak2p14OC94MrFVOXK/gRnBdcLX+emZwfD5Q/ww UXZoCqtXF/tsvMlWDn+uaPdLMqFyS1EUgm/ZRUaJ3wvFCWI8cuYhdwscObLImajn7btg jCc+UdfOpK5bj2KpUU9qmJzt28rrmu3rpBf38YcPon3n3VE0MZbR46LWiwBjjdhdKaVp u5MkTrsFrYJANAyFiqMINjWrfilZAaasUly1ixTashvQ4dcP1swVp8RX/PWshFWDRIuH 8OZC+zsxpYst9Oj1qyB0tjl7hq1+EDDUQK+nmfkhHeAuIkwS16UVOPjx1WIwnXm/jrAm AO6Q== X-Gm-Message-State: AGi0PubT7jjh2IxRRXgKKKfHHrbFiYpfIiHWncXI2iCc2F+8StoXp80v VGAYZnq96gxW5FG+CuDjK6h+KQ== X-Google-Smtp-Source: APiQypJWl2jicSfHQJu0lHJazQTw+s9hQP8izhRywvWVtHY4BG7N6Gh4wfS9xqEbymgcaH0mq13E4A== X-Received: by 2002:adf:f48a:: with SMTP id l10mr14485357wro.231.1588854200232; Thu, 07 May 2020 05:23:20 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id p7sm8202936wrf.31.2020.05.07.05.23.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 05:23:19 -0700 (PDT) From: Bryan O'Donoghue To: heikki.krogerus@linux.intel.com, robh+dt@kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, nikolaus.voss@loewensteinmedical.de, andriy.shevchenko@linux.intel.com, garsilva@embeddedor.com, keescook@chromium.org, Bryan O'Donoghue Subject: [PATCH 1/2] dt-bindings: usb: Add TI tps6598x device tree binding documentation Date: Thu, 7 May 2020 13:23:51 +0100 Message-Id: <20200507122352.1773661-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200507122352.1773661-1-bryan.odonoghue@linaro.org> References: <20200507122352.1773661-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Add device tree binding documentation for the Texas Instruments tps6598x Type-C chip driver. Cc: Rob Herring Cc: Heikki Krogerus Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Bryan O'Donoghue --- .../devicetree/bindings/usb/ti,tps6598x.yaml | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/ti,tps6598x.yaml diff --git a/Documentation/devicetree/bindings/usb/ti,tps6598x.yaml b/Documentation/devicetree/bindings/usb/ti,tps6598x.yaml new file mode 100644 index 000000000000..fc18274d7775 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/ti,tps6598x.yaml @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/usb/ti,tps6598x.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Texas Instruments 6598x Type-C Port Switch and Power Delivery controller DT bindings + +maintainers: + - Heikki Krogerus + - Bryan O'Donoghue + +description: | + Texas Instruments 6598x Type-C Port Switch and Power Delivery controller + +properties: + compatible: + enum: + - ti,tps6598x + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + interrupt-names: + items: + - const: irq + +required: + - compatible + - reg + - interrupts + - interrupt-names + +examples: + - | + #include + i2c0 { + #address-cells = <1>; + #size-cells = <0>; + + tps6598x: tps6598x@38 { + compatible = "ti,tps6598x"; + reg = <0x38>; + + interrupt-parent = <&msmgpio>; + interrupts = <107 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "irq"; + + pinctrl-names = "default"; + pinctrl-0 = <&typec_pins>; + + typec_con: connector { + compatible = "usb-c-connector"; + label = "USB-C"; + port { + typec_ep: endpoint { + remote-endpoint = <&otg_ep>; + }; + }; + }; + }; + }; +... From patchwork Thu May 7 12:23:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 11533425 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B6DF1392 for ; Thu, 7 May 2020 12:23:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3284320CC7 for ; Thu, 7 May 2020 12:23:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="coX3lDQh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726320AbgEGMXY (ORCPT ); Thu, 7 May 2020 08:23:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727095AbgEGMXX (ORCPT ); Thu, 7 May 2020 08:23:23 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E9EAC05BD0B for ; Thu, 7 May 2020 05:23:22 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id u127so6583362wmg.1 for ; Thu, 07 May 2020 05:23:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=js2krj0RD3hheEAL8cEfa5AyUl6zi0N+wYVVoWFXilU=; b=coX3lDQhoiVcmqCufwxRJFR3NjAPEGH0QUsc9BHbtnYuDYAuLvTLxr0YOckuFoNb7v 35jokTarqofjAL3txGkkqvMZF3vNo4G0u7efJqy9Y1pnS66YOVSLWrt6IuSYNYzRPyrp AlIT+KfReY3LKpelz3IBfQjruAr5XEaRDetgT1Nrn/xtHLNlkqv6RE0QEAIlFU4wWyv+ VEoUUlCkUZ2JKYaSIedjEjVQO2ejeJ4w6XYe6uW1EUMzKjJaO1JtXNWnn4m6koCVsIEY 6G20LE29aCBSg2u8Jp6+umXE2ph1Ui21SToAqkAkEb8oBp0aY5QcRTkCCninELhLUXPf Qt5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=js2krj0RD3hheEAL8cEfa5AyUl6zi0N+wYVVoWFXilU=; b=eveC66uHGC8pibMbd8KqPH6MdhOGTDYV/dkLvPHFShPwJ6uZv//Qw6iUdwsgCvUVEe q8mUj/M25T/2Xjh4Xz4JXplhN8Mmwy6ctHVl5f7oH4JQvCISBxBOiPwvNBIg48u+Q3Fu HRptlc5jHc3CK7GwvPubK7R9ErUrqsuR1aUsSiENdxx9mZr/NHeAGC8ex9MUcBtdeIpT 2Zouv2f8VJg9xt4tFv/JcUPMhMnigg6cJ6/LCOyESBGjpbb7DqhXLFHDBurUO9ornYaI JtfHCT3ArCipi8NUSE7otHGpgRsn1ldrUG4Fsh9O56tzo6HHW2TXgRVz7eT5bcEi6fnu kJFw== X-Gm-Message-State: AGi0PuZGtDpf8ArFKssBtabdxQjAsbjCrY6qKbQmASnunYZj+NBbDDAR 6xNAZXgnA42Ko2PjVvYqxuZWXQ== X-Google-Smtp-Source: APiQypKUssr+tZ7ONvwALRESmstwlo4sXONYM0CoLMz4PdmEGwytmWK3dIclCWwC8C5V8ol/fEYJtA== X-Received: by 2002:a05:600c:4013:: with SMTP id i19mr3094203wmm.71.1588854201286; Thu, 07 May 2020 05:23:21 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id p7sm8202936wrf.31.2020.05.07.05.23.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 05:23:20 -0700 (PDT) From: Bryan O'Donoghue To: heikki.krogerus@linux.intel.com, robh+dt@kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, nikolaus.voss@loewensteinmedical.de, andriy.shevchenko@linux.intel.com, garsilva@embeddedor.com, keescook@chromium.org, Bryan O'Donoghue Subject: [PATCH 2/2] usb: typec: tps6598x: Add OF probe binding Date: Thu, 7 May 2020 13:23:52 +0100 Message-Id: <20200507122352.1773661-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200507122352.1773661-1-bryan.odonoghue@linaro.org> References: <20200507122352.1773661-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Adds a MODULE_DEVICE_TABLE() to allow probing of this driver from a DTS setting. Cc: Heikki Krogerus Cc: Greg Kroah-Hartman Cc: Nikolaus Voss Cc: Andy Shevchenko Cc: Gustavo A. R. Silva Cc: Kees Cook Cc: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Bryan O'Donoghue --- drivers/usb/typec/tps6598x.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/usb/typec/tps6598x.c b/drivers/usb/typec/tps6598x.c index 0698addd1185..61c6761072c9 100644 --- a/drivers/usb/typec/tps6598x.c +++ b/drivers/usb/typec/tps6598x.c @@ -563,6 +563,14 @@ static int tps6598x_remove(struct i2c_client *client) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id tps6598x_of_match[] = { + { .compatible = "ti,tps6598x", }, + {}, +}; +MODULE_DEVICE_TABLE(of, tps6598x_of_match); +#endif + static const struct i2c_device_id tps6598x_id[] = { { "tps6598x" }, { } @@ -572,6 +580,7 @@ MODULE_DEVICE_TABLE(i2c, tps6598x_id); static struct i2c_driver tps6598x_i2c_driver = { .driver = { .name = "tps6598x", + .of_match_table = of_match_ptr(tps6598x_of_match), }, .probe_new = tps6598x_probe, .remove = tps6598x_remove,