All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Marko <robert.marko@sartura.hr>
To: Lee Jones <lee.jones@linaro.org>
Cc: Michael Walle <michael@walle.cc>,
	robh+dt@kernel.org, Linus Walleij <linus.walleij@linaro.org>,
	bgolaszewski@baylibre.com, jdelvare@suse.com,
	Guenter Roeck <linux@roeck-us.net>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-gpio@vger.kernel.org, linux-hwmon@vger.kernel.org,
	Luka Perkov <luka.perkov@sartura.hr>,
	jmp@epiphyte.org, Paul Menzel <pmenzel@molgen.mpg.de>,
	Donald Buczek <buczek@molgen.mpg.de>
Subject: Re: [PATCH 1/6] mfd: Add Delta TN48M CPLD driver
Date: Fri, 21 May 2021 11:06:44 +0200	[thread overview]
Message-ID: <CA+HBbNH9BMbV9G_Emc4qfoKkdK3YYRmY16cNd_Hu5h1Ch0wctw@mail.gmail.com> (raw)
In-Reply-To: <20210521090357.GD2549456@dell>

On Fri, May 21, 2021 at 11:04 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> On Fri, 21 May 2021, Robert Marko wrote:
>
> > On Thu, May 20, 2021 at 8:49 AM Lee Jones <lee.jones@linaro.org> wrote:
> > >
> > > On Wed, 19 May 2021, Michael Walle wrote:
> > >
> > > > Hi,
> > > >
> > > > Am 2021-05-19 13:53, schrieb Robert Marko:
> > > > > On Thu, May 6, 2021 at 6:34 PM Michael Walle <michael@walle.cc> wrote:
> > > > > > Am 2021-04-30 14:35, schrieb Robert Marko:
> > > > > > > Delta TN48M switches have a Lattice CPLD that serves
> > > > > > > multiple purposes including being a GPIO expander.
> > > > > > > So lets add the MFD core driver for it.
> > > > > >
> > > > > > Did you have a look at mfd/simple-mfd-i2c.c?
> > > > >
> > > > > Yes, that was my first idea but we have a requirement to expose CPLD
> > > > > information via debugfs as there are userspace applications using it.
> > > > > And simple-mfd-i2c does not allow us to do so.
> > > >
> > > > Mh, last time Lee wasn't very fond of having a driver that just populates
> > > > sub-drivers while doing almost nothing itself. See
> > > > https://lore.kernel.org/lkml/20200605065709.GD3714@dell/
> > >
> > > Right.  I still feel that way.
> > >
> > > > That being said, I'd also like to expose our CPLD version, but until now
> > > > haven't found a good solution.
> > >
> > > Why though?  Does S/W *need* it?
> > Because we have userspace S/W that uses it as the same CPLD is in
> > multiple variants of the board but the correct board model is set during
> > manufacturing and we can read it from the CPLD.
> >
> > We also have information about PSU1 and PSU2(Some models only)
> > power good, whether they are present and some other info that I need
> > to expose as these are monitored in userspace.
> >
> > I planned to do that via the hwmon driver but according to Guenther they
> > are not hwmon attributes and I agree.
> >
> > Would it be possible to have a dedicated driver that would only expose
> > the required information via debugfs?
> > Then I could simply use the simple I2C MFD driver with only a GPIO
> > driver on top of it.
>
> Yes, I was going to suggest that.
>
> It should probably live in drivers/misc.

OK, that works for me.
I will then rework this for v2.

Regards,
Robert
>
> --
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog



-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@sartura.hr
Web: www.sartura.hr

  reply	other threads:[~2021-05-21  9:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-30 12:35 [PATCH 1/6] mfd: Add Delta TN48M CPLD driver Robert Marko
2021-04-30 12:35 ` [PATCH 2/6] dt-bindings: gpio: Add Delta TN48M CPLD GPIO bindings Robert Marko
2021-05-06 13:57   ` Rob Herring
2021-04-30 12:35 ` [PATCH 3/6] gpio: Add Delta TN48M CPLD GPIO driver Robert Marko
2021-05-06 14:00   ` Rob Herring
2021-05-06 16:40     ` Michael Walle
2021-05-06 17:21       ` Luka Perkov
2021-05-21 13:22       ` Robert Marko
2021-05-06 16:38   ` Michael Walle
2021-05-21 13:21     ` Robert Marko
2021-04-30 12:35 ` [PATCH 4/6] hwmon: Add Delta TN48M CPLD HWMON driver Robert Marko
2021-04-30 13:12   ` Guenter Roeck
2021-05-19 12:01     ` Robert Marko
2021-05-19 13:40       ` Guenter Roeck
2021-04-30 12:35 ` [PATCH 5/6] dt-bindings: mfd: Add Delta TN48M CPLD drivers bindings Robert Marko
2021-05-06 14:01   ` Rob Herring
2021-04-30 12:35 ` [PATCH 6/6] MAINTAINERS: Add Delta Networks TN48M CPLD drivers Robert Marko
2021-05-06 16:34 ` [PATCH 1/6] mfd: Add Delta TN48M CPLD driver Michael Walle
2021-05-19 11:53   ` Robert Marko
2021-05-19 19:42     ` Michael Walle
2021-05-20  6:49       ` Lee Jones
2021-05-21  8:19         ` Robert Marko
2021-05-21  9:03           ` Lee Jones
2021-05-21  9:06             ` Robert Marko [this message]
2021-05-06 16:50 ` kernel test robot
2021-05-06 16:50   ` kernel test robot
2021-05-19 11:11 ` Lee Jones

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=CA+HBbNH9BMbV9G_Emc4qfoKkdK3YYRmY16cNd_Hu5h1Ch0wctw@mail.gmail.com \
    --to=robert.marko@sartura.hr \
    --cc=bgolaszewski@baylibre.com \
    --cc=buczek@molgen.mpg.de \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=jmp@epiphyte.org \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=luka.perkov@sartura.hr \
    --cc=michael@walle.cc \
    --cc=pmenzel@molgen.mpg.de \
    --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 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.