X86 platform drivers
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Michał Kępień" <kernel@kempniu.pl>
Cc: Darren Hart <dvhart@infradead.org>,
	Jonathan Woithe <jwoithe@just42.net>,
	Andy Shevchenko <andy@infradead.org>,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] platform/x86: fujitsu-laptop: Don't oops when FUJ02E3 is not presnt
Date: Fri, 20 Oct 2017 20:29:43 +0300	[thread overview]
Message-ID: <20171020172943.GQ10981@intel.com> (raw)
In-Reply-To: <20171018151058.GL10981@intel.com>

On Wed, Oct 18, 2017 at 06:10:58PM +0300, Ville Syrjälä wrote:
> On Tue, Sep 26, 2017 at 06:49:08AM +0200, Michał Kępień wrote:
> > > > call call_fext_func() with a NULL device. Let's just skip those
> > > > function calls when the FUJ02E3 device is not present.
> > > > 
> > > 
> > > Interesting. We call call_fext_func from many locations using the
> > > "device" argument, or the driver static "fext".
> > > 
> > > This looks to me that we should be a bit more consistent here.
> > 
> > This is intentional.  The plan was to extract the backlight part of
> > fujitsu-laptop into a separate module, fujitsu-backlight, which would
> > use a simple two-function API exposed by fujitsu-laptop to control LCD
> > backlight power.  Those functions would have to somehow access the
> > FUJ02E3 ACPI device while not being ACPI callbacks.  Thus, fext is
> > storing a pointer to the last (and most likely only) instantiated
> > FUJ02E3 ACPI device so that it can be used for setting LCD backlight
> > power from fujitsu-backlight.  See commit ca0d9eab0fb5 for a brief
> > discussion of why this solution was chosen.
> > 
> > > Finally, it seems a proper fix would be to either not register the
> > > backlight device if !fext or to check for !fext inside call_fext_func.
> > 
> > My draft patch series which splits off fujitsu-backlight includes the
> > NULL check for fext inside the functions exposed by fujitsu-laptop.
> > Sadly, I have not got round to submitting it yet.
> > 
> > Just to make sure we are all on the same page here, please note that
> > access to FUJ02E3 is only needed for controlling LCD backlight _power_,
> > not LCD backlight _brightness_.
> > 
> > Speaking of which, I just noticed that my S7020 can control its LCD
> > brightness just fine without fujitsu-laptop being loaded.  Heck, it even
> > works when booted with "noacpi".  It seems to me that on this model, LCD
> > brightness control works at the firmware level and an ACPI-based driver
> > is just another possible way of getting/setting LCD brightness level.
> > Jonathan, IIRC you have an S7020 as well, could you please test that?
> > You know better than me why this driver was needed in the first place.
> > 
> > Ville, could you please test your S6120 for the above as well?  Please
> > try unloading/blacklisting fujitsu-laptop and see whether LCD backlight
> > control still works.
> 
> My recollection is that the Fn+brightness works even without the
> driver. But I'll try to retest that tonight since I'm not 100% sure.

Indeed that is the case.

> 
> > 
> > Finally, it seems the S6120 also has a row of "application panel"
> > hotkeys above the keyboard, but lacks the FUJ02E3 ACPI device, so I am
> > wondering whether these hotkeys work in Linux.  Ville, do they?
> 
> They work via the apanel driver. Well, there's buttons 1-4 and Enter.
> Buttons 1-4 work but the Enter doesn't, but that could be just an
> oversight in the apanel driver. That's at least how the S6010 works.
> I'll have to retest the S6120 to make sure it behaves the same way.
> At least it has the same set of buttons on it.

Looks like S6120 works the same way, via the apanel driver.

-- 
Ville Syrjälä
Intel OTC

  parent reply	other threads:[~2017-10-20 17:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-18 20:00 [PATCH] platform/x86: fujitsu-laptop: Don't oops when FUJ02E3 is not presnt Ville Syrjala
2017-09-19  4:06 ` Michał Kępień
2017-09-19  4:21   ` Jonathan Woithe
2017-09-19  4:42     ` Michał Kępień
2017-09-19  8:20       ` Jonathan Woithe
2017-09-19 13:25   ` Ville Syrjälä
2018-02-10 21:33   ` Michał Kępień
2017-09-23  0:00 ` Darren Hart
2017-09-23  2:03   ` Jonathan Woithe
2017-09-23  9:08   ` Jonathan Woithe
2017-09-25 12:14     ` Ville Syrjälä
2017-09-25 13:16       ` Jonathan Woithe
2017-09-26  4:49   ` Michał Kępień
2017-09-26  5:32     ` Jonathan Woithe
     [not found]     ` <20171018151058.GL10981@intel.com>
2017-10-20 17:29       ` Ville Syrjälä [this message]
2017-10-25  4:51       ` Michał Kępień
2017-10-25 10:05         ` Ville Syrjälä
2017-10-29 22:57         ` Jonathan Woithe
2018-02-11 21:33           ` Michał Kępień
2017-09-27  6:56 ` Darren Hart
2017-09-27  7:27   ` Jonathan Woithe

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=20171020172943.GQ10981@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=andy@infradead.org \
    --cc=dvhart@infradead.org \
    --cc=jwoithe@just42.net \
    --cc=kernel@kempniu.pl \
    --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