On 21/02/2024 06:36, Jishnu Prakash wrote:
Hi Krzysztof,
On 2/17/2024 7:43 PM, Krzysztof Kozlowski wrote:
On 16/02/2024 11:39, Jishnu Prakash wrote:
Hi Krzysztof,
How is this a problem?
In qcom,spmi-vadc.yaml, we have the following top-level constraints for
the "reg" and "interrupts" properties:
reg:
maxItems: 1
interrupts:
maxItems: 1
For the ADC5 Gen3 device being added now, these constraints cannot be
followed always, as there may be more than one peripheral under one
device instance, each with a corresponding interrupt. For example, the
above properties could be like this for a ADC5 Gen3 device:
reg = <0x9000>, <0x9100>;
interrupts = <0x0 0x90 0x1 IRQ_TYPE_EDGE_RISING>,
<0x0 0x91 0x1 IRQ_TYPE_EDGE_RISING>;
I could not overwrite the top-level constraints for the new device
"qcom,spmi-adc5-gen3" alone in qcom,spmi-vadc.yaml, so I tried to remove
the constraints from the top level and add them back conditionally for
all the device types separately, but you told me not to remove them
(full message:
https://lore.kernel.org/linux-iio/832053f4-bd5d-4e58-81bb-1a8188e7f364@xxxxxxxxxx/)
Because top-level widest constraints must stay, but it is not a problem.
Most of the multi-device bindings work like this. Dozen of Qualcomm. Why
you cannot do this the same way we do for all Qualcomm devices?
Since these constraints cannot be modified for a specific new device or
???
removed, I think the only way to accommodate this new device is to add
it in its own new file.
Is this a sufficient justification for adding this documentation in a
new file or do you have any other suggestions?
I already gave you the suggestions and you ignored them. Do like we are
doing for all other drivers. Don't re-invent stuff. Either this fits to
existing schema or come with common schema (and then provide rationale
why it does not fit to existing one).
Best regards,
Krzysztof