From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C1F5C4332F for ; Fri, 21 Oct 2022 13:40:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230339AbiJUNko (ORCPT ); Fri, 21 Oct 2022 09:40:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230265AbiJUNkm (ORCPT ); Fri, 21 Oct 2022 09:40:42 -0400 Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54C9913A7C3 for ; Fri, 21 Oct 2022 06:40:33 -0700 (PDT) Received: by mail-qt1-x834.google.com with SMTP id a24so1605625qto.10 for ; Fri, 21 Oct 2022 06:40:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=5QMp8FGpCYqy7C5D/DoAxUrW6V4QqPBDuAozCo1MMcE=; b=YRY1YySQT2HK+oLGZ9eUk0FtMU27bcgVFrQl+bADHHMv0T/Dz+X3JQ6C0tjrTkfE9p A1U+D5bq3mvVd+mbCelTwMLG9tAATiViVHeYpSqTXXspbbg2BI1ZNhmBwONxN7SAM7Ww P1w6Hdg0zvh9csKSlOM6s/jPD4PfbVf7JmUQekpgCldlE8gn7GzCJGapdooHEXETR7c6 Tkwo99L6ns8NHqDtxFaNjs6UgIY3e1OQYxEFBvCKpOPZkxhZ8kFD+FoM/iyQAD8q+1aP CNVdLvWCGqGO7lRV7POS5oyDBm92zzVefONg7mMpkuD6qBVf91aEHKBg6US34KGo4AWW gnCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5QMp8FGpCYqy7C5D/DoAxUrW6V4QqPBDuAozCo1MMcE=; b=AhO/9cMJVRkzWg/wf5h7Bfs0cQ9mjDdBYXltf6THKaLjHcreDJEw1L54WN7YVs5qHx exs41wd0kani2+lIhw5Y/tPfSAMPR05wokN3UyrjuI3tNr6X8qM7MlUzM01/xO/rr4fS xRSc5yYVP3tLqj+wWkK6sfmv6KUmXFCeZFVVKPin83OElDVO7bibJA6Pkv4dUKVSVUli W9XyzSzHa3bMzb7s3TX1JKzkC88JNv1gDQfbmKbZLQiaUiE1aft9y+NkmoE7ufwus7ko qeEWoR08TI3lb3w1WUIjDhcfxV2Rq54t7/SZkGvKhTqGSO2hCqVX5AzqcrS7fWh1hCiQ 12cA== X-Gm-Message-State: ACrzQf1o+5092+bHcRrZ4INAvcReH/aD6nhFBzxxsIrjS4D53+Qsl8qU kn/mGmpkuPoIlGcZYzY/3dFWdw== X-Google-Smtp-Source: AMsMyM7r4+4YgmjJL7JF3UZzz460BgvvSOBo/XR8/3L/LuJBL98u1q3HfEM/3ebADAsjAx7Bkbwpeg== X-Received: by 2002:a05:622a:190b:b0:39c:f9a0:b31c with SMTP id w11-20020a05622a190b00b0039cf9a0b31cmr13959161qtc.445.1666359632647; Fri, 21 Oct 2022 06:40:32 -0700 (PDT) Received: from [192.168.10.124] (pool-72-83-177-149.washdc.east.verizon.net. [72.83.177.149]) by smtp.gmail.com with ESMTPSA id bl9-20020a05620a1a8900b006cf38fd659asm9268770qkb.103.2022.10.21.06.40.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Oct 2022 06:40:31 -0700 (PDT) Message-ID: Date: Fri, 21 Oct 2022 09:40:30 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH 2/2] dt-bindings: rtc: add bindings for max313xx RTCs Content-Language: en-US To: "Tilki, Ibrahim" , Alexandre Belloni Cc: "a.zummo@towertech.it" , "jdelvare@suse.com" , "linux@roeck-us.net" , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "linux-rtc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-hwmon@vger.kernel.org" , "devicetree@vger.kernel.org" , "Arslanbenzer, Zeynep" References: <20221019133910.282-1-Ibrahim.Tilki@analog.com> <20221019133910.282-2-Ibrahim.Tilki@analog.com> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 21/10/2022 09:05, Tilki, Ibrahim wrote: >> On 21/10/2022 11:44:12+0000, Tilki, Ibrahim wrote: >>>>> + interrupt-names: >>>>> + description: | >>>>> + Name of the interrupt pin of the RTC used for IRQ. Not required for >>>>> + RTCs that only have single interrupt pin available. Some of the RTCs >>>>> + share interrupt pins with clock input/output pins. >>>>> + minItems: 1 >>>>> + items: >>>>> + - enum: [INTA, INTB] >>>>> + - enum: [INTA, INTB] >>>>> + >>>> >>>> I don't think this is right, what this is doing is essentially pinmuxing >>>> interrupts versus clocks. What happens if you want INTB but this goes >>>> directly to a PMIC instead of the SoC? >>>> It is not something you can express with your current bindings. >>>> >>> >>> Why would a user want INTB when it is not connected to SoC? >>> User can specify none, either one or both of the interrupt pins. >>> I don't see what the problem here is. >>> >> >> the interrupt pin may be connected to a PMIC that is able to start or >> wake up the platform. In that case, the user would not have any >> interrupt-names and your driver will fail to mux the interrupt on INTB. >> Please fix. > > Interrupt muxing depends on the clock configuration, not the interrupt-names property. > Devices don't support muxing the alarm interrupt independently. > > For example in the case of max31329, alarm interrupt is muxed into INTA by default. > Alarm interrupt is muxed into INTB pin if and only if clkin is enabled.\ Just to be sure: are you now describing hardware or Linux driver behavior? > > This means that if a user wants the alarm interrupt on INTB pin, they have to > provide a clock input through "clocks" property. If that is the case, they can provide > an interrupt for INTB pin, otherwise the alarm feature of the rtc gets disabled. > > Side note: Some devices have 2 Alarms but Alarm2 does not have a register for > matching "seconds" so only Alarm1 is used by the driver. Best regards, Krzysztof