[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140802002301.GC11170@amd.pavel.ucw.cz>
Date: Sat, 2 Aug 2014 02:23:01 +0200
From: Pavel Machek <pavel@...x.de>
To: atull@...nsource.altera.com
Cc: gregkh@...uxfoundation.org, jgunthorpe@...idianresearch.com,
hpa@...or.com, monstr@...str.eu, michal.simek@...inx.com,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
pantelis.antoniou@...sulko.com, robh+dt@...nel.org,
grant.likely@...aro.org, broonie@...nel.org, philip@...ister.org,
rubini@...dd.com, s.trumtrar@...gutronix.de, jason@...edaemon.net,
kyle.teske@...com, nico@...aro.org, balbi@...com,
m.chehab@...sung.com, davidb@...eaurora.org, rob@...dley.net,
davem@...emloft.net, cesarb@...arb.net, sameo@...ux.intel.com,
akpm@...ux-foundation.org, linus.walleij@...aro.org,
delicious.quinoa@...il.com, dinguyen@...nsource.altera.com,
yvanderv@...nsource.altera.com
Subject: Re: [PATCH 2/3] fpga bus driver
Hi!
> Here's a simple example. Start with:
> * the altera-gpio driver built in to the kernel but not in the
> device tree.
> * raw fpga image at /lib/firmware/soc_system.rbf
> * Load appropriate device tree overlay in configfs by doing
> $ mkdir /config/device-tree/overlays/1
> $ echo socfpga_overlay.dtbo > /config/device-tree/overlays/1/path
> * This results in the FPGA getting programmed and the altera
> gpio driver getting probed.
Nice!
> +/* Find the fpga manager that is pointed to by a phandle */
> +struct fpga_manager *of_fpga_mgr_dev_lookup(struct device_node *node,
> + const char *mgr_property,
> + int *ret)
> +{
> + struct fpga_manager *mgr;
> + struct device_node *mgr_node;
> +
> + mgr_node = of_parse_phandle(node, mgr_property, 0);
> +
> + if (!mgr_node) {
> + *ret = -ENODEV;
> + return NULL;
Could IS_ERR_OR_NULL() and friends be used to get reasonable calling
convention?
Thanks,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists