Re: [PATCH v2 1/2] Input: Add device_enable handler to DaVinci Keyscan platform data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dmitry,

+ if (pdata->device_enable) {
+		error = pdata->device_enable(dev);
+		if (error < 0) {
+			dev_dbg(dev, "device enable function failed\n");
+			return error;
+		}
+	}
+

Hi Miguel,

Does this need to live in the driver? Why can't platform code do this
for us?

Thanks.


The reason to invoke the device_enable function in the driver is because in the testing process of the key scan driver a issue was found when the key scan is built as a module.

There is a specific PINMUX configuration that only should be set if the key scan driver is loaded in the kernel to avoid pin conflicts. So when the key scan is built as a module the board file (or platform code) doesn't know if the key scan is loaded or not, so that's why the driver is the one who must invoke the device_enable function in the probe function.

Thanks,

Miguel Aguilar
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux