Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp205328lqp; Mon, 10 Jun 2024 01:01:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXLWXJQmFUPNw4pZnp/TAMVlWJJV9SxEsCW1lZTepxkuRkOhPo9u9xsDhi1CaqelK/BZadK4xjR8jYqX/wCAfnE4j1YeUsn85BV+YguDg== X-Google-Smtp-Source: AGHT+IGW8Zwv2rYcyAQRYrG0B5yT+cmzWXZ69dPB+SZFAsrfjcB659mbZ8VnH8KgHMPi+F1BVFbK X-Received: by 2002:a05:6a20:5602:b0:1b6:da20:8032 with SMTP id adf61e73a8af0-1b6da208165mr3300286637.24.1718006468473; Mon, 10 Jun 2024 01:01:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718006468; cv=pass; d=google.com; s=arc-20160816; b=RguJEOXN+HUBQwD399UobP4FSEw67tYnTBLLCSu5lmF/o6gR6I5aWf0V//joflQBrb jIhmzViy8kSoTpm2fUCe7q8bITN6UvoHqhJfADUX18IMaIud1/ZLg8Qq+zFkhUxiBj1O bvnVrXp1lh9NYykri0G7e7ETZPACLJRqeEWvvTxDQFFD6EoiqhRfYsVWWxeXqMEgvH4T WPX+WJAg098hnd97KjmC9Mxzvr2EUkIcmdBn1wADpvPA/XiFalPcZPuz5IiBzO7xHVDE rqNzWK2ZPIlw1zYnLc9bKIHBFAze19sWqd7w85l4Rgbu1eALDRYiqX1ciwNCUOY/1qwR DXUw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=T7sOaOcLfwTXry5kN9eWXyqvbgt7HqMGLZVaHMxo0Fk=; fh=LeNJhJTPMjN8fw0kk1m5TNmTsxnStNI/DLv/+wrSXms=; b=HI05W5NduZOcnP4EWPYAsrtuhDUNeTxMdecIZ1IrGoMyMg36E1NvSs0sH9I8yI2y4O Zibv3VUvdNRpr3CQj41FWStoZhHS5N7n7EB8f+FNkkk0MAgkJ/lpN+TlsptOx5zGry0o TwUEr8+NPEOpxf33pTqIDhrnBOVyUigNWrymeAKk75Gwm3q3ksqaaeBkfMDdVQcklhDN 2fUu8XSqj8B5x6wovV+wMFXLenVK3cSO2zK26rF3Lx5WHeI2xEP0n9r8rsWgEoUoV/3Y 0KuViPJfEU1qtY4R7Yhk10ryLbbKvipepn1ogBc+0BBqT2bHVUyxCyApsJsAVp2dFd2V ZDXA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=E0dNFPWF; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-207792-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207792-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de261cae2esi2949238a12.277.2024.06.10.01.01.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 01:01:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207792-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=E0dNFPWF; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-207792-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207792-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id EB093280FF2 for ; Mon, 10 Jun 2024 08:01:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D23A5558BA; Mon, 10 Jun 2024 08:01:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="E0dNFPWF" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62F562B9D4; Mon, 10 Jun 2024 08:00:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718006461; cv=none; b=aijPMY/0k06MG319ByyVD247kcx05rQWL3iUTWnPM/Cioi9ei0mZmd2Rp7ssg4ewE8pE2YEcTjncpvbeLd38lDldwa8bb18rUXMfHSXRYSoZ+7zpRXl8ELmocgIBSt66AqTYRI2lwyaTqJoO713N3z1Pu6vRkglzPrqH+PCjS6g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718006461; c=relaxed/simple; bh=1qc8sEPJXgX5QVHao+W1jv64OvLM7kYZ9yU+Gf0Z1dI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=GCYD8uCflWRNlj71PV9OHQuG3ZY2ZxdyLbgsMcNlDYyvzilpWoM7pzfgD6jpteiK90wf6pdA84F5GAiNLevkaTz044D949+eL6Ms6szn1Pncx2916gjj+5bIblPOttFxXfrOH5OWT067dQFJcDLGFKTJvJ6TN+at9xe09Dl+usY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=E0dNFPWF; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1718006457; bh=1qc8sEPJXgX5QVHao+W1jv64OvLM7kYZ9yU+Gf0Z1dI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=E0dNFPWFdu9QwVQ4mckqkzCeoKk+njabiRFivBjbv15atGBo7I9qaQPBmaW7/n6Uc 3X3nXznhVVgzRjDCKXiBHSrwf8uH9+5XcjX7PneBkrSZonZZ0bholbelAR5GMynrKP M1zLUkSI4x65uIz3V3SlFVXoGCfXab9tc3iZbFaIfwtSEhOCfsRL8D6EvAIiw577VJ NJsd6JIp7RTwYZNluGNt+1Z9n+ex0jMkaE7lYtqDIPp0/jlF1Qu1eEJTyPR6vM3MLs 04o9wsTQ2sRbMYpQFf0QjwrMnspMkN2pVwlhjDRiofbx3NigwoeW9PLdWONe53j33Q Z8ATGX7jzsuIw== Received: from [100.113.186.2] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id E996B3780575; Mon, 10 Jun 2024 08:00:55 +0000 (UTC) Message-ID: Date: Mon, 10 Jun 2024 10:00:55 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/5] dt-bindings: iio: adc: Add MediaTek MT6359 PMIC AUXADC To: Rob Herring Cc: jic23@kernel.org, lars@metafoo.de, krzk+dt@kernel.org, conor+dt@kernel.org, matthias.bgg@gmail.com, lee@kernel.org, andy@kernel.org, nuno.sa@analog.com, bigunclemax@gmail.com, dlechner@baylibre.com, marius.cristea@microchip.com, marcelo.schmitt@analog.com, fr0st61te@gmail.com, mitrutzceclan@gmail.com, mike.looijmans@topic.nl, marcus.folkesson@gmail.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, andy.shevchenko@gmail.com, kernel@collabora.com References: <20240604123008.327424-1-angelogioacchino.delregno@collabora.com> <20240604123008.327424-2-angelogioacchino.delregno@collabora.com> <20240605235239.GA3455504-robh@kernel.org> From: AngeloGioacchino Del Regno Content-Language: en-US In-Reply-To: <20240605235239.GA3455504-robh@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Il 06/06/24 01:52, Rob Herring ha scritto: > On Tue, Jun 04, 2024 at 02:30:04PM +0200, AngeloGioacchino Del Regno wrote: >> Add a new binding for the MT6350 Series (MT6357/8/9) PMIC AUXADC, >> providing various ADC channels for both internal temperatures and >> voltages, audio accessory detection (hp/mic/hp+mic and buttons, >> usually on a 3.5mm jack) other than some basic battery statistics >> on boards where the battery is managed by this PMIC. >> >> Also add the necessary dt-binding headers for devicetree consumers. >> >> Signed-off-by: AngeloGioacchino Del Regno >> --- >> .../iio/adc/mediatek,mt6359-auxadc.yaml | 33 +++++++++++++++++++ >> .../iio/adc/mediatek,mt6357-auxadc.h | 21 ++++++++++++ >> .../iio/adc/mediatek,mt6358-auxadc.h | 22 +++++++++++++ >> .../iio/adc/mediatek,mt6359-auxadc.h | 22 +++++++++++++ >> 4 files changed, 98 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/iio/adc/mediatek,mt6359-auxadc.yaml >> create mode 100644 include/dt-bindings/iio/adc/mediatek,mt6357-auxadc.h >> create mode 100644 include/dt-bindings/iio/adc/mediatek,mt6358-auxadc.h >> create mode 100644 include/dt-bindings/iio/adc/mediatek,mt6359-auxadc.h >> >> diff --git a/Documentation/devicetree/bindings/iio/adc/mediatek,mt6359-auxadc.yaml b/Documentation/devicetree/bindings/iio/adc/mediatek,mt6359-auxadc.yaml >> new file mode 100644 >> index 000000000000..6497c416094d >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/iio/adc/mediatek,mt6359-auxadc.yaml >> @@ -0,0 +1,33 @@ >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/iio/adc/mediatek,mt6359-auxadc.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: MediaTek MT6350 series PMIC AUXADC >> + >> +maintainers: >> + - AngeloGioacchino Del Regno >> + >> +description: >> + The Auxiliary Analog/Digital Converter (AUXADC) is an ADC found >> + in some MediaTek PMICs, performing various PMIC related measurements >> + such as battery and PMIC internal voltage regulators temperatures, >> + accessory detection resistance (usually, for a 3.5mm audio jack) >> + other than voltages for various PMIC internal components. >> + >> +properties: >> + compatible: >> + enum: >> + - mediatek,mt6357-auxadc >> + - mediatek,mt6358-auxadc >> + - mediatek,mt6359-auxadc >> + >> + "#io-channel-cells": >> + const: 1 > > Why do you need a node here? Just add #io-channel-cells to the parent > node. > Because some boards will want to avoid probing the related driver, as that will trigger a reset and this may not play well with ECs (namely, some Chromebooks), which are reading the same AUXADC block. If I avoid using a new node, instead of just using `status`, I'll have to add a "mediatek,disable-auxadc" property to the parent node, which isn't pretty... Cheers, Angelo >> + >> +required: >> + - compatible >> + - "#io-channel-cells" >> + >> +additionalProperties: false