Re: [PATCH v3 6/6] Input: edt-ft5x06 - improve power management operations
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2020-01-10 01:10:01
Also in:
linux-devicetree
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2020-01-10 01:10:01
Also in:
linux-devicetree
Hi Marco, On Wed, Jan 08, 2020 at 12:10:50PM +0100, Marco Felsch wrote:
+static int __maybe_unused edt_ft5x06_ts_resume(struct device *dev)
+{
+ struct i2c_client *client = to_i2c_client(dev);
+ struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client);
+ int ret;
+
+ if (device_may_wakeup(dev))
+ return 0;
+
+ ret = regulator_enable(tsdata->vcc);
+ if (ret)
+ dev_warn(dev, "Failed to enable vcc\n");I wonder if we should not return error here instead of continuing. If device is not powered up properly we'll have hard time communicating with it. The same is for suspend: maybe we should abort if we can't switch off regulator or write to the device. Thanks. -- Dmitry