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 C5E5AECAAD8 for ; Tue, 20 Sep 2022 11:24:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229677AbiITLYC (ORCPT ); Tue, 20 Sep 2022 07:24:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229814AbiITLYA (ORCPT ); Tue, 20 Sep 2022 07:24:00 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8A815F22E for ; Tue, 20 Sep 2022 04:23:59 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id a10so2659193ljq.0 for ; Tue, 20 Sep 2022 04:23:59 -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; bh=/0mHSVnSHyZzrC5ifeYDLHWwTr31LJ+v7YO3CdpHIYw=; b=q4OjpwV3vvU5p4r3i538IRLcqFf0ti63PbfEmifJlcEaaJQ99fGSvCnoqR0gv+SehV 09+khHED4vOB7NhXS8GwiAYfl6p7y6V6AVDE5X1XGoIHk6roNimjcHr9h/YszqVX9jyI 00+oiksBa/FU+tYYGdB2um+hbTEqBrwKWTAO9yShjvU2eR0ng+5u/TGfzBQSRSogrpZd DlfIhgekcUmz9nbUiKu4GJ3JvQQdIydt3mzcnNr5NS/ibD0yEmVeoJNNXpQvbULx7w1O CtD+IPUO+GMkcIa+/ddEY6Fh6mVJoC+PnqmbmeWgP0Huwa9JhpImGvuQk5dnA1S91b1c RlfA== 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; bh=/0mHSVnSHyZzrC5ifeYDLHWwTr31LJ+v7YO3CdpHIYw=; b=aSkTxRmCOueU3zCPiCbzZHRGMQRkdzOv2U7PwtnIpL5Jc6mxu7l4PBvtI7oCn20sM6 X9IdDUiJ9X96EuPyOJczz9R1zy18WcSCum+xcqV4jHpmkkqEa1SXADxvm/iSvKxqr8zG tOfrjYSEVQWmcplVDXcEphqXCyUz8Y8jDsPRCJ7DerKuHP41YMcIRW/TyNNBDZnJOVj4 IhRCEeSuCIsvH+AlWAWXcdoEJio7LEDDuAFFSf0hRq9L9F+3dnfj/eMTfrSx+r3MHIQI uaqqCBJebDYhnpOpoESTnmANES+A4UGOm4i5/SpepeUfvoVZON4wkjRAkEhGMrrUMkET 3Y2Q== X-Gm-Message-State: ACrzQf3J/wb6AKYxxOfI97P2vvOPJmNUTGSPLSu/3BKfroJKzqe4TuI8 Db1mDHaZznhvWgBwg4lZjBc2ow== X-Google-Smtp-Source: AMsMyM5abCZSXw/1C0P6ylmk8JbvIszYe7SescGOUEjyz74shfmm2JPEpDk1rGI3TqWGnPQKxmFu5A== X-Received: by 2002:a05:651c:194f:b0:26c:b2b:83d7 with SMTP id bs15-20020a05651c194f00b0026c0b2b83d7mr7163502ljb.218.1663673038316; Tue, 20 Sep 2022 04:23:58 -0700 (PDT) Received: from [192.168.0.21] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id e16-20020a056512091000b00492d7a7b4e3sm273639lft.4.2022.09.20.04.23.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Sep 2022 04:23:57 -0700 (PDT) Message-ID: <8d45ba5e-4d69-899f-94f3-af4374a870b2@linaro.org> Date: Tue, 20 Sep 2022 13:23:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH v5 2/3] memory: omap-gpmc: add support for wait pin polarity Content-Language: en-US To: "Niedermayr, BENEDIKT" , "devicetree@vger.kernel.org" , "linux-omap@vger.kernel.org" Cc: "rogerq@kernel.org" , "tony@atomide.com" , "robh+dt@kernel.org" References: <20220916120749.2517727-1-benedikt.niedermayr@siemens.com> <20220916120749.2517727-3-benedikt.niedermayr@siemens.com> <6dd3d41b-eb75-3754-8a17-a8cb4bc838a8@linaro.org> <24e5fa6065f68a25226b4aee02b8f900b630befa.camel@siemens.com> <0afa173f-9f7f-b2c8-7abc-2384ee46429d@linaro.org> 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 20/09/2022 12:12, Niedermayr, BENEDIKT wrote: >> I commented exactly below the line which I question. I don't question >> other lines. So let me be a bit more specific: >> >> Why do you need >> "p->wait_pin_polarity != WAITPINPOLARITY_DEFAULT" >> ? Can you write a scenario where this is useful? >> > Ok. I think I got you now. Sorry I'm relatively new to OSS contributions, so please be patient with me... > > If I remove that part of the if clause, then an error message would be printed in case "p->wait_pin_polarity == WAITPINPOLARITY_DEFAULT". Exactly this will happen. As expected. This value cannot appear in DTS, therefore I would expect error message. Now you allow such value in DTS which is not the same as your bindings. > But this is a not an error case. WAITPINPOLARITY_DEFAULT is a valid value, is assigned right before the if clause as an init value(not extracted from DT), > and leads to not touching the GPMC_CONFIG register in gpmc_cs_program_settings(). > So in gpmc_cs_program_settings() if: > p->wait_pin_polarity != WAITPINPOLARITY_ACTIVE_HIGH -> Issue a write to the GPMC_CONFIG register > p->wait_pin_polarity != WAITPINPOLARITY_ACTIVE_LOW -> Issua a write to the GPMC_CONFIG register > p->wait_pin_polarity != WAITPINPOLARITY_DEFAULT -> Do not touch the GPMC_CONFIG register > > We want to preserve the reset value of the GPMC_CONFIG register in case the DT does not use the "gpmc,wait-pin-polarity" property. Otherwise > we might break platforms which rely on these reset values. Best regards, Krzysztof