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 BDFE8C4332F for ; Fri, 21 Oct 2022 13:40:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230502AbiJUNkv (ORCPT ); Fri, 21 Oct 2022 09:40:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230478AbiJUNks (ORCPT ); Fri, 21 Oct 2022 09:40:48 -0400 Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0745C1ABEC2 for ; Fri, 21 Oct 2022 06:40:34 -0700 (PDT) Received: by mail-qt1-x82e.google.com with SMTP id h24so1616160qta.7 for ; Fri, 21 Oct 2022 06:40:34 -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=yc+4IAvFUIQEe/I9QHqbFOIa+6gFxq3rBcZnGx3sZxm4FLa+XzX+aCaRN56r64FAjk FwIb9AC/UXJ4E0jN8RnyAkPm4JBp/RZaZf5QDdSrJ7bZd3AVfaykjCGld9dNDJYvP90f /2zAIUWBDQ8RiGlqTPLjDz0yUHfEJYeGlX8CJrrLRSMxIqb1wqcEdbYydRgVADHNvFMN v0+ZLZFtG9qe6Iq2XtGg2M49xJi6r2HJZ6vv+0mZgXdSaJOyprupr46mN+7m5Z/RE/ek 2gTCpsHSJZJpyT4bcc4/ZS4FW7b9RwQBVASzvN3MMpm2ZF7pz/hpuoG1ZqifWK9GdHGV 8x9w== X-Gm-Message-State: ACrzQf0qysWMlFnNv3rBurAOCa3HEo/J8RI2qcUGIKxcC9Sd1YYPrTaZ 2Moquqv9r9cAlqsN6SrwaGQ22w== 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: linux-rtc@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