All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	Kent Gibson <warthog618@gmail.com>,
	"brgl@bgdev.pl" <brgl@bgdev.pl>,
	"johan@kernel.org" <johan@kernel.org>,
	"maz@kernel.org" <maz@kernel.org>,
	Ben Brown <Ben.Brown@alliedtelesis.co.nz>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Sebastian Reichel <sre@kernel.org>, Andrew Lunn <andrew@lunn.ch>
Subject: Re: [PATCH] gpiolib: Avoid side effects in gpio_is_visible()
Date: Mon, 29 May 2023 11:19:02 +0200	[thread overview]
Message-ID: <CACRpkdYGD5z4rrFsBGm8ihHEvWBep6sgqXPXSn2Q38jGod58GA@mail.gmail.com> (raw)
In-Reply-To: <604467c7-c5d6-38b1-be98-42c7da031416@alliedtelesis.co.nz>

On Wed, May 17, 2023 at 11:30 PM Chris Packham
<Chris.Packham@alliedtelesis.co.nz> wrote:

> > Why does the MCU have no in-kernel driver?
>
> There isn't any PoE PSE infrastructure in the kernel. I'm not really
> sure what it'd look like either as the hardware designs are all highly
> customized and often have very specialized requirements. Even the vendor
> reference boards tend to use the i2c userspace interface and punt
> everything to a specialist application.
>
> Of course if anyone is thinking about adding PoE PSE support in-kernel
> I'd be very keen to be involved.
(...)
> > I'm a bit lost. What your app is doing and how that is related to the
> > (userspace) drivers?
>
> Probably one of the primary things it's doing is bringing the chip out
> of reset by driving the GPIO (we don't want the PoE PSE supplying power
> if nothing is monitoring the temperature of the system). There's also
> some corner cases involving not resetting the PoE chipset on a hot restart.

This sounds like solid 100% kernelspace territory, and while I do see
that it can be a bit intimidating to extend the existing frameworks, there
are some really helpful people in the netdev community.

For example Andrew Lunn and Sebastian Reichel working on netdev and
the power supply subsystems can most certainly figure out where this
thing goes and what is already available.

There is: drivers/pwm/pwm-raspberrypi-poe.c
referring to this hardware:
https://www.raspberrypi.com/products/poe-hat/
which is a bit odd: I think this PWM controls the fan on the PoE
board only, so it is probably not a good example.

Yours,
Linus Walleij

  parent reply	other threads:[~2023-05-29  9:19 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-12  4:28 [PATCH] gpiolib: Avoid side effects in gpio_is_visible() Chris Packham
2023-05-12  7:24 ` Johan Hovold
2023-05-14 21:57   ` Chris Packham
2023-05-15  6:43     ` andy.shevchenko
2023-05-15 21:01       ` Chris Packham
2023-05-12  7:56 ` Linus Walleij
2023-05-14 22:27   ` Chris Packham
2023-05-16 13:57     ` Linus Walleij
2023-05-16 22:19       ` Chris Packham
2023-05-16 22:47         ` Kent Gibson
2023-05-16 23:50           ` Chris Packham
2023-05-17  0:47             ` Kent Gibson
2023-05-17  1:05               ` Kent Gibson
2023-05-17  1:07               ` Chris Packham
2023-05-17  1:21                 ` Kent Gibson
2023-05-17  8:54             ` Andy Shevchenko
2023-05-17  9:10               ` Kent Gibson
2023-05-17 21:30               ` Chris Packham
2023-05-23 16:38                 ` andy.shevchenko
2023-05-23 21:17                   ` Chris Packham
2023-05-24  5:41                     ` Kent Gibson
2023-05-24 23:53                       ` using libgpiod to replace sysfs ABI (was Re: [PATCH] gpiolib: Avoid side effects in gpio_is_visible()) Chris Packham
2023-05-25  1:19                         ` Kent Gibson
2023-05-25  9:13                         ` Andy Shevchenko
2023-05-25 14:35                           ` Bartosz Golaszewski
2023-05-26 12:46                       ` [PATCH] gpiolib: Avoid side effects in gpio_is_visible() Bartosz Golaszewski
2023-05-28 21:04                         ` Chris Packham
2023-05-29  9:19                 ` Linus Walleij [this message]
2023-05-29 15:07                   ` Andrew Lunn
2023-05-29  9:07         ` Linus Walleij
2023-05-29 22:00           ` Chris Packham

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=CACRpkdYGD5z4rrFsBGm8ihHEvWBep6sgqXPXSn2Q38jGod58GA@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=Ben.Brown@alliedtelesis.co.nz \
    --cc=Chris.Packham@alliedtelesis.co.nz \
    --cc=andrew@lunn.ch \
    --cc=andy.shevchenko@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=johan@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=sre@kernel.org \
    --cc=warthog618@gmail.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.