Loading drivers/input/touchscreen/synaptics_i2c_rmi4.c +30 −5 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * * Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com> * Copyright (C) 2012 Scott Lin <scott.lin@tw.synaptics.com> * Copyright (c) 2013, The Linux Foundation. All rights reserved. * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Loading Loading @@ -3569,7 +3569,7 @@ static int synaptics_rmi4_suspend(struct device *dev) retval = synaptics_rmi4_regulator_lpm(rmi4_data, true); if (retval < 0) { dev_err(dev, "failed to enter low power mode\n"); return retval; goto err_lpm_regulator; } } else { dev_err(dev, Loading @@ -3581,12 +3581,24 @@ static int synaptics_rmi4_suspend(struct device *dev) retval = synaptics_rmi4_gpio_configure(rmi4_data, false); if (retval < 0) { dev_err(dev, "failed to put gpios in suspend state\n"); return retval; goto err_gpio_configure; } } rmi4_data->suspended = true; return 0; err_gpio_configure: synaptics_rmi4_regulator_lpm(rmi4_data, false); err_lpm_regulator: if (rmi4_data->sensor_sleep) { synaptics_rmi4_sensor_wake(rmi4_data); synaptics_rmi4_irq_enable(rmi4_data, true); rmi4_data->touch_stopped = false; } return retval; } /** Loading Loading @@ -3622,7 +3634,7 @@ static int synaptics_rmi4_resume(struct device *dev) retval = synaptics_rmi4_gpio_configure(rmi4_data, true); if (retval < 0) { dev_err(dev, "Failed to put gpios in active state\n"); return retval; goto err_gpio_configure; } } Loading @@ -3633,11 +3645,24 @@ static int synaptics_rmi4_resume(struct device *dev) retval = synaptics_rmi4_check_configuration(rmi4_data); if (retval < 0) { dev_err(dev, "Failed to check configuration\n"); return retval; goto err_check_configuration; } rmi4_data->suspended = false; return 0; err_check_configuration: synaptics_rmi4_irq_enable(rmi4_data, false); rmi4_data->touch_stopped = true; synaptics_rmi4_sensor_sleep(rmi4_data); if (rmi4_data->board->disable_gpios) synaptics_rmi4_gpio_configure(rmi4_data, false); err_gpio_configure: synaptics_rmi4_regulator_lpm(rmi4_data, true); wake_up(&rmi4_data->wait); return retval; } #if (!defined(CONFIG_FB) && !defined(CONFIG_HAS_EARLYSUSPEND)) Loading Loading
drivers/input/touchscreen/synaptics_i2c_rmi4.c +30 −5 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * * Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com> * Copyright (C) 2012 Scott Lin <scott.lin@tw.synaptics.com> * Copyright (c) 2013, The Linux Foundation. All rights reserved. * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Loading Loading @@ -3569,7 +3569,7 @@ static int synaptics_rmi4_suspend(struct device *dev) retval = synaptics_rmi4_regulator_lpm(rmi4_data, true); if (retval < 0) { dev_err(dev, "failed to enter low power mode\n"); return retval; goto err_lpm_regulator; } } else { dev_err(dev, Loading @@ -3581,12 +3581,24 @@ static int synaptics_rmi4_suspend(struct device *dev) retval = synaptics_rmi4_gpio_configure(rmi4_data, false); if (retval < 0) { dev_err(dev, "failed to put gpios in suspend state\n"); return retval; goto err_gpio_configure; } } rmi4_data->suspended = true; return 0; err_gpio_configure: synaptics_rmi4_regulator_lpm(rmi4_data, false); err_lpm_regulator: if (rmi4_data->sensor_sleep) { synaptics_rmi4_sensor_wake(rmi4_data); synaptics_rmi4_irq_enable(rmi4_data, true); rmi4_data->touch_stopped = false; } return retval; } /** Loading Loading @@ -3622,7 +3634,7 @@ static int synaptics_rmi4_resume(struct device *dev) retval = synaptics_rmi4_gpio_configure(rmi4_data, true); if (retval < 0) { dev_err(dev, "Failed to put gpios in active state\n"); return retval; goto err_gpio_configure; } } Loading @@ -3633,11 +3645,24 @@ static int synaptics_rmi4_resume(struct device *dev) retval = synaptics_rmi4_check_configuration(rmi4_data); if (retval < 0) { dev_err(dev, "Failed to check configuration\n"); return retval; goto err_check_configuration; } rmi4_data->suspended = false; return 0; err_check_configuration: synaptics_rmi4_irq_enable(rmi4_data, false); rmi4_data->touch_stopped = true; synaptics_rmi4_sensor_sleep(rmi4_data); if (rmi4_data->board->disable_gpios) synaptics_rmi4_gpio_configure(rmi4_data, false); err_gpio_configure: synaptics_rmi4_regulator_lpm(rmi4_data, true); wake_up(&rmi4_data->wait); return retval; } #if (!defined(CONFIG_FB) && !defined(CONFIG_HAS_EARLYSUSPEND)) Loading