platform-drivers-x86 for v6.4-5
One small fix for an AMD PMF driver issue which is causing issues for users of just released AMD laptop models. The following is an automated git shortlog grouped by driver: platform/x86/amd/pmf: - Register notify handler only if SPS is enabled -----BEGIN PGP SIGNATURE----- iQFIBAABCAAyFiEEuvA7XScYQRpenhd+kuxHeUQDJ9wFAmSUBO4UHGhkZWdvZWRl QHJlZGhhdC5jb20ACgkQkuxHeUQDJ9zrPQf/UcGcMeCEW4vDzi9barGbAzFM3MXQ R5kugjRPqZ8y1U/0iDF83FPHRb/OhRCDrUWWoeN6BXLLCxnYTqVDtkkWJ7At45eK 928qm1+Guntr7qnNDmIgIaksEFKOXAp/PVDiOc/qX6DNznNgJ+6SVopoQz3UL/wp 4nkeLS7w/45SYP7nuGpBJhjtP6alZfGcJpMQ1bFm8GHxjA6NdzdYa6OTVxIqbvEc 4F3g5UTKfaVlYGcgnsMLgUnodlqNgBqtbaje2i5XbKV75EC6O7aP9Lz218Bh2xer F9xFV5YgebU3vfk53PcqFY3w7NFmQDGbQpgV4Qa9CF1aU+zcSw2evVS3ug== =n22g -----END PGP SIGNATURE----- Merge tag 'platform-drivers-x86-v6.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fix from Hans de Goede: "One small fix for an AMD PMF driver issue which is causing issues for users of just released AMD laptop models" * tag 'platform-drivers-x86-v6.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86/amd/pmf: Register notify handler only if SPS is enabled
This commit is contained in:
commit
65d48989f8
@ -297,6 +297,8 @@ static void amd_pmf_init_features(struct amd_pmf_dev *dev)
|
||||
/* Enable Static Slider */
|
||||
if (is_apmf_func_supported(dev, APMF_FUNC_STATIC_SLIDER_GRANULAR)) {
|
||||
amd_pmf_init_sps(dev);
|
||||
dev->pwr_src_notifier.notifier_call = amd_pmf_pwr_src_notify_call;
|
||||
power_supply_reg_notifier(&dev->pwr_src_notifier);
|
||||
dev_dbg(dev->dev, "SPS enabled and Platform Profiles registered\n");
|
||||
}
|
||||
|
||||
@ -315,8 +317,10 @@ static void amd_pmf_init_features(struct amd_pmf_dev *dev)
|
||||
|
||||
static void amd_pmf_deinit_features(struct amd_pmf_dev *dev)
|
||||
{
|
||||
if (is_apmf_func_supported(dev, APMF_FUNC_STATIC_SLIDER_GRANULAR))
|
||||
if (is_apmf_func_supported(dev, APMF_FUNC_STATIC_SLIDER_GRANULAR)) {
|
||||
power_supply_unreg_notifier(&dev->pwr_src_notifier);
|
||||
amd_pmf_deinit_sps(dev);
|
||||
}
|
||||
|
||||
if (is_apmf_func_supported(dev, APMF_FUNC_AUTO_MODE)) {
|
||||
amd_pmf_deinit_auto_mode(dev);
|
||||
@ -399,9 +403,6 @@ static int amd_pmf_probe(struct platform_device *pdev)
|
||||
apmf_install_handler(dev);
|
||||
amd_pmf_dbgfs_register(dev);
|
||||
|
||||
dev->pwr_src_notifier.notifier_call = amd_pmf_pwr_src_notify_call;
|
||||
power_supply_reg_notifier(&dev->pwr_src_notifier);
|
||||
|
||||
dev_info(dev->dev, "registered PMF device successfully\n");
|
||||
|
||||
return 0;
|
||||
@ -411,7 +412,6 @@ static void amd_pmf_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct amd_pmf_dev *dev = platform_get_drvdata(pdev);
|
||||
|
||||
power_supply_unreg_notifier(&dev->pwr_src_notifier);
|
||||
amd_pmf_deinit_features(dev);
|
||||
apmf_acpi_deinit(dev);
|
||||
amd_pmf_dbgfs_unregister(dev);
|
||||
|
Loading…
x
Reference in New Issue
Block a user