Thread (4 messages) 4 messages, 3 authors, 2013-02-26

Re: [PATCH 4/4] Input: auo_pixcir_ts - add devicetree support

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2013-02-26 07:05:30
Also in: linux-devicetree

Possibly related (same subject, not in this thread)

On Mon, Feb 25, 2013 at 02:47:17PM +0100, Heiko Stübner wrote:
Am Montag, 25. Februar 2013, 04:06:41 schrieb Dmitry Torokhov:
quoted
On Sun, Feb 24, 2013 at 10:58:00AM +0100, Heiko Stübner wrote:
quoted
Hi Dmitry,

Am Sonntag, 24. Februar 2013, 09:00:15 schrieb Dmitry Torokhov:
quoted
Hi Heiko,

On Sat, Feb 23, 2013 at 12:58:16PM +0100, Heiko Stübner wrote:
quoted
+static struct auo_pixcir_ts_platdata *auo_pixcir_parse_dt(struct
device *dev) +{
+	struct auo_pixcir_ts_platdata *pdata = NULL;
+
+#ifdef CONFIG_OF
+	struct device_node *np = dev->of_node;
+
+	if (!np)
+		return NULL;
+
+	pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
+	if (!pdata) {
+		dev_err(dev, "failed to allocate platform data\n");
+		return NULL;
+	}
I disike #ifdefs in the middle of the code, also it would be nice if we
signal the proper error instead of always using -EINVAL when there are
issues with platform/DT data.

How about the version of the patch below?
I tested it and everything of course still works :-) .
OK, great, then I will queue these for the next merge window.

Could you also try this patch (it however needs attached patch enhancing
devres to support custom actions).

Thanks.
In general looks really nice and also works. I have some small nitpicks (patch 
desc, reset gpio naming) and it will also need to use 
devm_request_threaded_irq to get the irq correctly freed on removal. [all also 
marked at the corresponding places below]

Otherwise:

Tested-by: Heiko Stuebner <heiko@sntech.de>
Thank you Heiko, I made the changes you mentioned and queued with the
rest of the patches for 3.10.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help