From mboxrd@z Thu Jan 1 00:00:00 1970 From: atull Subject: Re: [PATCH 3/3] GPIO: gpio-dwapb: Suspend & Resume PM enabling Date: Wed, 27 Aug 2014 11:15:04 -0500 Message-ID: References: <1409161588-19417-1-git-send-email-alvin.chen@intel.com> <1409161588-19417-4-git-send-email-alvin.chen@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Return-path: Received: from mail-bn1blp0189.outbound.protection.outlook.com ([207.46.163.189]:27792 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751082AbaH0QUr (ORCPT ); Wed, 27 Aug 2014 12:20:47 -0400 In-Reply-To: <1409161588-19417-4-git-send-email-alvin.chen@intel.com> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Weike Chen Cc: Linus Walleij , Alexandre Courbot , Grant Likely , Rob Herring , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Boon Leong Ong , Andriy Shevchenko , Mika Westerberg , Hock Leong Kweh , Darren Hart , yvanderv@opensource.altera.com, dinguyen@opensource.altera.com On Wed, 27 Aug 2014, Weike Chen wrote: > This patch enables suspend and resume mode for the power management, and > it is based on Josef Ahmad's previous work. > > Reviewed-by: Hock Leong Kweh > Reviewed-by: Shevchenko, Andriy > Signed-off-by: Weike Chen > --- > drivers/gpio/gpio-dwapb.c | 67 +++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 67 insertions(+) > Hi Weike, I tried out these patches on the current master branch (v3.17-rc2-9-g68e3702) with a socfpga cyclone5 board. If I apply all 3 patches, the kernel doesn't boot. If I rebuild with only the first patch, I get only one gpio block showing up (should have 3 for this board) and these messages: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at /home/atull/repos/linux-socfpga/fs/sysfs/dir.c:31 sysfs_warn_dup+0x58/0x74() sysfs: cannot create duplicate filename '/class/gpio/gpiochip0' Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.17.0-rc2-00012-g7ad6a41 #1 [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0x74/0x90) [] (dump_stack) from [] (warn_slowpath_common+0x68/0x8c) [] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x30/0x40) [] (warn_slowpath_fmt) from [] (sysfs_warn_dup+0x58/0x74) [] (sysfs_warn_dup) from [] (sysfs_do_create_link_sd+0xbc/0xc4) [] (sysfs_do_create_link_sd) from [] (device_add+0x304/0x4ec) [] (device_add) from [] (device_create_groups_vargs+0x9c/0xcc) [] (device_create_groups_vargs) from [] (device_create_vargs+0x20/0x28) [] (device_create_vargs) from [] (device_create+0x20/0x28) [] (device_create) from [] (gpiochip_export+0x4c/0x98) [] (gpiochip_export) from [] (gpiochip_add+0x114/0x29c) [] (gpiochip_add) from [] (dwapb_gpio_probe+0x16c/0x634) [] (dwapb_gpio_probe) from [] (platform_drv_probe+0x2c/0x5c) [] (platform_drv_probe) from [] (driver_probe_device+0x78/0x208) [] (driver_probe_device) from [] (__driver_attach+0x8c/0x90) [] (__driver_attach) from [] (bus_for_each_dev+0x54/0x88) [] (bus_for_each_dev) from [] (bus_add_driver+0xd8/0x1d4) [] (bus_add_driver) from [] (driver_register+0x78/0xf4) [] (driver_register) from [] (do_one_initcall+0x80/0x1b8) [] (do_one_initcall) from [] (kernel_init_freeable+0x170/0x240) [] (kernel_init_freeable) from [] (kernel_init+0x8/0xec) [] (kernel_init) from [] (ret_from_fork+0x14/0x3c) ---[ end trace 209e273f37ff62dd ]--- gpiochip_add: GPIOs 0..28 (ff709000.gpio) failed to register gpio-dwapb ff709000.gpio: failed to register gpiochip for /soc/gpio@ff709000/gpio-controller@0 gpio-dwapb: probe of ff709000.gpio failed with error -17 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at /home/atull/repos/linux-socfpga/fs/sysfs/dir.c:31 sysfs_warn_dup+0x58/0x74() sysfs: cannot create duplicate filename '/class/gpio/gpiochip0' Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 3.17.0-rc2-00012-g7ad6a41 #1 [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0x74/0x90) [] (dump_stack) from [] (warn_slowpath_common+0x68/0x8c) [] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x30/0x40) [] (warn_slowpath_fmt) from [] (sysfs_warn_dup+0x58/0x74) [] (sysfs_warn_dup) from [] (sysfs_do_create_link_sd+0xbc/0xc4) [] (sysfs_do_create_link_sd) from [] (device_add+0x304/0x4ec) [] (device_add) from [] (device_create_groups_vargs+0x9c/0xcc) [] (device_create_groups_vargs) from [] (device_create_vargs+0x20/0x28) [] (device_create_vargs) from [] (device_create+0x20/0x28) [] (device_create) from [] (gpiochip_export+0x4c/0x98) [] (gpiochip_export) from [] (gpiochip_add+0x114/0x29c) [] (gpiochip_add) from [] (dwapb_gpio_probe+0x16c/0x634) [] (dwapb_gpio_probe) from [] (platform_drv_probe+0x2c/0x5c) [] (platform_drv_probe) from [] (driver_probe_device+0x78/0x208) [] (driver_probe_device) from [] (__driver_attach+0x8c/0x90) [] (__driver_attach) from [] (bus_for_each_dev+0x54/0x88) [] (bus_for_each_dev) from [] (bus_add_driver+0xd8/0x1d4) [] (bus_add_driver) from [] (driver_register+0x78/0xf4) [] (driver_register) from [] (do_one_initcall+0x80/0x1b8) [] (do_one_initcall) from [] (kernel_init_freeable+0x170/0x240) [] (kernel_init_freeable) from [] (kernel_init+0x8/0xec) [] (kernel_init) from [] (ret_from_fork+0x14/0x3c) ---[ end trace 209e273f37ff62de ]--- gpiochip_add: GPIOs 0..26 (ff70a000.gpio) failed to register gpio-dwapb ff70a000.gpio: failed to register gpiochip for /soc/gpio@ff70a000/gpio-controller@0 gpio-dwapb: probe of ff70a000.gpio failed with error -17 How are you testing this? Alan