Thread (28 messages) 28 messages, 5 authors, 2015-06-13

Re: [PATCH 4/5] i8042: Prepare i8042 driver for DT support

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2015-02-03 19:38:43
Also in: linux-input, lkml

On Tue, Feb 03, 2015 at 12:48:49AM +0300, Roman Volkov wrote:
Use platform_device_probe() instead of platform_create_bundle() when
compiled with DT support, since the latter function is not suitable for
handling the OF device tree.

The order of initialization is changed, since i8042_platform_init() for DT
requires initialized platform_device structure. To avoid searching of the
compatible node twice, the platform_device structure pointer must be passed
to the i8042_platform_init() function right after initialization by
platform_device_probe().

Signed-off-by: Tony Prisk <redacted>
Signed-off-by: Roman Volkov <redacted>
---

Yes, many of these ifdefs look ugly. Suggestions on how to avoid this are
welcome (except using of_find_compatible_node() for searching the node twice
before calling the probe function).
I guess we need to split the dirver into part that create platform
device and the standard driver part. Then your OF code can supply most
of the needed data via resources/platform data. Yes, it is a larger
change, but the current splat of ifdefs makes my eyes water.

Thanks.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help