All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Whitchurch <vincent.whitchurch@axis.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Lee Jones <lee@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	kernel <kernel@axis.com>, <robh@kernel.org>
Subject: Re: [PATCH] mfd: Add Simple PCI MFD driver
Date: Wed, 25 Jan 2023 11:15:38 +0100	[thread overview]
Message-ID: <Y9EBSmOoE5+83jS5@axis.com> (raw)
In-Reply-To: <Y862WTT03/JxXUG8@kroah.com>

On Mon, Jan 23, 2023 at 05:31:21PM +0100, Greg Kroah-Hartman wrote:
> On Mon, Jan 23, 2023 at 03:32:55PM +0000, Lee Jones wrote:
> > On Mon, 23 Jan 2023, Vincent Whitchurch wrote:
> > 
> > > Add a PCI driver which registers all child nodes specified in the
> > > devicetree.  It will allow platform devices to be used on virtual
> > > systems which already support PCI and devicetree, such as UML with
> > > virt-pci.
> > > 
> > > The driver has no id_table by default; user space needs to provide one
> > > using the new_id mechanism in sysfs.
> > 
> > This feels wrong for several reasons.
> > 
> > Firstly, I think Greg (Cc:ed) will have something to say about this.
> 
> Yes, this isn't ok.  Please write a real driver for the hardware under
> control here, and that would NOT be a MFD driver (hint, if you want to
> split up a PCI device into different drivers, use the aux bus code, that
> is what it is there for.)

I hope it's clear from my other replies in this thread that the entire
purpose of this driver is to allow arbitrary platform devices to be used
via a PCI device in virtual environments like User Mode Linux in order
to test existing platform drivers using mocked hardware.

Given this "hardware", it's not clear what a "real driver" would do
differently.  The auxiliary bus cannot be used since it naturally does
not support platform devices.  A hard coded list of sub-devices cannot
be used since arbitrary platform devices with arbitrary devicetree
properties need to be supported.

I could move this driver to drivers/bus/ and pitch it as a
"PCI<->platform bridge for testing in virtual environments", if that
makes more sense.

  reply	other threads:[~2023-01-25 10:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23 14:32 [PATCH] mfd: Add Simple PCI MFD driver Vincent Whitchurch
2023-01-23 15:32 ` Lee Jones
2023-01-23 16:02   ` Vincent Whitchurch
2023-01-23 16:36     ` Rob Herring
2023-01-24  2:30       ` Lizhi Hou
2023-01-24 13:15       ` Vincent Whitchurch
2023-01-23 16:31   ` Greg Kroah-Hartman
2023-01-25 10:15     ` Vincent Whitchurch [this message]
2023-01-25 12:29       ` Greg Kroah-Hartman
2023-01-25 13:06         ` Vincent Whitchurch
2023-01-25 13:34           ` Greg Kroah-Hartman
2023-01-25 14:54         ` Rob Herring
2023-01-25 15:00           ` Greg Kroah-Hartman
2023-01-25 15:34             ` Rob Herring
2023-01-31 15:07               ` Greg Kroah-Hartman
2023-01-23 16:13 ` Rob Herring
2023-01-24 12:54   ` Vincent Whitchurch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y9EBSmOoE5+83jS5@axis.com \
    --to=vincent.whitchurch@axis.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel@axis.com \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.