Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2126658rwb; Fri, 11 Nov 2022 05:31:22 -0800 (PST) X-Google-Smtp-Source: AA0mqf5JICVJzErh0LJB1KlbG6moNSqsVaK9UgV87k8V0BpB9Uw8xh3kzAiYvAUXxsCBiOrx2nvX X-Received: by 2002:a17:903:3303:b0:180:e685:2db5 with SMTP id jk3-20020a170903330300b00180e6852db5mr2602456plb.112.1668173481976; Fri, 11 Nov 2022 05:31:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668173481; cv=none; d=google.com; s=arc-20160816; b=uJvmm3M83L/VHjfWbGXBks/HOdE0Nwzwv6kVNVKmJunMEWwKb/ao8rSwHeGxjXYVLm ND46V5UHqzs9u6s6fj9ZOyjYRttKk8lcwZX7Ge0VuidB2GjcW7KAF/zDyT2JPHrGrMU0 8HdECqiVDgu67uuexibdt3u2Eqy0bIP7dz5o0HQqbOksDX0kMmRUqnYafTHV+YgLzQpr byL0D9wjKz7vlo0LblwWJzPtHlJ42MqP+D5EV6hSQ/JtrRVabfDvEJZZvUevhO4byGKx 0Y7hKmf7204Clso6a1Q1nNVHEvmPEs9OhflCP7Im+KiQeLk0WJRdeT7UQ2pDAO7O5uL8 xW7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BsmozOaOBZvNytRx3oPoE3IcFKJUJvVl/q4U1FcqlKk=; b=DLnavToHZo9TiN/fZVXUYTeI/FXRGM9Khet3iX/wI+9UC1Y/mgZmyz5L9+enBzLKCv dIj//IgJHWR9P6qZkCb3zsKCj49vXh1JrcmVhqNZyXvlqwTS97Cgm4wsu1PW06OHT1X3 9Mv1CikY/FTwosb9y2KUbFjcJO7+3v7kDK+C3sqnWlz83yLR26r9E0njbvHLR8tn6skg X1prbKsQzMy3UvlP7gldA7fMMuojIbZYS4ZpEoCB4acecGYzHZLdFYb9anuVrWjE8Zjw 9wXcowJk4uhEonbSLxiOK4w3kEBC2UVeuGcNoPKQJXI+52Tb+vnhIK5B0+zT7EbOJYFH 9wMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="o6Hc3y/d"; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a21-20020aa795b5000000b005639db953adsi2298454pfk.68.2022.11.11.05.31.09; Fri, 11 Nov 2022 05:31:21 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b="o6Hc3y/d"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232574AbiKKM6B (ORCPT + 92 others); Fri, 11 Nov 2022 07:58:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232851AbiKKM56 (ORCPT ); Fri, 11 Nov 2022 07:57:58 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82C457C8F0; Fri, 11 Nov 2022 04:57:56 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BCEF461FB0; Fri, 11 Nov 2022 12:57:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E697C433D6; Fri, 11 Nov 2022 12:57:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668171475; bh=zwR2CVETYVKkhlVS2uKhYwwfZN8Fws7SwH+daDdD7Q0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=o6Hc3y/dSgnkCRu5sF+3+R1DG4UiTP6y1TS1S68pMerhilYcO9WRKyr16tCVpYuqm RZpKJPWmk122BX/lVxLXQVHKMCjXydkTJL/OvUDyA7PiFwUnKSiDbAO8GPfc7iFCP6 DyVe29q/MGMMF5WoUjXD10vdjxrdPc/lMfe8j7vuWmr+pSWyw5DeDaOd+WK+a/MT1G I6RAXsZLwmL5rF1tzlPNAhCeG0unjbPPKMySl+Prn7OLvQ5U1QVB07LtvPT25xV8bB 2V21njP6uSaGbZLZgi4zzIDhq2TUDDgIHIO+1ve2TDfBC2ebu9uZ3g9PMoY+cizfgh 7vZPk5K+MTNcA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1otTb5-00012W-8l; Fri, 11 Nov 2022 13:57:27 +0100 Date: Fri, 11 Nov 2022 13:57:27 +0100 From: Johan Hovold To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Sebastian Reichel , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH 2/4] soc: qcom: pmic_glink: Introduce base PMIC GLINK driver Message-ID: References: <20220818031512.319310-1-bjorn.andersson@linaro.org> <20220818031512.319310-3-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220818031512.319310-3-bjorn.andersson@linaro.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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: X-Mailing-List: linux-kernel@vger.kernel.org [ Resending to Bjorn's current address. ] On Wed, Aug 17, 2022 at 08:15:10PM -0700, Bjorn Andersson wrote: > The PMIC GLINK service runs on one of the co-processors of some modern > Qualcomm platforms and implements USB-C and battery managements. It uses > a message based protocol over GLINK for communication with the OS, hence > the name. > > The driver implemented provides the rpmsg device for communication and > uses auxilirary bus to spawn off individual devices in respsective > subsystem. The auxilirary devices are spawned off from a > platform_device, so that the drm_bridge is available early, to allow the > DisplayPort driver to probe even before the remoteproc has spun up. > > Signed-off-by: Bjorn Andersson > --- > drivers/soc/qcom/Kconfig | 14 ++ > drivers/soc/qcom/Makefile | 1 + > drivers/soc/qcom/pmic_glink.c | 336 ++++++++++++++++++++++++++++ > include/linux/soc/qcom/pmic_glink.h | 32 +++ > 4 files changed, 383 insertions(+) > create mode 100644 drivers/soc/qcom/pmic_glink.c > create mode 100644 include/linux/soc/qcom/pmic_glink.h > > diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig > index e0d7a5459562..2289f5e0d5ad 100644 > --- a/drivers/soc/qcom/Kconfig > +++ b/drivers/soc/qcom/Kconfig > @@ -91,6 +91,20 @@ config QCOM_PDR_HELPERS > tristate > select QCOM_QMI_HELPERS > > +config QCOM_PMIC_GLINK > + tristate "Qualcomm PMIC GLINK driver" > + depends on RPMSG > + depends on TYPEC > + depends on DRM You should add select AUXILIARY_BUS here as this driver will not compile without it. Then you can drop the corresponding select from the battery driver. > + select QCOM_PDR_HELPERS > + help > + The Qualcomm PMIC GLINK driver provides access, over GLINK, to the > + USB and battery firmware running on one of the coprocessors in > + several modern Qualcomm platforms. > + > + Say yes here to support USB-C and battery status on modern Qualcomm > + platforms. Johan