aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/board-da850-evm.c
diff options
context:
space:
mode:
authorBen Gardiner <bengardiner@nanometrics.ca>2010-11-15 09:42:52 -0500
committerKevin Hilman <khilman@deeprootsystems.com>2010-12-10 10:33:51 -0500
commit47e7cb148a12f6f825302a85cd2b78a0948be741 (patch)
tree2aa55949ace693ccde3e11242e80e3a6644db895 /arch/arm/mach-davinci/board-da850-evm.c
parent12cdd3d71954c2cd6dd556eec25dd7d346735831 (diff)
davinci: da850-evm: UI expander gpio_set_value can sleep, use _cansleep
When the RMII PHY on the UI board is enabled with CONFIG_DA850_UI_RMII then then following will be printed to the console when warnings are also enabled: WARNING: at drivers/gpio/gpiolib.c:1567 __gpio_set_value+0x4c/0x5c() Modules linked in: [<c002c6ac>] (unwind_backtrace+0x0/0xf8) from [<c003b48c>] (warn_slowpath_common+0x4c/0x64) [<c003b48c>] (warn_slowpath_common+0x4c/0x64) from [<c003b4c0>] (warn_slowpath_null+0x1c/0x24) [<c003b4c0>] (warn_slowpath_null+0x1c/0x24) from [<c01aed60>] (__gpio_set_value+0x4c/0x5c) [<c01aed60>] (__gpio_set_value+0x4c/0x5c) from [<c0033bd4>] (da850_evm_ui_expander_setup+0x1e4/0x2 44) [<c0033bd4>] (da850_evm_ui_expander_setup+0x1e4/0x244) from [<c02e2e1c>] (pca953x_probe+0x1f8/0x29 0) <snip> Traced the WARN_ON to the gpio_set_value(rmii_sel,0) call in da850_evm_setup_emac_rmii. Replacing the call with the _cansleep variant results in no more warning. Also replacing the gpio_set_value calls in the teardown function. Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> Reviewed-by: Chris Cordahi <christophercordahi@nanometrics.ca> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/board-da850-evm.c')
-rw-r--r--arch/arm/mach-davinci/board-da850-evm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index c6e11c682e4c..f89b0b7cb6f2 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -266,7 +266,7 @@ static inline void da850_evm_setup_emac_rmii(int rmii_sel)
266 struct davinci_soc_info *soc_info = &davinci_soc_info; 266 struct davinci_soc_info *soc_info = &davinci_soc_info;
267 267
268 soc_info->emac_pdata->rmii_en = 1; 268 soc_info->emac_pdata->rmii_en = 1;
269 gpio_set_value(rmii_sel, 0); 269 gpio_set_value_cansleep(rmii_sel, 0);
270} 270}
271#else 271#else
272static inline void da850_evm_setup_emac_rmii(int rmii_sel) { } 272static inline void da850_evm_setup_emac_rmii(int rmii_sel) { }
@@ -325,9 +325,9 @@ static int da850_evm_ui_expander_teardown(struct i2c_client *client,
325 unsigned gpio, unsigned ngpio, void *c) 325 unsigned gpio, unsigned ngpio, void *c)
326{ 326{
327 /* deselect all functionalities */ 327 /* deselect all functionalities */
328 gpio_set_value(gpio + 5, 1); 328 gpio_set_value_cansleep(gpio + 5, 1);
329 gpio_set_value(gpio + 6, 1); 329 gpio_set_value_cansleep(gpio + 6, 1);
330 gpio_set_value(gpio + 7, 1); 330 gpio_set_value_cansleep(gpio + 7, 1);
331 331
332 gpio_free(gpio + 5); 332 gpio_free(gpio + 5);
333 gpio_free(gpio + 6); 333 gpio_free(gpio + 6);