From: <Mario.Limonciello@dell.com>
To: <acelan.kao@canonical.com>
Cc: <dvhart@infradead.org>, <andy@infradead.org>,
<linux-kernel@vger.kernel.org>,
<platform-driver-x86@vger.kernel.org>
Subject: RE: [PATCH] platform/x86: dell-uart-backlight: new backlight driver for DELL AIO
Date: Fri, 27 Oct 2017 15:52:48 +0000 [thread overview]
Message-ID: <377b9a237f6448bba0f5a0b83c77d7bd@ausx13mpc124.AMER.DELL.COM> (raw)
In-Reply-To: <CAMz9Wg-gMCsZGhfy7tmo4H-BYA7FnwA0mi+1VkBaQ7A4aC-TmA@mail.gmail.com>
> >
> > Looking at the comment for serial8250_get_port, it sounds like the serial driver
> > doesn't really want other drivers using this function outside of suspend/resume
> callback.
> >
> > /**
> > * serial8250_get_port - retrieve struct uart_8250_port
> > * @line: serial line number
> > *
> > * This function retrieves struct uart_8250_port for the specific line.
> > * This struct *must* *not* be used to perform a 8250 or serial core operation
> > * which is not accessible otherwise. Its only purpose is to make the struct
> > * accessible to the runtime-pm callbacks for context suspend/restore.
> > * The lock assumption made here is none because runtime-pm suspend/resume
> > * callbacks should not be invoked if there is any operation performed on the
> > * port.
> > */
> > http://elixir.free-
> electrons.com/linux/v4.13/source/drivers/tty/serial/8250/8250_core.c#L409
> >
> > If serial core doesn't provide an API, have you already discussed with serial
> maintainer
> > to review your approach? It might make sense to work with serial maintainer to
> provide
> > an API for this type of usecase if it doesn't exist.
> Yes, I know the pointer returned from serial8250_get_port() becomes
> unavailable after S3.
> So, I provide a suspend/resume function try to workaround it.
> But just like the comment described, it's risky to perform serial
> operations by using the structure,
> and there is a new interface to deal with this kind of requirement, serdev.
> But serdev is introduced after v4.12, to make it work before serdev, I
> can't find other good solutions for it.
Right, I know you have a need for this to work on older kernel too, so I think
this interface as you did it makes sense on older kernel, but please do use serdev
on newer kernel and as this is upstreamed.
>
> >> + /* unregister acpi backlight interface */
> >> + acpi_video_set_dmi_backlight_type(acpi_backlight_vendor);
> >
> > Since you change this when the driver is loaded, you should cache the old
> > value and restore it when the driver is unloaded too.
>
> In this case, acpi backlight doesn't work, all the backlight
> operations would go through UART commands.
> So, it safe to remove it.
OK.
I think it would be good to include a command about this so that folks who
look at this later understand this.
Thanks,
next prev parent reply other threads:[~2017-10-27 15:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-26 7:53 AceLan Kao
2017-10-26 15:54 ` Mario.Limonciello
2017-10-26 16:10 ` Alan Cox
2017-10-27 2:21 ` AceLan Kao
2017-10-27 2:15 ` AceLan Kao
2017-10-27 15:52 ` Mario.Limonciello [this message]
2017-10-27 20:23 ` Andy Shevchenko
2017-10-27 10:24 ` Daniel Thompson
2017-10-27 20:26 ` Andy Shevchenko
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=377b9a237f6448bba0f5a0b83c77d7bd@ausx13mpc124.AMER.DELL.COM \
--to=mario.limonciello@dell.com \
--cc=acelan.kao@canonical.com \
--cc=andy@infradead.org \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.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
all inboxes | Powered by JetHome®