On Tue, Dec 18, 2018 at 12:21 AM Thor Thayer
[off-list ref] wrote:
Hi Arnd,
On 12/14/18 6:36 AM, Arnd Bergmann wrote:
quoted
On Tue, Nov 13, 2018 at 5:03 PM [off-list ref] wrote:
quoted
From: Thor Thayer <redacted>
quoted
quoted
+static int socfpga_is_s10(void)
+{
+ return of_machine_is_compatible("altr,socfpga-stratix10");
+}
I don't really like the way you are checking for a specific here
here though, that is something that should only be done in
an absolute emergency when there is no way of fixing the
device tree files.
Since this is a new driver for a device that is not used in
mainline kernels yet (AFAICT), let's fix the binding and add
a proper detection method here.
Thank you. I'm not completely clear on this. Are you saying this
function should test for a new compatible that is assigned to Stratix10
in the binding ("altr,sys-mgr-s10") instead of the machine name?
Yes, exactly.
Arnd