Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1762451imu; Thu, 24 Jan 2019 01:13:41 -0800 (PST) X-Google-Smtp-Source: ALg8bN6JZ9dT5WdVza2jRmcwA9ZgUsZgu2kMcWjxNEdoHzwLKjcetWqN5sdR24ZfN08t0Ciui+El X-Received: by 2002:a63:504d:: with SMTP id q13mr5274843pgl.319.1548321221335; Thu, 24 Jan 2019 01:13:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548321221; cv=none; d=google.com; s=arc-20160816; b=WBfNd0MBwuQrcjd6iXJtuejpEYQkOh8r5kDnnsX6XDHoMukb3TEEw/3wqjku2EkHxu 0L/KUNxIFmJG4alXlzfAaPoDQIsPKB3bWnlWzUS6Xnh6wCTq2dCq0EuIe0oOk4ifAoNs eGkYFLH1M0PLbFngdQsxwBQ3hSN4Z8UYjcRnAdPPL2CTBhmnqa9G9nGxml9SSfF/ojvn IRyy1CEsLCiWVNMbtyaZNRYbDy3iyj8daELq7VlA6BhdNgYbkmPOBBZHv7OPAHXPtAJu norz+nulcgaRbWxtHtvpxF2KsIteBYfnFVV5SeKihVlxD2YBRroPxzmSfc3KHL72CwL8 /CHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=hDQyrsUDSM21U95pLEr85YrpbNZyOtBu+X2wP9Gn80E=; b=snLypAJPfYy3xrl1lbtP0ydXOc5BSEzgyq6JvQ/beXlPKpvKFGOYqHHxjb49rPhM+O gAYTkMjxqoRvvO2tLmZTrp1aFCYAiVAXln2QGOMhhbmWSRO5nAZXb0Af6lmm6UEuqDzK jbV7V5VvpzQwDHXw1ee0Y0VlAEwWjucRE0hOa829OptT2xONuUvYnpkbQKc+OI6OzV3k y3mMBbI+p6ghT6eonf5OoAzU2AzSfc6CiWOBsFB8HfSKX1EfFlrImDh2V6RNwYUT9fCc i3vZThXmfwNaBac74JajrRv6wCQcNXBamWE/U2sAa/jEjtj4FYp6SHMph7qkkJMGZxaF Sefw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m33si20749850pgl.379.2019.01.24.01.13.26; Thu, 24 Jan 2019 01:13:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726212AbfAXJNI convert rfc822-to-8bit (ORCPT + 99 others); Thu, 24 Jan 2019 04:13:08 -0500 Received: from mail-vs1-f66.google.com ([209.85.217.66]:44766 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725931AbfAXJNI (ORCPT ); Thu, 24 Jan 2019 04:13:08 -0500 Received: by mail-vs1-f66.google.com with SMTP id u11so3069846vsp.11; Thu, 24 Jan 2019 01:13:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=1ehrP1RXAhBOaf7/Ggy42Orq06tEZtqtdfxRf3rgExY=; b=L17YZ7NIbmFLfHUhEBcYu652W3McnI1TO0VsaTeTBcUFmS/fg4orefpOoTx08ykp+T EwZhROFOkZGnoRpPxxvokGGBZGbgEhY5uJxASYrL1afGGx5m+1tnvPZRCM1po5oeuAPZ rYUJeuTXVDT8Vgla7p2cBt1i5GV5Iy2clERGqaxxpZai/xT9gvvEWXjUI8sOmvBNZdho lZo+9OgGCjTyNybQZUoRHDOWmNOnLrQeMvskl1BBoMhIKSGSSghdPwhWgFAwWOQRZ3Rm Z1mfDQCjgK9z28E1vGMO89IhGzznWMn410l9L/1YT9ROdm4Y9OiP80AFLTAJrbABravc Xavw== X-Gm-Message-State: AJcUukfenqm6oXs2gb8xH/Jm5XKVTUZm/4Hc5/Ha1YCrS2SdRG30KxnB eeEOQpn0gvmtHQ7B9wpAY9MdCgApC4SjDQ1Bnwo= X-Received: by 2002:a67:c202:: with SMTP id i2mr2307162vsj.11.1548321186908; Thu, 24 Jan 2019 01:13:06 -0800 (PST) MIME-Version: 1.0 References: <1548227352-14910-1-git-send-email-masonccyang@mxic.com.tw> <1548227352-14910-2-git-send-email-masonccyang@mxic.com.tw> <12af2632-491d-0e01-66c9-0ead4f9d985a@cogentembedded.com> In-Reply-To: From: Geert Uytterhoeven Date: Thu, 24 Jan 2019 10:12:54 +0100 Message-ID: Subject: Re: [PATCH v7 1/2] spi: Add Renesas R-Car Gen3 RPC-IF SPI controller driver To: Mason Yang Cc: Sergei Shtylyov , Boris Brezillon , Mark Brown , Geert Uytterhoeven , Simon Horman , juliensu@mxic.com.tw, Linux Kernel Mailing List , Linux-Renesas , linux-spi , Marek Vasut , zhengxunli@mxic.com.tw Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mason, On Thu, Jan 24, 2019 at 3:07 AM wrote: > > "Sergei Shtylyov" > > 2019/01/24 上午 02:04 > > > +static const struct of_device_id rpc_spi_of_ids[] = { > > > + { .compatible = "renesas,r8a77995-rpc", }, > > > > Why (if it has no differences with the generic gen3 value below)? > > Please remove. > > By Geert's comments in dts, > > rpc: rpc@ee200000 { > compatible = "renesas,r8a7795-rpc", "renesas,rcar-gen3-rpc"; > reg = <0 0xee200000 0 0x200>, <0 0x08000000 0 0x4000000>, > <0 0xee208000 0 0x100>; > > I modified it to "renesas,r8a77995-rpc" because this is Soc I developed and validated. There's a difference between compatible values in DT and in drivers: - DT should list all compatible values that are applicable, from most-specific to least-specific, - Drivers should match against the least-specific compatible value that is sufficient to get the job done. In this case, that's "renesas,rcar-gen3-rpc". The driver will probably have to be extended to match against "renesas,r8a77970-rpc" when R-Car V3M support is added, as RPC on V3M has an extra register that must be set, and thus cannot be declared compatible with "renesas,rcar-gen3-rpc". I hope this explanation makes it clearer. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds