Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2130577rwb; Fri, 11 Nov 2022 05:34:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf7WmBXq+Ji1H3GZT/mzklqrehstLl7gv0vZBb3bUP7/Q4EqjRoEjRK3hJ8LxNBP4HMCRsYn X-Received: by 2002:a17:902:70c1:b0:188:77a7:eb5 with SMTP id l1-20020a17090270c100b0018877a70eb5mr2392364plt.6.1668173646922; Fri, 11 Nov 2022 05:34:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668173646; cv=none; d=google.com; s=arc-20160816; b=ssekB3i2pZClth2It3TIGszidgDeIuOHfrvfPBKFIkC26QlTQjxg8Vvt4N2/24Bbk+ FxdsvvGL5+F1fNNdotk9TG/iWevFe/6YMEQ5HShUDhIKLq9Qb8AkKQKDZoX2vqvfGrEP nMYBIv6QURDLzq4cGREHJK6FK0lOrcUggeltGL4pHetp7D0uC/rePqEy0tf6QGmZ4X3P 0X0tHTPHwu5fPzHNFY1ZcUxBk9/MmA38gRrlXQsqKZhX4W/2wjg3GT0aydiFpXMPvoAe Jx7coF03Uw/zLA3BgxY+RK3Aw9w1sfSHfnlmPdBqfkSTl4pXyNyU3/4TxOa3AwkkNSek EQQw== 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=yFlR8cm5daM6JtQcmhQYKaLqWoPXucfqdO4oPhKZIl4=; b=D6vUD/imPsELt7ELi0tWYFw5b2UHQPTNVgwh9Q/UzSLFx9CFKHg5ugXZK9OhsKQq13 X5aRkBlKTP24XddYfsgU/3Chl6aektWiY5ZnBYvZky4XFysZqdQ31gZgVVJhUBBXcgOD rXj7wk3lLyCoVfLffwiSkaRmDuDRITJnroajUiwhVDoE6H9aNF+cyKqyuzQShq59Wodw +hqir5ULqhHpMRDHPEk9cpL3EOQDZLDaT9+JZ08KZgCTEKaNOmyfbt93BmCaxeUXy7mV wbQWfFVCc1LWSOzaTsNC5DAEssfLUjZE1VXjMUkUFQJ/1Q7SzBgyKiSPp3m3Ex8J+UQe Fq8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kSq3o+VV; 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 ja12-20020a170902efcc00b001869e6efb8asi2356478plb.59.2022.11.11.05.33.54; Fri, 11 Nov 2022 05:34:06 -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=kSq3o+VV; 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 S233350AbiKKM4c (ORCPT + 92 others); Fri, 11 Nov 2022 07:56:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233220AbiKKM4a (ORCPT ); Fri, 11 Nov 2022 07:56:30 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4B587BE7C; Fri, 11 Nov 2022 04:56:29 -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 4A3BA61FCA; Fri, 11 Nov 2022 12:56:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94027C433D7; Fri, 11 Nov 2022 12:56:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668171388; bh=0dF+vWhwIigujdMkwDpIyGj/ZGuMWFPe4VA+7zWBC3I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kSq3o+VVltt7DphRoQ+Ijpe++hcP8vRXRU55LtNzP2SjQB9bv3mXWellgMQOVxjjR n8wrDWA5ycyWczqdqnHBEEo7GP2e/TsGPBtcAaBjN4ySYFnp7LwPKbpLwqqnCn8akm iwEyKbpmSf5mxql+ZB7UOdUgDVw+uxpU1Hw+crWTajvohZcWyMYkhs3vZaf8L1LBDu aDOC5VK5F9Ztl/aognzhozRDFDPi0m+cJnxMQ7n9O4WLmPn3odwqE5xpBS7tgHxYan 9OUqM+BQjL4IoLnSfwufKgdAcRbZkz2Y4XfJEqKTHzfJGifAAED9V3sYzpULgWZmTk kN72pgJsXYc7w== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1otTZg-000623-JP; Fri, 11 Nov 2022 13:56:00 +0100 Date: Fri, 11 Nov 2022 13:56:00 +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 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