Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1004738pxf; Thu, 11 Mar 2021 22:35:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJzqZK52mKNDzC4CjTuPZfb4QH3Jr2uY/OQhS5jhMQDuMyj1RLRFPj7M0rtffZTCRScV5FiZ X-Received: by 2002:a17:906:b2cd:: with SMTP id cf13mr6903268ejb.181.1615530947380; Thu, 11 Mar 2021 22:35:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615530947; cv=none; d=google.com; s=arc-20160816; b=n/P6b5t+Wmbb6mVXOW/pviPTQIu+E6kAJrAL9I+bfidK0YkA4RRFENo3lzd3YMoO7j onCj9YCJwYb6rnM9v0O9iK7qiS+WBXgNiM6StUEQXlJ5awJoI/mwBvbqDNBSItzsfswJ yeT1LoJEDx2aKCRP++nwq6x5oowZcvnILJmcXlV5Nu3sOJBU0dXKyy/FDgdQrkhUpuhK KReI8lelYyNNrnhDdOUJJ96tikYIxf1zKbpjVxslVaIjjwsNRF8BxurskXUB+FF2GNPv 40RsKufhVenen2VbiN3jycyWtbq9ONUdIK5bE6cP/40sk72wlO6GLIhkhTls7vq9BkZr 8WlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=uHOpvLhtcBHbawIEfPz5vAJeY+3oJDGose4sCS14ksM=; b=MTqor2WBPW2TVEFLGiI+h9dCakNZaus2aujkLD3mNoroNM4gNyxKxl/ehZnLD24tXL 9hKWlHSat5K5Bj8mvPuZNGANvw4Wye+V8YTS4NyzsMLqmx6o71NqbpKdekkAVn/fC2t8 5KQQ4JQvXN2rbSvPAv0Er/knNCE7OqndLiN65NFwZRVChZU/7286Kqai/GXUw/CkXDn5 4QGTJ6e4zhBEvVLgS47Lm4gQR2ESUeLX+O+hf+U2Ay6uvCFeDrNeobhrv/FkLaWtg9jA 4rYm63LYePN8EmSDjMqZxEzXg3JmQMy+fpfhzk2nDqgAJK8vHHFM/CffUXCTBXIJwf7L gy6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="ji/rHHnM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z4si3668820ejj.20.2021.03.11.22.35.25; Thu, 11 Mar 2021 22:35:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="ji/rHHnM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230243AbhCLFJJ (ORCPT + 99 others); Fri, 12 Mar 2021 00:09:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230239AbhCLFIq (ORCPT ); Fri, 12 Mar 2021 00:08:46 -0500 Received: from mail-ua1-x92b.google.com (mail-ua1-x92b.google.com [IPv6:2607:f8b0:4864:20::92b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72294C061574 for ; Thu, 11 Mar 2021 21:08:46 -0800 (PST) Received: by mail-ua1-x92b.google.com with SMTP id v11so1363959uao.0 for ; Thu, 11 Mar 2021 21:08:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uHOpvLhtcBHbawIEfPz5vAJeY+3oJDGose4sCS14ksM=; b=ji/rHHnMPcSm4WLA9naLB2j+Vp4jtFUnVlqAWZEb7g4lwsK4w50Xo8CivItnD5kt37 c33wqWjZS8uyoKoAQGWSGJwnyF9wCNK20JXj/C8yBTDDYC8L9Nbypb8x5qt59fhwhQX7 yX7PvrP4JZCusZRmRYRXk8z8u9QIzHh+nQWzAwhgkpQeFcbwuwpp0VESgEfh2SyMmTZx 4JtQ/Hnq1MPahG1u+aqLi4vdRZM/E47Ihqq8NCHGLEj+jmIdhbSNrFDToO28vHWvaI3A TSo4lpDddfbemVh1dSj+n29yNhnmeQlmw+A+lVnJOYGSyGBFAzGWATfuS4mYPFlJO8C8 ft2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uHOpvLhtcBHbawIEfPz5vAJeY+3oJDGose4sCS14ksM=; b=oyQnCOZgc5Vi/+Hbdre4BziUPcA2bbchjZEvnymD1uazep5gJYk7ERpai2LV24sYYN UteF0JXTTGqWM5GHrrD88jLfuV03cmevtH1F115ahbcg98xrsHIwyMfCF/CUO+0oN9Hp nwLOrfV0WKjel9P6uKHF7Q7DW/6eViWF6WmkJYLawfacgG3Wr0PAP3PXxTxC39RldgnE T2F5xXyUxh3SOpLO2d2L+LpycBJVrtOzsHQ13F7aW5E5WUh9LY2+K3WzMdmZXsyUjANu vHKDtqJ6HDqg3ec614YAmjIspzBw94vmnA0E6XjR4vxuC0uX+d0VCCrSkcwG3mGpLCtJ 3V2Q== X-Gm-Message-State: AOAM530U+wrZvNfUq5x4zHpOGnL2FLm3Yk/IoBrtxNTdHEexaONSTlHT kw6tJ5VQkHkPKwIQLc2Sx/UZUoCqRxNeUmYeShy/jA== X-Received: by 2002:ab0:4d6a:: with SMTP id k42mr7030498uag.69.1615525720433; Thu, 11 Mar 2021 21:08:40 -0800 (PST) MIME-Version: 1.0 References: <20210311100313.3591254-1-badhri@google.com> <20210311100313.3591254-3-badhri@google.com> In-Reply-To: From: Badhri Jagan Sridharan Date: Thu, 11 Mar 2021 21:08:04 -0800 Message-ID: Subject: Re: [PATCH 3/4] usb: typec: tcpci_maxim: configure charging & data paths To: Heikki Krogerus Cc: Guenter Roeck , Greg Kroah-Hartman , Rob Herring , USB , LKML , Kyle Tso , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 11, 2021 at 5:33 AM Heikki Krogerus wrote: > > Hi, > > On Thu, Mar 11, 2021 at 02:03:12AM -0800, Badhri Jagan Sridharan wrote: > > This change allows the driver to configure input current/voltage > > limit for the charging path. The driver sets current_max and voltage_max > > values of the power supply identified through chg-psy-name. > > > > The change also exposes the data_role and the orientation as a extcon > > interface for configuring the USB data controller. > > This looks wrong to me. Why wouldn't you just register your device as > a separate psy that supplies your charger (which is also a psy, right)? Hi Heikki, Looks like that would pretty much make it reflect the same values as "tcpm-source-psy-" exposed by tcpm. So experimenting with making the charger power supply a supplicant. However, noticed that the "tcpm-source-psy-" does not have calls to power_supply_changed(). So the notifiers are not getting invoked. Trying to fix that to see if just "tcpm-source-psy-" helps the case without me trying to create another one which almost would reflect the same values. Let me know if you think that might not work. For now, refactored the patches to only include changes related to data path and sending them in. Will follow up with patches for the charger path once I am done with the above approach and some validation. Thanks, Badhri > > > thanks, > > -- > heikki