ACPI / i915: Update the condition to ignore firmware backlight change request

Some of the Thinkpads' firmware will issue a backlight change request
through i915 operation region unconditionally on AC plug/unplug, the
backlight level used is arbitrary and thus should be ignored. This is
handled by commit 0b9f7d93ca61 (ACPI / i915: ignore firmware requests
for backlight change). Then there is a Dell laptop whose vendor backlight
interface also makes use of operation region to change backlight level
and with the above commit, that interface no long works. The condition
used to ignore the backlight change request from firmware is thus
changed to: if the vendor backlight interface is not in use and the ACPI
backlight interface is broken, we ignore the requests; oterwise, we keep
processing them.

Fixes: 0b9f7d93ca61 (ACPI / i915: ignore firmware requests for backlight change)
Link: https://lkml.org/lkml/2014/9/23/854
Reported-and-tested-by: Pali Rohár <pali.rohar@gmail.com>
Cc: 3.16+ <stable@vger.kernel.org> # 3.16+
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Acked-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Merge branch 'acpi-video'

* acpi-video:
  ACPI / i915: Update the condition to ignore firmware backlight change request
Merge branch 'acpi-video-next' into linux-next

* acpi-video-next:
  ACPI / video: force vendor backlight on Lenovo Ideapad Z570
  ACPI / video: Remove video_set_use_native_backlight quirk
Merge branch 'acpi-lpss' into linux-next

* acpi-lpss:
  ACPI / LPSS: not using UART RTS override with Auto Flow Control
  ACPI / LPSS: remove struct lpss_shared_clock
  ACPI / LPSS: support for 133MHz I2C source clock on Baytrail
  ACPI / LPSS: drop clkdev_name member from lpss_device_desc
  ACPI / LPSS: introduce flags
Merge branches 'acpi-pnp' and 'acpi-blacklist' into linux-next

* acpi-pnp:
  ACPI / PNP: remove Fujitsu device IDs from ACPI PNP ID list

* acpi-blacklist:
  ACPI / blacklist: add Win8 OSI quirks for some Dell laptop models
Merge branches 'acpi-processor', 'acpi-battery', 'acpi-utils' and 'acpi-fan' into linux-next

* acpi-processor:
  ACPI / processor: use container_of instead of casting first structure member

* acpi-battery:
  ACPI / battery: Replace strnicmp with strncasecmp

* acpi-utils:
  ACPI / utils: Update acpi_check_dsm() comments

* acpi-fan:
  ACPI / fan: printk replacement
Merge branch 'pm-avs' into linux-next

* pm-avs:
  MAINTAINERS: update entry for drivers/power/avs
  PM / AVS: rockchip-io: add driver handling Rockchip io domains
  regulator: core: Add REGULATOR_EVENT_PRE_VOLTAGE_CHANGE (and ABORT)
Merge branch 'pm-cpuidle' into linux-next

* pm-cpuidle:
  drivers: cpuidle: initialize big.LITTLE driver through DT
  drivers: cpuidle: CPU idle ARM64 driver
  drivers: cpuidle: implement DT based idle states infrastructure
  cpuidle: big.LITTLE: add Exynos5800 compatible string
  cpuidle: Replace strnicmp with strncasecmp
  arm64: add PSCI CPU_SUSPEND based cpu_suspend support
  arm64: kernel: introduce cpu_init_idle CPU operation
  arm64: kernel: refactor the CPU suspend API for retention states
  Documentation: arm: define DT idle states bindings
Merge branch 'pm-cpufreq-next' into linux-next

* pm-cpufreq-next:
  cpufreq: Replace strnicmp with strncasecmp
  cpufreq: powernv: Set the cpus to nominal frequency during reboot/kexec
  cpufreq: powernv: Set the pstate of the last hotplugged out cpu in policy->cpus to minimum
  cpufreq: Allow stop CPU callback to be used by all cpufreq drivers
  cpufreq: cpu0: Make allocate_resources() work for any CPU
  cpufreq: cpu0: try regulators with name "cpu-supply"
  cpufreq: cpu0: Move per-cluster initialization code to ->init()
  cpufreq: cpu0: use dev_{err|warn|dbg} instead of pr_{err|warn|debug}
  cpufreq: cpu0: print relevant error when we defer probe
  cpufreq: cpu0: don't validate clock on clk_put()
  cpufreq: cpu0: Update Module Author
  cpufreq: Add support for per-policy driver data
PM / Domains: Move dev_pm_domain_attach|detach() to pm_domain.h

The commit 46420dd73b80 (PM / Domains: Add APIs to attach/detach a PM
domain for a device) started using errno values in pm.h header file.
It also failed to include the header for these, thus it caused
compiler errors.

Instead of including the errno header to pm.h, let's move the functions
to pm_domain.h, since it's a better match.

Fixes: 46420dd73b80 (PM / Domains: Add APIs to attach/detach a PM domain for a device)
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Merge branch 'pm-domains' into linux-next

* pm-domains: (31 commits)
  PM / Domains: Move dev_pm_domain_attach|detach() to pm_domain.h
  PM / Domains: Remove legacy API for adding devices through DT
  PM / Domains: Add genpd attach/detach callbacks
  PM / Domains: add debugfs listing of struct generic_pm_domain-s
  ACPI / PM: Convert acpi_dev_pm_detach() into a static function
  ARM: exynos: Move to generic PM domain DT bindings
  amba: Add support for attach/detach of PM domains
  spi: core: Convert to dev_pm_domain_attach|detach()
  mmc: sdio: Convert to dev_pm_domain_attach|detach()
  i2c: core: Convert to dev_pm_domain_attach|detach()
  drivercore / platform: Convert to dev_pm_domain_attach|detach()
  PM / Domains: Add APIs to attach/detach a PM domain for a device
  PM / Domains: Add generic OF-based PM domain look-up
  ACPI / PM: Assign the ->detach() callback when attaching the PM domain
  PM / Domains: Add a detach callback to the struct dev_pm_domain
  PM / domains: Spelling s/domian/domain/
  PM / domains: Keep declaration of dev_power_governors together
  PM / domains: Remove default_stop_ok() API
  drivers: sh: Leave disabling of unused PM domains to genpd
  ARM: s3c64xx: Leave disabling of unused PM domains to genpd
  ...