public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Cc: "Arınç ÜNAL" <arinc.unal@arinc9.com>,
	linux-watchdog@vger.kernel.org, wim@linux-watchdog.org,
	linux@roeck-us.net, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, matthias.bgg@gmail.com,
	tsbogend@alpha.franken.de, p.zabel@pengutronix.de,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-mips@vger.kernel.org
Subject: Re: [PATCH v4 1/5] dt-bindings: watchdog: mt7621-wdt: add phandle to access system controller registers
Date: Mon, 13 Feb 2023 09:38:05 +0100	[thread overview]
Message-ID: <d10e541a-cdfd-08af-6a2c-eb7edcdb486a@linaro.org> (raw)
In-Reply-To: <CAMhs-H-JGZMR6mB=USywAh4aRS9ZFOVebwLv8=N2f3uvWpcXDA@mail.gmail.com>

On 12/02/2023 09:13, Sergio Paracuellos wrote:
> On Sat, Feb 11, 2023 at 12:42 PM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 11/02/2023 12:01, Sergio Paracuellos wrote:
>>> On Sat, Feb 11, 2023 at 11:47 AM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>>>>
>>>> On 11.02.2023 13:41, Sergio Paracuellos wrote:
>>>>> On Sat, Feb 11, 2023 at 10:10 AM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>>>>>>
>>>>>> Is this mediatek,sysctl property required after your changes on the
>>>>>> watchdog code?
>>>>>
>>>>> I don't really understand the question :-) Yes, it is. Since we have
>>>>> introduced a new phandle in the watchdog node to be able to access the
>>>>> reset status register through the 'sysc' syscon node.
>>>>> We need the bindings to be aligned with the mt7621.dtsi file and we
>>>>> are getting the syscon regmap handler via
>>>>> 'syscon_regmap_lookup_by_phandle()'. See PATCH 5 of the series, Arınç.
>>>>
>>>> I believe you need to put mediatek,sysctl under "required:".
>>>
>>> Ah, I understood your question now :-). You meant 'required' property.
>>> I need more coffee, I guess :-). I am not sure if you can add
>>> properties as required after bindings are already mainlined for
>>> compatibility issues. The problem with this SoC is that drivers become
>>> mainlined before the device tree was so if things are properly fixed
>>> now this kind of issues appear.  Let's see Krzysztof and Rob comments
>>> for this.
>>
>> If your driver fails to probe without mediatek,sysctl, you already made
>> it required (thus broke the ABI) regardless what dt-binding is saying.
>> In such case you should update dt-binding to reflect reality.
>>
>> Now ABI break is different case. Usually you should not break it without
>> valid reasons (e.g. it was never working before). Your commit msg
>> suggests that you only improve the code, thus ABI break is not really
>> justified. In such case - binding is correct, driver should be reworked
>> to accept DTS without the new property.
> 
> Thanks for clarification, Krzysztof. Ok, so if this is the case I need
> to add this property required (as Arinc was properly pointing out in
> previous mail) since without it the driver is going to fail on probe
> (PATCH 5 of the series). I understand the "it was never working
> before" argument reason for ABI breaks. What happens if the old driver
> code was not ideal and totally dependent on architecture specific
> operations when this could be totally avoided and properly make arch
> independent agnostic drivers?

It's just an improvement and improvements should be incremental and not
break ABI.

> This driver was added in 2016 [0]. There
> was not a device tree file in the kernel for this SoC mainlined until
> 2022 [1]. 

2022 march was almost a year ago, so there were kernel releases with
this ABI.

Also, what about all out of tree DTS? What about other operating
systems, bootloaders, firmwares etc?


Best regards,
Krzysztof


  parent reply	other threads:[~2023-02-13  8:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-11  7:33 [PATCH v4 0/5] watchdog: mt7621-wdt: avoid globals and arch dependencies Sergio Paracuellos
2023-02-11  7:33 ` [PATCH v4 1/5] dt-bindings: watchdog: mt7621-wdt: add phandle to access system controller registers Sergio Paracuellos
2023-02-11  9:10   ` Arınç ÜNAL
2023-02-11 10:41     ` Sergio Paracuellos
2023-02-11 10:46       ` Arınç ÜNAL
2023-02-11 11:01         ` Sergio Paracuellos
2023-02-11 11:42           ` Krzysztof Kozlowski
2023-02-12  8:13             ` Sergio Paracuellos
2023-02-12 15:27               ` Guenter Roeck
2023-02-13  8:59                 ` Sergio Paracuellos
2023-02-13 19:36                   ` Guenter Roeck
2023-02-13 19:57                     ` Sergio Paracuellos
2023-02-13 20:09                       ` Guenter Roeck
2023-02-13  8:38               ` Krzysztof Kozlowski [this message]
2023-02-13  8:58                 ` Sergio Paracuellos
2023-02-11 11:42   ` Krzysztof Kozlowski
2023-02-11  7:33 ` [PATCH v4 2/5] mips: dts: ralink: mt7621: add phandle to system controller node for watchdog Sergio Paracuellos
2023-02-11  9:11   ` Arınç ÜNAL
2023-02-11  7:33 ` [PATCH v4 3/5] mips: dts: ralink: mt7621: rename watchdog node from 'wdt' into 'watchdog' Sergio Paracuellos
2023-02-11  9:12   ` Arınç ÜNAL
2023-02-11  7:33 ` [PATCH v4 4/5] watchdog: mt7621-wdt: avoid static global declarations Sergio Paracuellos
2023-02-11  7:33 ` [PATCH v4 5/5] watchdog: mt7621-wdt: avoid ralink architecture dependent code Sergio Paracuellos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d10e541a-cdfd-08af-6a2c-eb7edcdb486a@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=arinc.unal@arinc9.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=matthias.bgg@gmail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=sergio.paracuellos@gmail.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=wim@linux-watchdog.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox