From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933923AbcLGX3I (ORCPT ); Wed, 7 Dec 2016 18:29:08 -0500 Received: from ozlabs.org ([103.22.144.67]:58963 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933287AbcLGX1t (ORCPT ); Wed, 7 Dec 2016 18:27:49 -0500 Subject: Re: [PATCH 05/16] drivers/fsi: Add fake master driver To: Mark Rutland , Chris Bostic References: <1481069677-53660-1-git-send-email-christopher.lee.bostic@gmail.com> <1481069677-53660-6-git-send-email-christopher.lee.bostic@gmail.com> <20161207120905.GD7054@leverpostej> Cc: robh+dt@kernel.org, linux@armlinux.org.uk, gregkh@linuxfoundation.org, sre@kernel.org, mturquette@baylibre.com, geert+renesas@glider.be, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, joel@jms.id.au, linux-kernel@vger.kernel.org, andrew@aj.id.au, alistair@popple.id.au, benh@kernel.crashing.org, Chris Bostic From: Jeremy Kerr Message-ID: Date: Thu, 8 Dec 2016 10:27:46 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161207120905.GD7054@leverpostej> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mark & Chris, > On Tue, Dec 06, 2016 at 06:14:26PM -0600, Chris Bostic wrote: >> From: Jeremy Kerr >> >> For debugging, add a fake master driver, that only supports reads, >> returning a fixed set of data. > >> +config FSI_MASTER_FAKE >> + tristate "Fake FSI master" >> + depends on FSI >> + ---help--- >> + This option enables a fake FSI master driver for debugging. >> +endif > >> +static const struct of_device_id fsi_master_fake_match[] = { >> + { .compatible = "ibm,fsi-master-fake" }, >> + { }, >> +}; > > NAK. > > DT should be treated as an ABI, and should describe the HW explicitly. > This makes no sense. This is also missing a binding document. > > Have your module take a module parameter allowing you to bind it to > arbitrary devices, or do something like what PCI does where you can > bind/unbind arbitrary drivers to devices using sysfs. This driver is purely for testing the FSI engine scan code; we could probably just drop this patch since I suspect that it's no longer useful (now that we have an actual master driver). If we do want to keep it though, I'd say we remove the device tree dependency; all this is doing at the moment is triggering the ->probe, and there are better ways to do that. Cheers, Jeremy