Re: [RFC PATCH 2/2] dt: spi: s3c64xx: add compatible to controller-data

From: Boris Brezillon
Date: Thu Jul 30 2015 - 03:51:13 EST


Hi Michal,

On Wed, 29 Jul 2015 12:19:57 +0200
Michal Suchanek <hramrach@xxxxxxxxx> wrote:

> The controller-data subnode has no compatible. This can lead to other
> drivers getting confused by it. Add a compatible to make devicetreee
> unambiguous.
>
> Signed-off-by: Michal Suchanek <hramrach@xxxxxxxxx>
> ---
> Documentation/devicetree/bindings/spi/spi-samsung.txt | 3 +++
> drivers/spi/spi-s3c64xx.c | 4 ++++
> 2 files changed, 7 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/spi/spi-samsung.txt b/Documentation/devicetree/bindings/spi/spi-samsung.txt
> index 6dbdeb3..b1e98d1 100644
> --- a/Documentation/devicetree/bindings/spi/spi-samsung.txt
> +++ b/Documentation/devicetree/bindings/spi/spi-samsung.txt
> @@ -92,16 +92,19 @@ Example:
> spi-max-frequency = <10000>;
>
> controller-data {
> + compatible = "samsung,s3c-controller-data";

AFAIK compatible should (as much as possible :-)) only be used to encode
HW type, and here you're using it to expose what you want to do with
your data in Linux.

> samsung,spi-feedback-delay = <0>;
> };
>
> partition@0 {
> + compatible = "linux,ofpart-partition";

Ditto.

Since you have to patch your DTs anyway, how about putting your
partitions in a subnode and patch the ofpart code to parse this subnode
if it is present (see the following patch).

Best Regards,

Boris

--- >8 ---