linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joel Stanley <joel@jms.id.au>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Eddie James <eajames@linux.ibm.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-hwmon@vger.kernel.org, linux-fsi@lists.ozlabs.org,
	devicetree <devicetree@vger.kernel.org>,
	Jean Delvare <jdelvare@suse.com>,
	Alistair Popple <alistair@popple.id.au>,
	Jeremy Kerr <jk@ozlabs.org>, Rob Herring <robh+dt@kernel.org>
Subject: Re: [PATCH 2/3] fsi: occ: Add support for P10
Date: Mon, 20 Jul 2020 04:47:04 +0000	[thread overview]
Message-ID: <CACPK8XdzUcb922brKkD8iDPvr4CGdDZXhUPM=mtuHSMc2j0sog@mail.gmail.com> (raw)
In-Reply-To: <20200719221302.GA78557@roeck-us.net>

On Sun, 19 Jul 2020 at 22:13, Guenter Roeck <linux@roeck-us.net> wrote:
>
> On Fri, May 01, 2020 at 10:08:32AM -0500, Eddie James wrote:
> > The P10 OCC has a different SRAM address for the command and response
> > buffers. In addition, the SBE commands to access the SRAM have changed
> > format. Add versioning to the driver to handle these differences.
> >
> > Signed-off-by: Eddie James <eajames@linux.ibm.com>
>
> I don't recall seeing a maintainer Ack for this patch, nor any response
> at all. I'd be happy to apply the patch through hwmon, but I would need
> an Ack from a maintainer.

That would be great. I had one question before it goes in, but once
Eddie has sorted that out it can go through your tree.

>
> Thanks,
> Guenter
>
> > ---
> >  drivers/fsi/fsi-occ.c | 126 ++++++++++++++++++++++++++++++------------
> >  1 file changed, 92 insertions(+), 34 deletions(-)

> > @@ -508,6 +557,7 @@ static int occ_probe(struct platform_device *pdev)
> >       struct occ *occ;
> >       struct platform_device *hwmon_dev;
> >       struct device *dev = &pdev->dev;
> > +     const void *md =  of_device_get_match_data(dev);
> >       struct platform_device_info hwmon_dev_info = {
> >               .parent = dev,
> >               .name = "occ-hwmon",
> > @@ -517,6 +567,7 @@ static int occ_probe(struct platform_device *pdev)
> >       if (!occ)
> >               return -ENOMEM;
> >
> > +     occ->version = (enum versions)md;

The 0day bot warns about this when bulding for 64 bit architectures.

How about you drop the match data and instead match on the compatible
string to know which version to expect?

> >       occ->dev = dev;
> >       occ->sbefifo = dev->parent;
> >       mutex_init(&occ->occ_lock);
> > @@ -575,7 +626,14 @@ static int occ_remove(struct platform_device *pdev)
> >  }
> >
> >  static const struct of_device_id occ_match[] = {
> > -     { .compatible = "ibm,p9-occ" },
> > +     {
> > +             .compatible = "ibm,p9-occ",
> > +             .data = (void *)occ_p9
> > +     },
> > +     {
> > +             .compatible = "ibm,p10-occ",
> > +             .data = (void *)occ_p10
> > +     },
> >       { },
> >  };
> >

  reply	other threads:[~2020-07-20  4:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01 15:08 [PATCH 0/3] occ: Add support for P10 Eddie James
2020-05-01 15:08 ` [PATCH 1/3] dt-bindings: fsi: Add P10 OCC device documentation Eddie James
2020-05-12 20:57   ` Rob Herring
2020-05-01 15:08 ` [PATCH 2/3] fsi: occ: Add support for P10 Eddie James
2020-07-19 22:13   ` Guenter Roeck
2020-07-20  4:47     ` Joel Stanley [this message]
2020-07-20 14:36       ` Guenter Roeck
2020-05-01 15:08 ` [PATCH 3/3] hwmon: (occ) Add new temperature sensor type Eddie James
2020-05-06 15:57   ` Guenter Roeck
2020-05-06 15:58     ` Eddie James

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='CACPK8XdzUcb922brKkD8iDPvr4CGdDZXhUPM=mtuHSMc2j0sog@mail.gmail.com' \
    --to=joel@jms.id.au \
    --cc=alistair@popple.id.au \
    --cc=devicetree@vger.kernel.org \
    --cc=eajames@linux.ibm.com \
    --cc=jdelvare@suse.com \
    --cc=jk@ozlabs.org \
    --cc=linux-fsi@lists.ozlabs.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh+dt@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).