lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <28e776f8-1e37-79f4-5c10-a57c5cd7d4e4@linaro.org>
Date:   Mon, 12 Jun 2023 20:03:47 +0200
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     zhuyinbo <zhuyinbo@...ngson.cn>, Mark Brown <broonie@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        linux-spi@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     Jianmin Lv <lvjianmin@...ngson.cn>, wanghongliang@...ngson.cn,
        Liu Peibao <liupeibao@...ngson.cn>,
        loongson-kernel@...ts.loongnix.cn
Subject: Re: [PATCH v12 1/2] spi: add loongson spi bindings

On 12/06/2023 13:29, zhuyinbo wrote:
> 
> 
> 在 2023/6/12 下午4:16, Krzysztof Kozlowski 写道:
>>>>>>>>> 在 2023/6/8 下午7:45, Krzysztof Kozlowski 写道:
>>>>>>>>>> On 08/06/2023 13:42, zhuyinbo wrote:
>>>>>>>>>>> --- a/Documentation/devicetree/bindings/spi/loongson,ls2k-spi.yaml
>>>>>>>>>>> +++ b/Documentation/devicetree/bindings/spi/loongson,ls2k-spi.yaml
>>>>>>>>>>> @@ -16,6 +16,7 @@ properties:
>>>>>>>>>>>          compatible:
>>>>>>>>>>>            enum:
>>>>>>>>>>>              - loongson,ls2k1000-spi
>>>>>>>>>>> +      - loongson,ls2k0500-spi
>>>>>>>>>>
>>>>>>>>>> Aren't they compatible?
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Are you saying that the spi driver is compatible with 2k0500 ?
>>>>>>>>
>>>>>>>> Didn't you say this through 11 previous revisions?
>>>>>>>
>>>>>>>
>>>>>>> Yes, did I understand your meaning incorrectly ?
>>>>>>
>>>>>> If they are compatible, then they are not part of one enum. They could
>>>>>> not be as this would easily fail in testing of your DTS.
>>>>>>
>>>>>
>>>>>
>>>>> The "loongson,ls2k0500-spi" wasn't a compatible in previous version and
>>>>> I will add "loongson,ls2k0500-spi" as a compatible in spi driver and
>>>>> added it as a part of the one enum in dt-binding.
>>>>
>>>> No, because you claimed - if I understood correctly - that they are
>>>> compatible. Don't add fake entries to the driver.
>>>>
>>>
>>>
>>> I'm a bit confused, and I just need to add 'loongson,ls2k0500-spi' as
>>> one enum in dt-bindings, but driver don't add this entry ?
>>
>> Compatibility is expressed with a list:
>> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#compatible
>> so it cannot be just one enum, but "items". There are hundreds of
>> examples including example-schema.
> 
> 
> Is it a description like the following?
> 
>   properties:
>     compatible:
> -    enum:
> -      - loongson,ls2k1000-spi
> +    oneOf:
> +      - enum:
> +          - loongson,ls2k1000-spi
> +      - items:
> +          - enum:
> +              - loongson,ls2k1000-spi
> +          - const: loongson,ls2k1000-spi

Remove this items part - it does not make sense. Device is not
compatible with itself. Rest looks ok.



Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ