All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Hughes <hughsient@gmail.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: ptyser@xes-inc.com, Lee Jones <lee.jones@linaro.org>,
	tudor.ambarus@microchip.com,
	Kate Stewart <kstewart@linuxfoundation.org>,
	allison@lohutok.net, tglx@linutronix.de, jethro@fortanix.com,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mfd: Export LPC attributes for the system SPI chip
Date: Wed, 13 May 2020 15:13:28 +0100	[thread overview]
Message-ID: <CAD2FfiGNErUhz=7DH6Z37X573hSkJkzbOEXbb++X+Ey5WLc9=Q@mail.gmail.com> (raw)
In-Reply-To: <20200513091100.GY2571@lahna.fi.intel.com>

On Wed, 13 May 2020 at 10:11, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
> > I can fix up all those, but out of interest how did you "know" the
> > right three digit identifier to use?
> I work for Intel ;-)

Hah, okay, thanks :)

> > I'm really wondering if drivers/mfd/lpc_ich.c is the right place for
> > this kind of "just expose one byte of PCI config space" functionality.
> Ideally there is one driver per device.

My idea in https://github.com/hughsie/spi_lpc was to not actually
register a pci_driver.

> If this is touching the 00:1f.5 PCI device (SPI-NOR controller) then the
> right place is the intel-spi-pci.c as that's the driver for this
> controller.

So Cannon Lake, Cannon Point and Ice Lake would go into
drivers/mtd/spi-nor/controllers/intel-spi-pci.c and the systems like
Sunrise Point using an ISA bridge would use drivers/mfd/lpc_ich.c?

> We can put this there so that it does not enable the SPI-NOR
> functionality itself and the mark the SPI-NOR functionality only as
> being dangerous or something like that.

I think getting the distros to enable SPI_INTEL_SPI_PCI might be a
tough sell. Could we perhaps remove the DANGEROUS label as it's not
writeable without a module option?

> > > > +     char tmp[2];
> > > Wouldn't this need to account the '\0' as well?
> You sprint() there "%d\n", so that includes a number, '\n' and '\0' unless
> I'm missing something.

Doh, of course you're right. Will fix, thanks.

Richard

  reply	other threads:[~2020-05-13 14:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 20:42 [PATCH] mfd: Export LPC attributes for the system SPI chip Richard Hughes
2020-05-13  7:08 ` Mika Westerberg
2020-05-13  8:48   ` Richard Hughes
2020-05-13  9:11     ` Mika Westerberg
2020-05-13 14:13       ` Richard Hughes [this message]
2020-05-13 16:25         ` Mika Westerberg
2020-05-13 18:27           ` Richard Hughes
2020-05-14 12:15             ` Mika Westerberg
2020-05-14 12:53               ` Richard Hughes
2020-05-14 13:14                 ` Mika Westerberg

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='CAD2FfiGNErUhz=7DH6Z37X573hSkJkzbOEXbb++X+Ey5WLc9=Q@mail.gmail.com' \
    --to=hughsient@gmail.com \
    --cc=allison@lohutok.net \
    --cc=jethro@fortanix.com \
    --cc=kstewart@linuxfoundation.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=ptyser@xes-inc.com \
    --cc=tglx@linutronix.de \
    --cc=tudor.ambarus@microchip.com \
    /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.