Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4025806rwb; Mon, 21 Nov 2022 02:48:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf6au9jZ3ZkVxWpKe0aRjfeXJTd2mK9/mi+Ostr3nBMXT3RQVDxvLlTIBWXpZHlKgzEOl9CY X-Received: by 2002:a17:906:a40c:b0:7ae:180e:9b53 with SMTP id l12-20020a170906a40c00b007ae180e9b53mr14963477ejz.206.1669027683458; Mon, 21 Nov 2022 02:48:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669027683; cv=none; d=google.com; s=arc-20160816; b=PyGKAMlaTnTW/vCY829u1C8pXQEbnn2mUuGX0kf4Fq6l3YADbmXsUwv8hFUGMTtxgO oc+JEHLq2bZs5JgIQM++jLZVE7Lfu9LlTW5fA9UqXDt1SQpUhbn/3rgVo+jhqZP9ID60 L05n9/ajET37MbxH4enkm/xqC5nROcpIJRTNdY7zvHm4DKoxSWMlDvduAeoz9tAS48mV 4OYhs/cqhfvrLjxvSz5JNWAyRdppuEVNW7609uXKRePo/P9DUkbEyPF70O+pVBpEas/p VA4F861c87r22nWWFUc7a1kCVuLxo9HTL+iYhXGh/4sY30RkfNUGQFMlOcwvJBk/eOxF kKXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :cc:to:subject:from:date:dkim-signature; bh=R611slSDxNRO/QG8lfrrPsckzIVCVuOTAefHH2t0jQQ=; b=isBr7ZzVFuGdzwI3ntsxUu1Vrbj5yv1y5zVNG1eJ2xjxmoEqlI77a1PKVKlRmMss55 sj+Js5y2i8GkMIx8t9S9eLBA9FUX01bU8UbbxkajdvgH4uTuKK5ZxULllIrVy+EQLvwu SgKTJ/mZbNVhTxK+gXTZfeMvFtStp1LcAxlpyz6PlQbTotCL7wuMvn6vtrW6SpYE2JzI +QivRk7bKzsOJXswhVBUdOghpBOcLp0tl5IuOxid/0jsydUl1wh0sDRB62TqSbLXv7s5 2EPGxeCfF8LkzU5kVf7IiwJ1/CXpcl9y9Az5uaDjfLdexo453ZKDnXUO/uOmSe7scrYN XEPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HXKZvoAP; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id et19-20020a170907295300b00783a5f78700si7010127ejc.226.2022.11.21.02.47.39; Mon, 21 Nov 2022 02:48:03 -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=@gmail.com header.s=20210112 header.b=HXKZvoAP; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229541AbiKUKgx (ORCPT + 91 others); Mon, 21 Nov 2022 05:36:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbiKUKgv (ORCPT ); Mon, 21 Nov 2022 05:36:51 -0500 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AE3F286EE; Mon, 21 Nov 2022 02:36:48 -0800 (PST) Received: by mail-wm1-x32b.google.com with SMTP id v124-20020a1cac82000000b003cf7a4ea2caso12403353wme.5; Mon, 21 Nov 2022 02:36:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:message-id:cc:to:subject:from :date:from:to:cc:subject:date:message-id:reply-to; bh=R611slSDxNRO/QG8lfrrPsckzIVCVuOTAefHH2t0jQQ=; b=HXKZvoAP+gEhaxt9XRf+cl+d+FGAWY+FJRkANVTTF3mPW/WAfT2y0IGH9qoyXIr1dO Ejl5eWZQWYWOEiTmwx9GuoTcdkX/ALNkXAWwQS/TsKqgQYRSNgxfYhzaJmjmVMvwNgK7 NDs6KqOqxBC8+Uhuvw6w3ksRJv9Jm0RNIbjYkPGPkvzgxiLbzPxyyH+tgVXQRPApRObS OLiHXV3MEV1JLwkIrjBiYafobCVAMOiwsc5I0iCLHYVqwJqEoMhwIcBNGYg3MuwrS6o8 Kkp22TSaa8CHcFe5Uhhs9xk3itPUooiyMjazqWRU0qUouOIJTLzwyxt4NyfGotdkgbx/ Xmhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:references:in-reply-to:message-id:cc:to:subject:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=R611slSDxNRO/QG8lfrrPsckzIVCVuOTAefHH2t0jQQ=; b=7BWU1NIIgkkdjSBVJq2fLLGxFx6+lT4aphwUPltKw4GHf+hAwZ6sEUAdfLhynZiBS9 uDVTUt1uhuFrz0gVvtn08HRQJK6G3/EaAXtFPzL7sXjDhXlAjCrASamZXb/SvVGJF4yL 60bzN4bVUpGT13n9wAJqJWr3oWtGgNdGYDw2CQig08/A7WkvM2gtu+RyGmZ6ckrp6/J/ gWDzubZGeRZlQNqPeCY7OVpZqxVAEZJZr5nPy6uPg3Th4CuzWFVnY/o5Rls59gcVrfb2 4nYUwXpduVXWIahEhjc/R/mQtVYA7Qq3T5SlVMaz6vgKRBsmj/4QazKybz5QEiSa+uoQ ju9Q== X-Gm-Message-State: ANoB5pnp3q/rM2QVOQ8vdwtS21PzoUi1UCwVgPEA+0iDHFHRt1ik5/cz x3omurO+433y0M5EwsCwTsI= X-Received: by 2002:a05:600c:1d9c:b0:3c6:bf1e:ebb9 with SMTP id p28-20020a05600c1d9c00b003c6bf1eebb9mr15311335wms.173.1669027006530; Mon, 21 Nov 2022 02:36:46 -0800 (PST) Received: from [10.32.3.204] ([95.183.227.98]) by smtp.gmail.com with ESMTPSA id s23-20020a1cf217000000b003c6c5a5a651sm13048074wmc.28.2022.11.21.02.36.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Nov 2022 02:36:45 -0800 (PST) Date: Mon, 21 Nov 2022 13:36:37 +0300 From: Yassine Oudjana Subject: Re: [PATCH 1/8] dt-bindings: power: supply: Add DT schema for Qualcomm SMBCHG To: Krzysztof Kozlowski Cc: Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Alejandro Tafalla , Konrad Dybcio , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, phone-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Yassine Oudjana Message-Id: <1H1PLR.S9UFOHIJCU6S@gmail.com> In-Reply-To: <795deac4-71fe-d40b-a3b6-855eb3875ad1@linaro.org> References: <20221120154625.57095-1-y.oudjana@protonmail.com> <795deac4-71fe-d40b-a3b6-855eb3875ad1@linaro.org> X-Mailer: geary/43.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Mon, Nov 21 2022 at 09:26:59 +01:00:00, Krzysztof Kozlowski wrote: > On 20/11/2022 16:46, Yassine Oudjana wrote: >>>> + interrupts: >>>> + items: >>>> + - description: Charger error >>>> + - description: Charger inhibited >>>> + - description: Charger precharge safety timer timeout >>>> + - description: Charger charge safety timer timeout >>>> + - description: Charger pre to fast charging switch >>>> threshold reached >>>> + - description: Charger recharge threshold reached >>>> + - description: Charger taper threshold reached >>>> + - description: Charger charge termination threshold reached >>>> + - description: Battery hot >>>> + - description: Battery warm >>>> + - description: Battery cold >>>> + - description: Battery cool >>>> + - description: Battery overvoltage >>>> + - description: Battery low >>>> + - description: Battery missing >>>> + - description: Battery thermistor missing # unconfirmed >>>> + - description: USB input undervolt >>>> + - description: USB input overvolt >>>> + - description: USB input source detected >>>> + - description: OTG regulator failure >>>> + - description: OTG regulator overcurrent >>>> + - description: Automatic input current limiting done >>>> + - description: USB ID pin changed >>>> + - description: DC input undervolt >>>> + - description: DC input overvolt >>>> + - description: Power OK >>>> + - description: Temperature shutdown >>>> + - description: Watchdog timeout >>>> + - description: Flash failure >>>> + - description: OTST2 # unknown >>>> + - description: OTST3 # unknown >>> >>> It seems you listed register interrupts, not physical pins. This >>> should >>> be interrupt lines. >> >> I'm not sure what I'm supposed to do here. I couldn't find an >> interrupt-lines >> property used anywhere so that's not what you meant, right? > > Are these physical interrupt lines this device has, register offsets > or > virtual interrupts (e.g. passed via irq_chip)? Definitely not the > first > and rather offsets for qpnpint_irq_domain_translate. Devicetree is not > for describing register layout of devices. IOW, register layout does > not > change on different boards, because the device is exactly the same, so > there is no point to put it into DTS. > So how would I describe the interrupts then? Or if you are saying I shouldn't have these interrupts in DT at all, how would I get them and register handlers for them in the driver? the PMIC arbiter takes 4 interrupt cells, 3 of which are these offsets specifying the peripheral and interrupt. All other PMIC peripherals currently described in DT (examples being qcom,pm8916-wcd-analog-codec, qcom,pm8941-pwrkey and qcom-wled) have their interrupts (if any) described this way, with the only exceptions perhaps being the GPIO and MPP controllers which are themselves interrupt controllers. Changing the way PMIC peripheral interrupts are described would require changing PMIC arbiter bindings and code which I believe is out of the scope of this patch series.