From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Date: Mon, 19 May 2014 13:50:52 +0000 Subject: Re: [PATCH] backlight: gpio-backlight: Fix warning when the GPIO is on a I2C chip Message-Id: <20140519135052.GK4978@lee--X1> List-Id: References: <20140509012454.GL2198@atomide.com> In-Reply-To: <20140509012454.GL2198@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: Tony Lindgren Cc: linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Bryan Wu , Jingoo Han , Jean-Christophe Plagniol-Villard , Tomi Valkeinen > If the GPIO for the backlight is on an I2C chip, we currently > get nasty warnings like this during the boot: >=20 > WARNING: CPU: 0 PID: 6 at drivers/gpio/gpiolib.c:2364 gpiod_set_raw_value= +0x40/0x4c() > Modules linked in: > CPU: 0 PID: 6 Comm: kworker/u2:0 Not tainted 3.15.0-rc4-12393-gcde9f4e #4= 00 > Workqueue: deferwq deferred_probe_work_func > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [] (show_stack) from [] (dump_stack+0x80/0x9c) > [] (dump_stack) from [] (warn_slowpath_common+0x68/0x= 8c) > [] (warn_slowpath_common) from [] (warn_slowpath_null= +0x1c/0x24) > [] (warn_slowpath_null) from [] (gpiod_set_raw_value+= 0x40/0x4c) > [] (gpiod_set_raw_value) from [] (gpio_backlight_upda= te_status+0x4c/0x74) > [] (gpio_backlight_update_status) from [] (gpio_backl= ight_probe+0x168/0x254) > [] (gpio_backlight_probe) from [] (platform_drv_probe= +0x18/0x48) > [] (platform_drv_probe) from [] (driver_probe_device+= 0x10c/0x238) > [] (driver_probe_device) from [] (bus_for_each_drv+0x= 44/0x8c) > [] (bus_for_each_drv) from [] (device_attach+0x74/0x8= c) > [] (device_attach) from [] (bus_probe_device+0x88/0xb= 0) > [] (bus_probe_device) from [] (deferred_probe_work_fu= nc+0x64/0x94) > [] (deferred_probe_work_func) from [] (process_one_wo= rk+0x1b4/0x4bc) > [] (process_one_work) from [] (worker_thread+0x11c/0x= 398) > [] (worker_thread) from [] (kthread+0xc8/0xe4) > [] (kthread) from [] (ret_from_fork+0x14/0x2c) >=20 > Fix this by using gpio_set_value_cansleep() as suggested in > drivers/gpio/gpiolib.c:2364. This is what the other backlight drivers > are also doing. >=20 > Signed-off-by: Tony Lindgren Applied, thanks. --=20 Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [PATCH] backlight: gpio-backlight: Fix warning when the GPIO is on a I2C chip Date: Mon, 19 May 2014 14:50:52 +0100 Message-ID: <20140519135052.GK4978@lee--X1> References: <20140509012454.GL2198@atomide.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <20140509012454.GL2198@atomide.com> Sender: linux-kernel-owner@vger.kernel.org To: Tony Lindgren Cc: linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Bryan Wu , Jingoo Han , Jean-Christophe Plagniol-Villard , Tomi Valkeinen List-Id: linux-omap@vger.kernel.org > If the GPIO for the backlight is on an I2C chip, we currently > get nasty warnings like this during the boot: >=20 > WARNING: CPU: 0 PID: 6 at drivers/gpio/gpiolib.c:2364 gpiod_set_raw_v= alue+0x40/0x4c() > Modules linked in: > CPU: 0 PID: 6 Comm: kworker/u2:0 Not tainted 3.15.0-rc4-12393-gcde9f4= e #400 > Workqueue: deferwq deferred_probe_work_func > [] (unwind_backtrace) from [] (show_stack+0x10/0x= 14) > [] (show_stack) from [] (dump_stack+0x80/0x9c) > [] (dump_stack) from [] (warn_slowpath_common+0x6= 8/0x8c) > [] (warn_slowpath_common) from [] (warn_slowpath_= null+0x1c/0x24) > [] (warn_slowpath_null) from [] (gpiod_set_raw_va= lue+0x40/0x4c) > [] (gpiod_set_raw_value) from [] (gpio_backlight_= update_status+0x4c/0x74) > [] (gpio_backlight_update_status) from [] (gpio_b= acklight_probe+0x168/0x254) > [] (gpio_backlight_probe) from [] (platform_drv_p= robe+0x18/0x48) > [] (platform_drv_probe) from [] (driver_probe_dev= ice+0x10c/0x238) > [] (driver_probe_device) from [] (bus_for_each_dr= v+0x44/0x8c) > [] (bus_for_each_drv) from [] (device_attach+0x74= /0x8c) > [] (device_attach) from [] (bus_probe_device+0x88= /0xb0) > [] (bus_probe_device) from [] (deferred_probe_wor= k_func+0x64/0x94) > [] (deferred_probe_work_func) from [] (process_on= e_work+0x1b4/0x4bc) > [] (process_one_work) from [] (worker_thread+0x11= c/0x398) > [] (worker_thread) from [] (kthread+0xc8/0xe4) > [] (kthread) from [] (ret_from_fork+0x14/0x2c) >=20 > Fix this by using gpio_set_value_cansleep() as suggested in > drivers/gpio/gpiolib.c:2364. This is what the other backlight drivers > are also doing. >=20 > Signed-off-by: Tony Lindgren Applied, thanks. --=20 Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog