aboutsummaryrefslogtreecommitdiff
path: root/drivers/fpga/of-fpga-region.c
AgeCommit message (Collapse)AuthorFilesLines
2022-05-10fpga: fpga-region: fix kernel-doc formatting issuesNava kishore Manne1-7/+9
To fix below kernel-doc warnings this patch does the following ->Replaced Return\Returns with 'Return:' keyword. ->Added 'Return' description For __init of_fpga_region_init()' API. ->Added description for 'child_regions_with_firmware()' API. warning: No description found for return value of 'of_fpga_region_find'. warning: No description found for return value of 'of_fpga_region_get_bridges'. warning: missing initial short description on line: * child_regions_with_firmware warning: No description found for return value of 'child_regions_with_firmware'. warning: No description found for return value of 'of_fpga_region_notify_pre_apply'. warning: No description found for return value of 'of_fpga_region_notify'. warning: No description found for return value of 'of_fpga_region_init'. Signed-off-by: Nava kishore Manne <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Xu Yilun <[email protected]>
2022-05-10fpga: fix for coding style issuesNava kishore Manne1-3/+3
fixes the below checks reported by checkpatch.pl: - Lines should not end with a '(' - Alignment should match open parenthesis Signed-off-by: Nava kishore Manne <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Xu Yilun <[email protected]>
2021-12-09fpga: region: fix kernel-docYang Li1-1/+1
Fix function name in of-fpga-region.c kernel-doc comment to remove a warning found by running scripts/kernel-doc, which is caused by using 'make W=1'. drivers/fpga/of-fpga-region.c:451: warning: expecting prototype for fpga_region_init(). Prototype was for of_fpga_region_init() instead. Reported-by: Abaci Robot <[email protected]> Signed-off-by: Yang Li <[email protected]> Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Moritz Fischer <[email protected]>
2021-11-28fpga: region: Use standard dev_release for class driverRuss Weight1-7/+3
The FPGA region class driver data structure is being treated as a managed resource instead of using the standard dev_release call-back function to release the class data structure. This change removes the managed resource code and combines the create() and register() functions into a single register() or register_full() function. The register_full() function accepts an info data structure to provide flexibility in passing optional parameters. The register() function supports the current parameter list for users that don't require the use of optional parameters. Signed-off-by: Russ Weight <[email protected]> Reviewed-by: Xu Yilun <[email protected]> Acked-by: Xu Yilun <[email protected]> Signed-off-by: Moritz Fischer <[email protected]>
2021-06-09fpga: of-fpga-region: change FPGA indirect article to anTom Rix1-4/+4
Change use of 'a fpga' to 'an fpga' Signed-off-by: Tom Rix <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-24drivers: Add generic helper to match by of_nodeSuzuki K Poulose1-6/+1
Add a helper to match device by the of_node. This will be later used to provide wrappers to the device iterators for {bus/class/driver}_find_device(). Convert other users to reuse this new helper. Cc: Alan Tull <[email protected]> Cc: Andrew Lunn <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: David Airlie <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Florian Fainelli <[email protected]> Cc: Frank Rowand <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Heiner Kallweit <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: Jonathan Hunter <[email protected]> Cc: Lee Jones <[email protected]> Cc: Liam Girdwood <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Maarten Lankhorst <[email protected]> Cc: Mark Brown <[email protected]> Cc: Mathieu Poirier <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Moritz Fischer <[email protected]> Cc: Peter Rosin <[email protected]> Cc: Rob Herring <[email protected]> Cc: Srinivas Kandagatla <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Thor Thayer <[email protected]> Cc: Wolfram Sang <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Ulf Hansson <[email protected]> Cc: Joe Perches <[email protected]> Signed-off-by: Suzuki K Poulose <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-11-26fpga: of-fpga-region: Use platform_set_drvdataMoritz Fischer1-1/+1
Use platform_set_drvdata rather than dev_set_drvdata to match the platform_get_drvdata in the _remove() function of the platform driver. Signed-off-by: Moritz Fischer <[email protected]> Acked-by: Alan Tull <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-10-16fpga: add devm_fpga_region_createAlan Tull1-4/+2
Add devm_fpga_region_create() which is the managed version of fpga_region_create(). Change current region drivers to use devm_fpga_region_create(). Signed-off-by: Alan Tull <[email protected]> Suggested-by: Federico Vaga <[email protected]> Acked-by: Moritz Fischer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-09-30fpga: do not access region struct after fpga_region_unregisterAlan Tull1-1/+2
A couple drivers were accessing the region struct after it had been freed. Save off the pointer to the mgr before the region struct gets freed. Signed-off-by: Alan Tull <[email protected]> Acked-by: Moritz Fischer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-05-25fpga: use SPDXAlan Tull1-13/+1
Replace GPLv2 boilerplate with SPDX in FPGA code that came from me or from Altera. Signed-off-by: Alan Tull <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-05-25fpga: region: change api, add fpga_region_create/freeAlan Tull1-8/+5
Add fpga_region_create/free API functions. Change fpga_region_register to take FPGA region struct as the only parameter. Change fpga_region_unregister to return void. struct fpga_region *fpga_region_create(struct device *dev, struct fpga_manager *mgr, int (*get_bridges)(struct fpga_region *)); void fpga_region_free(struct fpga_region *region); int fpga_region_register(struct fpga_region *region); void fpga_region_unregister(struct fpga_region *region); Remove groups storage from struct fpga_region, it's not needed. Callers can just "region->dev.groups = groups;" after calling fpga_region_create. Update the drivers that call fpga_region_register with the new API. Signed-off-by: Alan Tull <[email protected]> Signed-off-by: Moritz Fischer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-05-25fpga: region: don't use drvdata in common fpga codeAlan Tull1-0/+1
Changes to fpga_region_register function to not set drvdata. Setting drvdata is fine for DT based devices that will have one region per platform device. However PCIe based devices may have multiple FPGA regions under one PCIe device. Without these changes, the PCIe solution has to create an extra device for each child region to hold drvdata. Signed-off-by: Alan Tull <[email protected]> Reported-by: Jiuyue Ma <[email protected]> Signed-off-by: Moritz Fischer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-11-28fpga: region: release of_parse_phandle nodes after useIan Abbott1-3/+10
Both fpga_region_get_manager() and fpga_region_get_bridges() call of_parse_phandle(), but nothing calls of_node_put() on the returned struct device_node pointers. Make sure to do that to stop their reference counters getting out of whack. Fixes: 0fa20cdfcc1f ("fpga: fpga-region: device tree control for FPGA") Cc: <[email protected]> # 4.10+ Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Alan Tull <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-11-28fpga: of-fpga-region: accept overlays that don't program FPGAAlan Tull1-5/+6
The FPGA may already have a static image programmed when Linux boots. In that case a DT overlay may be used to add the devices that already exist. This commit allows that by shuffling the order of some checks. Signed-off-by: Alan Tull <[email protected]> Acked-by: Moritz Fischer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-11-28fpga: region: move device tree support to of-fpga-region.cAlan Tull1-0/+496
Create of-fpga-region.c and move the following functions without modification from fpga-region.c. * of_fpga_region_find * of_fpga_region_get_mgr * of_fpga_region_get_bridges * child_regions_with_firmware * of_fpga_region_parse_ov * of_fpga_region_notify_pre_apply * of_fpga_region_notify_post_remove * of_fpga_region_notify * of_fpga_region_probe * of_fpga_region_remove Create two new functions with some code from fpga_region_init/exit. * of_fpga_region_init * of_fpga_region_exit Signed-off-by: Alan Tull <[email protected]> Acked-by: Moritz Fischer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>