From: kernel test robot <lkp@intel.com>
To: Jarrett Schultz <jaschultzms@gmail.com>,
Rob Herring <robh+dt@kernel.org>, Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Hans de Goede <hdegoede@redhat.com>,
Mark Gross <mgross@linux.intel.com>,
Maximilian Luz <luzmaximilian@gmail.com>
Cc: kbuild-all@lists.01.org, linux-arm-msm@vger.kernel.org,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 2/5] platform: surface: Propagate ACPI Dependency
Date: Fri, 12 Nov 2021 03:45:27 +0800 [thread overview]
Message-ID: <202111120313.DH7CeeQL-lkp@intel.com> (raw)
In-Reply-To: <20211108164449.3036210-3-jaschultz@microsoft.com>
[-- Attachment #1: Type: text/plain, Size: 12615 bytes --]
Hi Jarrett,
I love your patch! Yet something to improve:
[auto build test ERROR on robh/for-next]
[also build test ERROR on platform-drivers-x86/for-next linus/master v5.15 next-20211111]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Jarrett-Schultz/platform-surface-Introduce-Surface-XBL-Driver/20211109-004605
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/6cc91cd949ff1d32a3f6b323d055b1925627be02
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jarrett-Schultz/platform-surface-Introduce-Surface-XBL-Driver/20211109-004605
git checkout 6cc91cd949ff1d32a3f6b323d055b1925627be02
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/platform/surface/aggregator/core.c: In function 'ssam_serial_hub_probe':
>> drivers/platform/surface/aggregator/core.c:648:49: error: invalid use of undefined type 'struct acpi_device'
648 | astatus = ssam_serdev_setup_via_acpi(ssh->handle, serdev);
| ^~
>> drivers/platform/surface/aggregator/core.c:702:9: error: implicit declaration of function 'acpi_dev_clear_dependencies' [-Werror=implicit-function-declaration]
702 | acpi_dev_clear_dependencies(ssh);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/perf_event.h:25,
from include/linux/trace_events.h:10,
from include/trace/trace_events.h:21,
from include/trace/define_trace.h:102,
from drivers/platform/surface/aggregator/trace.h:632,
from drivers/platform/surface/aggregator/core.c:30:
At top level:
arch/arc/include/asm/perf_event.h:126:27: error: 'arc_pmu_cache_map' defined but not used [-Werror=unused-const-variable=]
126 | static const unsigned int arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
| ^~~~~~~~~~~~~~~~~
arch/arc/include/asm/perf_event.h:91:27: error: 'arc_pmu_ev_hw_map' defined but not used [-Werror=unused-const-variable=]
91 | static const char * const arc_pmu_ev_hw_map[] = {
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
drivers/platform/surface/aggregator/controller.c: In function 'ssam_dsm_get_functions':
>> drivers/platform/surface/aggregator/controller.c:1044:14: error: implicit declaration of function 'acpi_has_method'; did you mean 'acpi_has_watchdog'? [-Werror=implicit-function-declaration]
1044 | if (!acpi_has_method(handle, "_DSM"))
| ^~~~~~~~~~~~~~~
| acpi_has_watchdog
>> drivers/platform/surface/aggregator/controller.c:1047:15: error: implicit declaration of function 'acpi_evaluate_dsm_typed'; did you mean 'acpi_evaluate_dsm'? [-Werror=implicit-function-declaration]
1047 | obj = acpi_evaluate_dsm_typed(handle, &SSAM_SSH_DSM_GUID,
| ^~~~~~~~~~~~~~~~~~~~~~~
| acpi_evaluate_dsm
>> drivers/platform/surface/aggregator/controller.c:1047:13: error: assignment to 'union acpi_object *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
1047 | obj = acpi_evaluate_dsm_typed(handle, &SSAM_SSH_DSM_GUID,
| ^
drivers/platform/surface/aggregator/controller.c: In function 'ssam_dsm_load_u32':
drivers/platform/surface/aggregator/controller.c:1071:13: error: assignment to 'union acpi_object *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
1071 | obj = acpi_evaluate_dsm_typed(handle, &SSAM_SSH_DSM_GUID,
| ^
cc1: all warnings being treated as errors
vim +648 drivers/platform/surface/aggregator/core.c
c167b9c7e3d613 Maximilian Luz 2020-12-21 614
c167b9c7e3d613 Maximilian Luz 2020-12-21 615 static int ssam_serial_hub_probe(struct serdev_device *serdev)
c167b9c7e3d613 Maximilian Luz 2020-12-21 616 {
a9e10e58730432 Daniel Scally 2021-06-03 617 struct acpi_device *ssh = ACPI_COMPANION(&serdev->dev);
c167b9c7e3d613 Maximilian Luz 2020-12-21 618 struct ssam_controller *ctrl;
c167b9c7e3d613 Maximilian Luz 2020-12-21 619 acpi_status astatus;
c167b9c7e3d613 Maximilian Luz 2020-12-21 620 int status;
c167b9c7e3d613 Maximilian Luz 2020-12-21 621
c167b9c7e3d613 Maximilian Luz 2020-12-21 622 if (gpiod_count(&serdev->dev, NULL) < 0)
c167b9c7e3d613 Maximilian Luz 2020-12-21 623 return -ENODEV;
c167b9c7e3d613 Maximilian Luz 2020-12-21 624
c167b9c7e3d613 Maximilian Luz 2020-12-21 625 status = devm_acpi_dev_add_driver_gpios(&serdev->dev, ssam_acpi_gpios);
c167b9c7e3d613 Maximilian Luz 2020-12-21 626 if (status)
c167b9c7e3d613 Maximilian Luz 2020-12-21 627 return status;
c167b9c7e3d613 Maximilian Luz 2020-12-21 628
c167b9c7e3d613 Maximilian Luz 2020-12-21 629 /* Allocate controller. */
c167b9c7e3d613 Maximilian Luz 2020-12-21 630 ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
c167b9c7e3d613 Maximilian Luz 2020-12-21 631 if (!ctrl)
c167b9c7e3d613 Maximilian Luz 2020-12-21 632 return -ENOMEM;
c167b9c7e3d613 Maximilian Luz 2020-12-21 633
c167b9c7e3d613 Maximilian Luz 2020-12-21 634 /* Initialize controller. */
c167b9c7e3d613 Maximilian Luz 2020-12-21 635 status = ssam_controller_init(ctrl, serdev);
c167b9c7e3d613 Maximilian Luz 2020-12-21 636 if (status)
c167b9c7e3d613 Maximilian Luz 2020-12-21 637 goto err_ctrl_init;
c167b9c7e3d613 Maximilian Luz 2020-12-21 638
c167b9c7e3d613 Maximilian Luz 2020-12-21 639 ssam_controller_lock(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 640
c167b9c7e3d613 Maximilian Luz 2020-12-21 641 /* Set up serdev device. */
c167b9c7e3d613 Maximilian Luz 2020-12-21 642 serdev_device_set_drvdata(serdev, ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 643 serdev_device_set_client_ops(serdev, &ssam_serdev_ops);
c167b9c7e3d613 Maximilian Luz 2020-12-21 644 status = serdev_device_open(serdev);
c167b9c7e3d613 Maximilian Luz 2020-12-21 645 if (status)
c167b9c7e3d613 Maximilian Luz 2020-12-21 646 goto err_devopen;
c167b9c7e3d613 Maximilian Luz 2020-12-21 647
a9e10e58730432 Daniel Scally 2021-06-03 @648 astatus = ssam_serdev_setup_via_acpi(ssh->handle, serdev);
c167b9c7e3d613 Maximilian Luz 2020-12-21 649 if (ACPI_FAILURE(astatus)) {
c167b9c7e3d613 Maximilian Luz 2020-12-21 650 status = -ENXIO;
c167b9c7e3d613 Maximilian Luz 2020-12-21 651 goto err_devinit;
c167b9c7e3d613 Maximilian Luz 2020-12-21 652 }
c167b9c7e3d613 Maximilian Luz 2020-12-21 653
c167b9c7e3d613 Maximilian Luz 2020-12-21 654 /* Start controller. */
c167b9c7e3d613 Maximilian Luz 2020-12-21 655 status = ssam_controller_start(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 656 if (status)
c167b9c7e3d613 Maximilian Luz 2020-12-21 657 goto err_devinit;
c167b9c7e3d613 Maximilian Luz 2020-12-21 658
c167b9c7e3d613 Maximilian Luz 2020-12-21 659 ssam_controller_unlock(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 660
c167b9c7e3d613 Maximilian Luz 2020-12-21 661 /*
c167b9c7e3d613 Maximilian Luz 2020-12-21 662 * Initial SAM requests: Log version and notify default/init power
c167b9c7e3d613 Maximilian Luz 2020-12-21 663 * states.
c167b9c7e3d613 Maximilian Luz 2020-12-21 664 */
c167b9c7e3d613 Maximilian Luz 2020-12-21 665 status = ssam_log_firmware_version(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 666 if (status)
c167b9c7e3d613 Maximilian Luz 2020-12-21 667 goto err_initrq;
c167b9c7e3d613 Maximilian Luz 2020-12-21 668
c167b9c7e3d613 Maximilian Luz 2020-12-21 669 status = ssam_ctrl_notif_d0_entry(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 670 if (status)
c167b9c7e3d613 Maximilian Luz 2020-12-21 671 goto err_initrq;
c167b9c7e3d613 Maximilian Luz 2020-12-21 672
c167b9c7e3d613 Maximilian Luz 2020-12-21 673 status = ssam_ctrl_notif_display_on(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 674 if (status)
c167b9c7e3d613 Maximilian Luz 2020-12-21 675 goto err_initrq;
c167b9c7e3d613 Maximilian Luz 2020-12-21 676
c167b9c7e3d613 Maximilian Luz 2020-12-21 677 status = sysfs_create_group(&serdev->dev.kobj, &ssam_sam_group);
c167b9c7e3d613 Maximilian Luz 2020-12-21 678 if (status)
c167b9c7e3d613 Maximilian Luz 2020-12-21 679 goto err_initrq;
c167b9c7e3d613 Maximilian Luz 2020-12-21 680
c167b9c7e3d613 Maximilian Luz 2020-12-21 681 /* Set up IRQ. */
c167b9c7e3d613 Maximilian Luz 2020-12-21 682 status = ssam_irq_setup(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 683 if (status)
c167b9c7e3d613 Maximilian Luz 2020-12-21 684 goto err_irq;
c167b9c7e3d613 Maximilian Luz 2020-12-21 685
c167b9c7e3d613 Maximilian Luz 2020-12-21 686 /* Finally, set main controller reference. */
c167b9c7e3d613 Maximilian Luz 2020-12-21 687 status = ssam_try_set_controller(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 688 if (WARN_ON(status)) /* Currently, we're the only provider. */
c167b9c7e3d613 Maximilian Luz 2020-12-21 689 goto err_mainref;
c167b9c7e3d613 Maximilian Luz 2020-12-21 690
c167b9c7e3d613 Maximilian Luz 2020-12-21 691 /*
c167b9c7e3d613 Maximilian Luz 2020-12-21 692 * TODO: The EC can wake up the system via the associated GPIO interrupt
c167b9c7e3d613 Maximilian Luz 2020-12-21 693 * in multiple situations. One of which is the remaining battery
c167b9c7e3d613 Maximilian Luz 2020-12-21 694 * capacity falling below a certain threshold. Normally, we should
c167b9c7e3d613 Maximilian Luz 2020-12-21 695 * use the device_init_wakeup function, however, the EC also seems
c167b9c7e3d613 Maximilian Luz 2020-12-21 696 * to have other reasons for waking up the system and it seems
c167b9c7e3d613 Maximilian Luz 2020-12-21 697 * that Windows has additional checks whether the system should be
c167b9c7e3d613 Maximilian Luz 2020-12-21 698 * resumed. In short, this causes some spurious unwanted wake-ups.
c167b9c7e3d613 Maximilian Luz 2020-12-21 699 * For now let's thus default power/wakeup to false.
c167b9c7e3d613 Maximilian Luz 2020-12-21 700 */
c167b9c7e3d613 Maximilian Luz 2020-12-21 701 device_set_wakeup_capable(&serdev->dev, true);
a9e10e58730432 Daniel Scally 2021-06-03 @702 acpi_dev_clear_dependencies(ssh);
c167b9c7e3d613 Maximilian Luz 2020-12-21 703
c167b9c7e3d613 Maximilian Luz 2020-12-21 704 return 0;
c167b9c7e3d613 Maximilian Luz 2020-12-21 705
c167b9c7e3d613 Maximilian Luz 2020-12-21 706 err_mainref:
c167b9c7e3d613 Maximilian Luz 2020-12-21 707 ssam_irq_free(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 708 err_irq:
c167b9c7e3d613 Maximilian Luz 2020-12-21 709 sysfs_remove_group(&serdev->dev.kobj, &ssam_sam_group);
c167b9c7e3d613 Maximilian Luz 2020-12-21 710 err_initrq:
c167b9c7e3d613 Maximilian Luz 2020-12-21 711 ssam_controller_lock(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 712 ssam_controller_shutdown(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 713 err_devinit:
c167b9c7e3d613 Maximilian Luz 2020-12-21 714 serdev_device_close(serdev);
c167b9c7e3d613 Maximilian Luz 2020-12-21 715 err_devopen:
c167b9c7e3d613 Maximilian Luz 2020-12-21 716 ssam_controller_destroy(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 717 ssam_controller_unlock(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 718 err_ctrl_init:
c167b9c7e3d613 Maximilian Luz 2020-12-21 719 kfree(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 720 return status;
c167b9c7e3d613 Maximilian Luz 2020-12-21 721 }
c167b9c7e3d613 Maximilian Luz 2020-12-21 722
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 69244 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2 2/5] platform: surface: Propagate ACPI Dependency
Date: Fri, 12 Nov 2021 03:45:27 +0800 [thread overview]
Message-ID: <202111120313.DH7CeeQL-lkp@intel.com> (raw)
In-Reply-To: <20211108164449.3036210-3-jaschultz@microsoft.com>
[-- Attachment #1: Type: text/plain, Size: 12803 bytes --]
Hi Jarrett,
I love your patch! Yet something to improve:
[auto build test ERROR on robh/for-next]
[also build test ERROR on platform-drivers-x86/for-next linus/master v5.15 next-20211111]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Jarrett-Schultz/platform-surface-Introduce-Surface-XBL-Driver/20211109-004605
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/6cc91cd949ff1d32a3f6b323d055b1925627be02
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jarrett-Schultz/platform-surface-Introduce-Surface-XBL-Driver/20211109-004605
git checkout 6cc91cd949ff1d32a3f6b323d055b1925627be02
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/platform/surface/aggregator/core.c: In function 'ssam_serial_hub_probe':
>> drivers/platform/surface/aggregator/core.c:648:49: error: invalid use of undefined type 'struct acpi_device'
648 | astatus = ssam_serdev_setup_via_acpi(ssh->handle, serdev);
| ^~
>> drivers/platform/surface/aggregator/core.c:702:9: error: implicit declaration of function 'acpi_dev_clear_dependencies' [-Werror=implicit-function-declaration]
702 | acpi_dev_clear_dependencies(ssh);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/perf_event.h:25,
from include/linux/trace_events.h:10,
from include/trace/trace_events.h:21,
from include/trace/define_trace.h:102,
from drivers/platform/surface/aggregator/trace.h:632,
from drivers/platform/surface/aggregator/core.c:30:
At top level:
arch/arc/include/asm/perf_event.h:126:27: error: 'arc_pmu_cache_map' defined but not used [-Werror=unused-const-variable=]
126 | static const unsigned int arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
| ^~~~~~~~~~~~~~~~~
arch/arc/include/asm/perf_event.h:91:27: error: 'arc_pmu_ev_hw_map' defined but not used [-Werror=unused-const-variable=]
91 | static const char * const arc_pmu_ev_hw_map[] = {
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
drivers/platform/surface/aggregator/controller.c: In function 'ssam_dsm_get_functions':
>> drivers/platform/surface/aggregator/controller.c:1044:14: error: implicit declaration of function 'acpi_has_method'; did you mean 'acpi_has_watchdog'? [-Werror=implicit-function-declaration]
1044 | if (!acpi_has_method(handle, "_DSM"))
| ^~~~~~~~~~~~~~~
| acpi_has_watchdog
>> drivers/platform/surface/aggregator/controller.c:1047:15: error: implicit declaration of function 'acpi_evaluate_dsm_typed'; did you mean 'acpi_evaluate_dsm'? [-Werror=implicit-function-declaration]
1047 | obj = acpi_evaluate_dsm_typed(handle, &SSAM_SSH_DSM_GUID,
| ^~~~~~~~~~~~~~~~~~~~~~~
| acpi_evaluate_dsm
>> drivers/platform/surface/aggregator/controller.c:1047:13: error: assignment to 'union acpi_object *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
1047 | obj = acpi_evaluate_dsm_typed(handle, &SSAM_SSH_DSM_GUID,
| ^
drivers/platform/surface/aggregator/controller.c: In function 'ssam_dsm_load_u32':
drivers/platform/surface/aggregator/controller.c:1071:13: error: assignment to 'union acpi_object *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
1071 | obj = acpi_evaluate_dsm_typed(handle, &SSAM_SSH_DSM_GUID,
| ^
cc1: all warnings being treated as errors
vim +648 drivers/platform/surface/aggregator/core.c
c167b9c7e3d613 Maximilian Luz 2020-12-21 614
c167b9c7e3d613 Maximilian Luz 2020-12-21 615 static int ssam_serial_hub_probe(struct serdev_device *serdev)
c167b9c7e3d613 Maximilian Luz 2020-12-21 616 {
a9e10e58730432 Daniel Scally 2021-06-03 617 struct acpi_device *ssh = ACPI_COMPANION(&serdev->dev);
c167b9c7e3d613 Maximilian Luz 2020-12-21 618 struct ssam_controller *ctrl;
c167b9c7e3d613 Maximilian Luz 2020-12-21 619 acpi_status astatus;
c167b9c7e3d613 Maximilian Luz 2020-12-21 620 int status;
c167b9c7e3d613 Maximilian Luz 2020-12-21 621
c167b9c7e3d613 Maximilian Luz 2020-12-21 622 if (gpiod_count(&serdev->dev, NULL) < 0)
c167b9c7e3d613 Maximilian Luz 2020-12-21 623 return -ENODEV;
c167b9c7e3d613 Maximilian Luz 2020-12-21 624
c167b9c7e3d613 Maximilian Luz 2020-12-21 625 status = devm_acpi_dev_add_driver_gpios(&serdev->dev, ssam_acpi_gpios);
c167b9c7e3d613 Maximilian Luz 2020-12-21 626 if (status)
c167b9c7e3d613 Maximilian Luz 2020-12-21 627 return status;
c167b9c7e3d613 Maximilian Luz 2020-12-21 628
c167b9c7e3d613 Maximilian Luz 2020-12-21 629 /* Allocate controller. */
c167b9c7e3d613 Maximilian Luz 2020-12-21 630 ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
c167b9c7e3d613 Maximilian Luz 2020-12-21 631 if (!ctrl)
c167b9c7e3d613 Maximilian Luz 2020-12-21 632 return -ENOMEM;
c167b9c7e3d613 Maximilian Luz 2020-12-21 633
c167b9c7e3d613 Maximilian Luz 2020-12-21 634 /* Initialize controller. */
c167b9c7e3d613 Maximilian Luz 2020-12-21 635 status = ssam_controller_init(ctrl, serdev);
c167b9c7e3d613 Maximilian Luz 2020-12-21 636 if (status)
c167b9c7e3d613 Maximilian Luz 2020-12-21 637 goto err_ctrl_init;
c167b9c7e3d613 Maximilian Luz 2020-12-21 638
c167b9c7e3d613 Maximilian Luz 2020-12-21 639 ssam_controller_lock(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 640
c167b9c7e3d613 Maximilian Luz 2020-12-21 641 /* Set up serdev device. */
c167b9c7e3d613 Maximilian Luz 2020-12-21 642 serdev_device_set_drvdata(serdev, ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 643 serdev_device_set_client_ops(serdev, &ssam_serdev_ops);
c167b9c7e3d613 Maximilian Luz 2020-12-21 644 status = serdev_device_open(serdev);
c167b9c7e3d613 Maximilian Luz 2020-12-21 645 if (status)
c167b9c7e3d613 Maximilian Luz 2020-12-21 646 goto err_devopen;
c167b9c7e3d613 Maximilian Luz 2020-12-21 647
a9e10e58730432 Daniel Scally 2021-06-03 @648 astatus = ssam_serdev_setup_via_acpi(ssh->handle, serdev);
c167b9c7e3d613 Maximilian Luz 2020-12-21 649 if (ACPI_FAILURE(astatus)) {
c167b9c7e3d613 Maximilian Luz 2020-12-21 650 status = -ENXIO;
c167b9c7e3d613 Maximilian Luz 2020-12-21 651 goto err_devinit;
c167b9c7e3d613 Maximilian Luz 2020-12-21 652 }
c167b9c7e3d613 Maximilian Luz 2020-12-21 653
c167b9c7e3d613 Maximilian Luz 2020-12-21 654 /* Start controller. */
c167b9c7e3d613 Maximilian Luz 2020-12-21 655 status = ssam_controller_start(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 656 if (status)
c167b9c7e3d613 Maximilian Luz 2020-12-21 657 goto err_devinit;
c167b9c7e3d613 Maximilian Luz 2020-12-21 658
c167b9c7e3d613 Maximilian Luz 2020-12-21 659 ssam_controller_unlock(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 660
c167b9c7e3d613 Maximilian Luz 2020-12-21 661 /*
c167b9c7e3d613 Maximilian Luz 2020-12-21 662 * Initial SAM requests: Log version and notify default/init power
c167b9c7e3d613 Maximilian Luz 2020-12-21 663 * states.
c167b9c7e3d613 Maximilian Luz 2020-12-21 664 */
c167b9c7e3d613 Maximilian Luz 2020-12-21 665 status = ssam_log_firmware_version(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 666 if (status)
c167b9c7e3d613 Maximilian Luz 2020-12-21 667 goto err_initrq;
c167b9c7e3d613 Maximilian Luz 2020-12-21 668
c167b9c7e3d613 Maximilian Luz 2020-12-21 669 status = ssam_ctrl_notif_d0_entry(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 670 if (status)
c167b9c7e3d613 Maximilian Luz 2020-12-21 671 goto err_initrq;
c167b9c7e3d613 Maximilian Luz 2020-12-21 672
c167b9c7e3d613 Maximilian Luz 2020-12-21 673 status = ssam_ctrl_notif_display_on(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 674 if (status)
c167b9c7e3d613 Maximilian Luz 2020-12-21 675 goto err_initrq;
c167b9c7e3d613 Maximilian Luz 2020-12-21 676
c167b9c7e3d613 Maximilian Luz 2020-12-21 677 status = sysfs_create_group(&serdev->dev.kobj, &ssam_sam_group);
c167b9c7e3d613 Maximilian Luz 2020-12-21 678 if (status)
c167b9c7e3d613 Maximilian Luz 2020-12-21 679 goto err_initrq;
c167b9c7e3d613 Maximilian Luz 2020-12-21 680
c167b9c7e3d613 Maximilian Luz 2020-12-21 681 /* Set up IRQ. */
c167b9c7e3d613 Maximilian Luz 2020-12-21 682 status = ssam_irq_setup(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 683 if (status)
c167b9c7e3d613 Maximilian Luz 2020-12-21 684 goto err_irq;
c167b9c7e3d613 Maximilian Luz 2020-12-21 685
c167b9c7e3d613 Maximilian Luz 2020-12-21 686 /* Finally, set main controller reference. */
c167b9c7e3d613 Maximilian Luz 2020-12-21 687 status = ssam_try_set_controller(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 688 if (WARN_ON(status)) /* Currently, we're the only provider. */
c167b9c7e3d613 Maximilian Luz 2020-12-21 689 goto err_mainref;
c167b9c7e3d613 Maximilian Luz 2020-12-21 690
c167b9c7e3d613 Maximilian Luz 2020-12-21 691 /*
c167b9c7e3d613 Maximilian Luz 2020-12-21 692 * TODO: The EC can wake up the system via the associated GPIO interrupt
c167b9c7e3d613 Maximilian Luz 2020-12-21 693 * in multiple situations. One of which is the remaining battery
c167b9c7e3d613 Maximilian Luz 2020-12-21 694 * capacity falling below a certain threshold. Normally, we should
c167b9c7e3d613 Maximilian Luz 2020-12-21 695 * use the device_init_wakeup function, however, the EC also seems
c167b9c7e3d613 Maximilian Luz 2020-12-21 696 * to have other reasons for waking up the system and it seems
c167b9c7e3d613 Maximilian Luz 2020-12-21 697 * that Windows has additional checks whether the system should be
c167b9c7e3d613 Maximilian Luz 2020-12-21 698 * resumed. In short, this causes some spurious unwanted wake-ups.
c167b9c7e3d613 Maximilian Luz 2020-12-21 699 * For now let's thus default power/wakeup to false.
c167b9c7e3d613 Maximilian Luz 2020-12-21 700 */
c167b9c7e3d613 Maximilian Luz 2020-12-21 701 device_set_wakeup_capable(&serdev->dev, true);
a9e10e58730432 Daniel Scally 2021-06-03 @702 acpi_dev_clear_dependencies(ssh);
c167b9c7e3d613 Maximilian Luz 2020-12-21 703
c167b9c7e3d613 Maximilian Luz 2020-12-21 704 return 0;
c167b9c7e3d613 Maximilian Luz 2020-12-21 705
c167b9c7e3d613 Maximilian Luz 2020-12-21 706 err_mainref:
c167b9c7e3d613 Maximilian Luz 2020-12-21 707 ssam_irq_free(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 708 err_irq:
c167b9c7e3d613 Maximilian Luz 2020-12-21 709 sysfs_remove_group(&serdev->dev.kobj, &ssam_sam_group);
c167b9c7e3d613 Maximilian Luz 2020-12-21 710 err_initrq:
c167b9c7e3d613 Maximilian Luz 2020-12-21 711 ssam_controller_lock(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 712 ssam_controller_shutdown(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 713 err_devinit:
c167b9c7e3d613 Maximilian Luz 2020-12-21 714 serdev_device_close(serdev);
c167b9c7e3d613 Maximilian Luz 2020-12-21 715 err_devopen:
c167b9c7e3d613 Maximilian Luz 2020-12-21 716 ssam_controller_destroy(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 717 ssam_controller_unlock(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 718 err_ctrl_init:
c167b9c7e3d613 Maximilian Luz 2020-12-21 719 kfree(ctrl);
c167b9c7e3d613 Maximilian Luz 2020-12-21 720 return status;
c167b9c7e3d613 Maximilian Luz 2020-12-21 721 }
c167b9c7e3d613 Maximilian Luz 2020-12-21 722
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 69244 bytes --]
next prev parent reply other threads:[~2021-11-11 19:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-08 16:44 [PATCH v2 0/5] platform: surface: Introduce Surface XBL Driver Jarrett Schultz
2021-11-08 16:44 ` [PATCH v2 1/5] dt-bindings: platform: microsoft: Document surface xbl Jarrett Schultz
2021-11-08 18:48 ` Bjorn Andersson
2021-11-09 4:06 ` Rob Herring
2021-11-12 14:39 ` Rob Herring
2021-11-16 16:17 ` Jarrett Schultz
2021-11-08 16:44 ` [PATCH v2 2/5] platform: surface: Propagate ACPI Dependency Jarrett Schultz
2021-11-08 17:58 ` Maximilian Luz
2021-11-11 19:45 ` kernel test robot [this message]
2021-11-11 19:45 ` kernel test robot
2021-11-08 16:44 ` [PATCH v2 3/5] platform: surface: Add surface xbl Jarrett Schultz
2021-11-08 18:39 ` Bjorn Andersson
2021-11-16 22:05 ` Jarrett Schultz
2021-11-08 16:44 ` [PATCH v2 4/5] arm64: dts: qcom: sm8150: Add imem section Jarrett Schultz
2021-11-08 18:41 ` Bjorn Andersson
2021-11-08 16:44 ` [PATCH v2 5/5] arm64: dts: qcom: surface-duo: Add surface xbl Jarrett Schultz
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=202111120313.DH7CeeQL-lkp@intel.com \
--to=lkp@intel.com \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=hdegoede@redhat.com \
--cc=jaschultzms@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luzmaximilian@gmail.com \
--cc=mgross@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=robh+dt@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 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.